跳转到内容
控制台

Operations

Codex Responses Compact

POST
/v1/responses/compact
curl --request POST \
--url https://coder.api.visioncoder.cn/v1/responses/compact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "model": "gpt-5.3-codex-spark", "messages": [ { "role": "system", "content": "example" } ], "temperature": 1, "max_tokens": 1, "stream": false, "tools": [ {} ], "tool_choice": "example" }'
Media typeapplication/json
OpenaiCreateChatCompletionReq

Compact request body used by Codex CLI when wire_api=“responses” is enabled. Same structure as Chat Completions.

object
model
required

Model ID. Recommended for Codex: gpt-5.3-codex-spark (Codex-specialized) or gpt-5.5 (general strongest). Other GPT-5 variants also work.

string
Example
gpt-5.3-codex-spark
messages
required
Array<object>
object
role
required
string
Allowed values: system user assistant tool
content
required
string
temperature
number format: float
max_tokens
integer
stream
boolean
tools
Array<object>
object
tool_choice

A successful response.

Media typeapplication/json
OpenaiCreateChatCompletionResp

Codex Compact response body. Same structure as Chat Completions.

object
id
string
object
string
created
integer
model
string
choices
Array<object>
object
index
integer
message
object
role
string
content
string
finish_reason
string
usage
object
prompt_tokens
integer
completion_tokens
integer
total_tokens
integer
Example
{
"object": "chat.completion",
"choices": [
{
"message": {
"role": "assistant"
}
}
]
}