Skip to content

Responses ​

POST /v1/responses is used for OpenAI Responses-style calls. It organizes data through input, output, tool items, and reasoning items, making it suitable for modern clients that need unified text, multimodal, and tool outputs.

Main Endpoints ​

MethodPathDescription
POST/v1/responsesCreate a response
POST/v1/responses/compactCompact response context

Request Fields ​

FieldTypeRequiredDescription
modelstringYesPlatform model name
inputstring/arrayYesInput text or structured input items
streambooleanNoWhether to return a stream
max_output_tokensnumberNoMaximum output tokens
toolsarrayNoTool definitions
reasoningobjectNoReasoning-related parameters, depending on the model
textobjectNoText output configuration
storebooleanNoWhether to store; the platform may filter this by channel

Streaming Events ​

Responses streaming events are more granular than Chat Completions and may include output item, content delta, reasoning, tool call, and completed events. Clients should parse events by type rather than simply concatenating plain text.

Request Example ​

bash
curl https://api.cloudaikit.com/v1/responses \
  -H "Authorization: Bearer sk-your-token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "input": "请用一句话介绍 API 网关"
  }'

Different SDKs may provide different methods for reading response text. When using HTTP directly, extract text based on the event type or the output array in the response; do not assume that all responses contain choices[0].

Compatibility Differences ​

The platform supports the Responses path, but different channels may convert requests to OpenAI Chat, Gemini, or other upstream formats. After conversion, some fields may be filtered, ignored, or downgraded.