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
| Method | Path | Description |
|---|---|---|
| POST | /v1/responses | Create a response |
| POST | /v1/responses/compact | Compact response context |
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Platform model name |
input | string/array | Yes | Input text or structured input items |
stream | boolean | No | Whether to return a stream |
max_output_tokens | number | No | Maximum output tokens |
tools | array | No | Tool definitions |
reasoning | object | No | Reasoning-related parameters, depending on the model |
text | object | No | Text output configuration |
store | boolean | No | Whether 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
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.
