Skip to main content
POST
/
v1
/
responses

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

Request Parameters

Core Parameters

FieldTypeRequiredRangeDescription
modelstring-The model ID
inputstring | array<object>-Input content for the model.
>input.rolestringuser
assistant
system
developer
The role of the message input. One of user, assistant, system, or developer.
>input.contentstring | array-A text input to the model when string; a list of one or many input items to the model, containing different content types when array.

Multimodal Input

{
  "role": "user",
  "content": [
    {
      "type": "input_text",
      "text": "Who are you?"
    }
  ]
}

Input Parameters

FieldTypeRequiredRangeDescription
typestring-The type of content block. Supported: input_text, input_image, input_file.
textstring-input_textThe text content of the input.
image_urlstring-input_imageThe URL of the image to send to the model.
filenamestring-input_fileThe name of the file being uploaded.
file_urlstring-input_fileThe URL of the file to send to the model.

Advanced Parameters

FieldTypeRequiredRangeDescription
instructionsstring--System instructions that the model should follow when generating a response.
max_output_tokensinteger--The maximum number of tokens the model can generate in the response.
temperaturenumber-0.0 - 2.0Controls the randomness of the output. Lower values produce more focused responses, higher values produce more creative outputs.
top_pnumber-0.0 - 1.0Nucleus sampling parameter. The model considers tokens with top_p cumulative probability mass.
streamboolean--If true, returns a stream of server-sent events (SSE) as the response is generated.
toolsarray<object>--A list of tools the model may call. Use this to provide functions the model can generate JSON inputs for.
tool_choicestring | object--Controls which tool is called. none: no tool, auto: model decides, required: must call a tool.
reasoningobject--Configuration for reasoning effort. Controls how much reasoning the model performs before generating a response.
previous_response_idstring--The ID of a previous response to use as context for multi-turn conversations.
truncationstring-auto | disabledTruncation strategy. auto: automatically truncates input to fit context window; disabled: returns an error if input exceeds context window.