创建函数调用 Copy
接口: POST https://api.nixapi.com/v1/responses
https://platform.openai.com/docs/api-reference/responses/create 部分OpenAI模型仅支持Response格式,例如 gpt-6-astra、gpt-6.1-sol、gpt-6.1-terra 的工具调用必须走 Responses
参数
Content-Type(header, string, 必填): 请求体 Content-Type,一般为 application/jsonAccept(header, string, 必填): 期望的响应 Content-TypeAuthorization(header, string): Bearer API Key
请求体 (application/json)
input(array)model(string): 要使用的模型的 ID。常用模型:gpt-6.2-sol、gpt-6.2-astra、gpt-6.1-sol、gpt-6.1-terra、gpt-6-sol、gpt-6-astra、gpt-6-luna、gpt-5-chat-latest、gpt-5-mini、gpt-5-nano、gpt-5-pro、gpt-5.1-codex、gpt-5.2-pro、gpt-5.4-pro、gpt-5.4-pro-2026-03-05、gpt-5.5-pro 等,完整列表见模型广场。
请求示例
{
"input": [
{
"content": [
{
"prompt_cache_breakpoint": {
"mode": "explicit",
"ttl": "12h"
},
"text": "\u003c这里放很长且固定不变的系统提示 / 知识文档,至少数千 token\u003e",
"type": "input_text"
}
],
"role": "developer"
},
{
"content": "根据上面的文档回答:……",
"role": "user"
}
],
"model": "gpt-6.1-sol",
"prompt_cache_options": {
"mode": "explicit"
}
}