AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Text and chat

Chat Completions

Create text, multimodal, and tool-enabled responses with the OpenAI-compatible Chat Completions API.

Chat Completions generates a model response from a list of messages. Depending on the selected model, the endpoint can support text chat, multimodal input, streaming output, structured output, and function tools.

POST/v1/chat/completions

Generate a model response from the supplied messages. The endpoint supports standard and SSE streaming responses. Advanced capabilities such as image or audio input, tool calling, and structured output depend on the selected model.

When switching models, start with a minimal text request, then enable advanced parameters one at a time.

Authorization

bearerAuth
AuthorizationBearer <token>

Use Bearer your-api-key in the Authorization header.

In: header

Request Body

Choose a request structure based on the model input modality. All three views use the same Chat Completions endpoint and shared generation parameters.

application/json
Text chat

Use this mode for chat, content generation, and text reasoning. Message content can be a string.

model
A text model ID available to the current account.
messages[].role
The message role, such as user, system, or assistant.
messages[].content
The text message as a string.
application/json
{
  "model": "MODEL_ID",
  "messages": [
    {
      "role": "user",
      "content": "Hello! Introduce yourself in one sentence."
    }
  ]
}
Field referenceThe field structure below applies only to the selected input mode.

Text chat request. User messages can be strings or content arrays containing only text.

Image and audio inputs are available only for models that support the corresponding modality. Check the models available to the current account and the actual API capabilities.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

OpenAI Chat Completions documentationReview the upstream protocol and recent field changes.