深数智文档
AI 接口列表聊天(Chat)

OpenAI格式(Responses)

https://token.firstpy.com/v1/responses

OpenAI Responses API,用于创建模型响应。 支持多轮对话、工具调用、推理等功能。

鉴权

在 Header 添加参数 Authorization,其值为在 Bearer 之后拼接 Token
示例:Authorization: Bearer ********************

请求体

model*string

模型 ID

input*
instructions?string

覆盖默认系统提示词

max_output_tokens?integer

最大输出长度

temperature?number

采样温度,取值范围0~2,数值越高生成随机性越强

top_p?float

核采样参数,默认1,范围 0.0 到 1.0

stream?boolean

是否启用流式输出

tools?
tool_choice?
reasoning?
previous_response_id?string

上一次响应的ID

truncation?string

auto | disabled

示例
{
    "model": "gpt-5.4",
    "input": [
        {
            "role": "user",
            "content": "Hello"
        }
    ],
    "max_output_tokens": 100
}

返回响应

id?string
响应ID
object?string
固定值为chat.completion,标识返回对象类型
created_at?integer
响应生成的Unix时间戳
status?string

状态, 取值 completed | failed | in_progress | incomplete

model?string
实际处理本次请求的模型ID
output?
usage?
示例
{
    "id": "string",
    "object": "response",
    "created_at": 0,
    "status": "completed",
    "model": "string",
    "output": [
        {
        "type": "string",
        "id": "string",
        "status": "string",
        "role": "string",
        "content": [
            {
            "type": "string",
            "text": "string"
            }
        ]
        }
    ],
    "usage": {
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "total_tokens": 0,
        "prompt_tokens_details": {
        "cached_tokens": 0,
        "text_tokens": 0,
        "audio_tokens": 0,
        "image_tokens": 0
        },
        "completion_tokens_details": {
        "text_tokens": 0,
        "audio_tokens": 0,
        "reasoning_tokens": 0
        }
    }
}

On this page