Responses
curl --request POST \
--url https://zero.cat/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"temperature": 123,
"top_p": 123,
"stream": true,
"tools": [
{}
],
"tool_choice": "<string>",
"reasoning": {
"summary": "<string>"
},
"previous_response_id": "<string>"
}
'import requests
url = "https://zero.cat/v1/responses"
payload = {
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"temperature": 123,
"top_p": 123,
"stream": True,
"tools": [{}],
"tool_choice": "<string>",
"reasoning": { "summary": "<string>" },
"previous_response_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
instructions: '<string>',
max_output_tokens: 123,
temperature: 123,
top_p: 123,
stream: true,
tools: [{}],
tool_choice: '<string>',
reasoning: {summary: '<string>'},
previous_response_id: '<string>'
})
};
fetch('https://zero.cat/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"model": "<string>",
"output": [
{
"type": "<string>",
"id": "<string>",
"status": "<string>",
"role": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123
},
"completion_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123
}
}
}聊天
Responses
OpenAI Responses API,用于创建模型响应。 支持多轮对话、工具调用、推理等功能。
POST
/
v1
/
responses
Responses
curl --request POST \
--url https://zero.cat/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"temperature": 123,
"top_p": 123,
"stream": true,
"tools": [
{}
],
"tool_choice": "<string>",
"reasoning": {
"summary": "<string>"
},
"previous_response_id": "<string>"
}
'import requests
url = "https://zero.cat/v1/responses"
payload = {
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 123,
"temperature": 123,
"top_p": 123,
"stream": True,
"tools": [{}],
"tool_choice": "<string>",
"reasoning": { "summary": "<string>" },
"previous_response_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
instructions: '<string>',
max_output_tokens: 123,
temperature: 123,
top_p: 123,
stream: true,
tools: [{}],
tool_choice: '<string>',
reasoning: {summary: '<string>'},
previous_response_id: '<string>'
})
};
fetch('https://zero.cat/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "completed",
"model": "<string>",
"output": [
{
"type": "<string>",
"id": "<string>",
"status": "<string>",
"role": "<string>",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123
},
"completion_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123
}
}
}授权
ZeroCat API 密钥(sk- 开头),在控制台「API 密钥」页面创建。
格式:Authorization: Bearer sk-xxxxxx
请求体
application/json

