Skip to main content
POST
/
v1
/
chat
/
completions

Authorization

  • Auth Type: Bearer Auth (In: header)
  • Format: Authorization: Bearer <YOUR_API_KEY>
  • Description: Use Bearer <YOUR_API_KEY>. Format: Authorization: Bearer sk-xxxxxx.
  • API Key: where API Key is your AGCloud API KEY

Parameters

Core Parameters

FieldTypeRequiredRangeDescription
modelstring-Model ID used to generate the response.
messagesarray<object>-A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, images, and audio.
>messages.roleenumuser
assistant
system
developer
The role of the message sender. Can be user model.
>messages.namestring--An optional name for the participant. Provides the model information to differentiate between participants of the same role.
>messages.contentstring|array<object>-The contents of the developer message.
>messages.content.typestring-text
image_url
The type of the content part.
>messages.content.textstring--The text content.
>messages.content.image_urlobject--The image URL content.
>messages.content.image_url.urlstring--The URL of the image.
max_tokensinteger--An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
streamboolean--Whether to stream the response back incrementally. Defaults to false.