Chat

NEW

FREE 1440 requests/day

€0.001 + VAT

FREE requests

Integrate GPT, Claude and Gemini into your applications through a single API. Switch models without losing the conversation context, receive streaming responses, optimise token consumption and customise your spending budget.

Delivery

In Real Time

API

AI

available for
  • gz

CHAT is Openapi's service that provides access to leading generative Artificial Intelligence models through a single API, without having to develop and manage separate integrations for each provider.

Choose from GPT, Claude and Gemini, select the model that best suits your needs and switch between models even during the same conversation, without having to start a new session.

With CHAT AI, you can also control your AI costs: set a maximum spending limit directly in euros, optimise token consumption and transparently monitor the actual cost of each request.

REQUEST EXAMPLE

POST /chat

Start a new conversation by selecting an AI model and configure:

  • AI model to use
  • Maximum spending limit in euros
  • Response format (HTML or Markdown)
  • Streaming or complete response
  • Token threshold for conversation summarisation
{
  "model": "claude-sonnet-5-5",
  "message": "What is the difference between standard and reduced VAT rates in Italy?",
  "maxCredit": 0.5,
  "summarize": false,
  "summaryThreshold": 20000,
  "stream": true,
  "answerFormat": "markdown",
  "callback": {
    "method": "POST",
    "field": "string",
    "url": "https://webhook.site/0b6f2c1e-7a4d-4e8b-9c3f-5d2a1e8b7c64",
    "data": {}
  }
}

RESPONSE EXAMPLE

In addition to the AI-generated response, the service returns the session ID, a breakdown of token usage and the actual cost of the request.

{
  "data": {
    "session": "6727a1f0c2b4e1a9d3f0b123",
    "model": "claude-sonnet-5-5",
    "answer": "In Italy, the **standard VAT rate** is **22%**, applied to most goods and services. **Reduced VAT rates** (**10%**, **5%** or **4%**) apply to categories specified by law, such as food, medicines and first homes.",
    "type": "markdown",
    "truncated": false,
    "usage": {
      "inputTokens": 57,
      "cachedInputTokens": 53,
      "outputTokens": 60,
      "totalTokens": 117,
      "summary": {
        "model": "claude-haiku-5-5",
        "inputTokens": 20000,
        "outputTokens": 800,
        "totalTokens": 20800
      }
    },
    "cost": {
      "summary": 0,
      "chat": 0.012,
      "total": 0.012
    }
  },
  "success": true,
  "message": "",
  "error": null
}

SWITCH AI MODELS 

POST /chat/{session}

Start a conversation with GPT, explore the topic further with Claude and continue with Gemini. Thanks to the session ID, you can switch between AI models while retaining the context of previous interactions. Leverage the strengths of each model based on the type of task, performance and costs, without changing your integration.

DELETE A CONVERSATION

DELETE /chat/{session}

{
  "data": {
    "session": "6727a1f0c2b4e1a9d3f0b123",
    "deleted": true
  },
  "success": true,
  "message": "",
  "error": null
}

You can delete a session at any time using a DELETE request, even while a response is being generated. One hour after the last response, the session and all associated messages are automatically deleted.

REAL-TIME STREAMING RESPONSES

Receive responses progressively as they are generated, without waiting for processing to be completed. Offer your users a smoother and more immediate experience or choose to receive the complete response at once, depending on your application's needs.

SET YOUR BUDGET AND MONITOR COSTS

Set a maximum spending limit in euros for each request and monitor consumption using the information returned by the API. The service provides a detailed breakdown of token usage and costs, allowing you to track spending and optimise the use of Artificial Intelligence in your applications.

WHO IS IT FOR?

CHAT is designed for businesses, software companies and developers looking to integrate generative Artificial Intelligence into their products and services through a single API.

Key use cases include:

  • Chatbots and virtual assistants
  • Customer service automation
  • Content generation
  • Information analysis and summarisation
  • AI integration into CRM and business management software

The service is also available in a test environment and is continuously evolving, with future integrations of Grok, DeepSeek and Mistral.

Sign Up

Do you need help?

Haven't found the answer you're looking for?

Fill in all the details, we will get back to you as soon as possible!