API 文档 / OpenAI 格式
Responses
POST
https://api.tokenjoy.org/v1/responsesOpenAI 的新一代对话接口,与 OpenAI Responses API 兼容,Codex 使用的就是这个接口。
请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
model | string | 必填。模型名 |
input | string | array | 必填。输入文本,或消息列表 |
instructions | string | 系统指令 |
stream | boolean | 是否流式返回 |
max_output_tokens | integer | 最多生成的 token 数 |
tools | array | 可供模型调用的工具 |
reasoning | object | 推理强度,例如 {"effort": "medium"} |
示例
curl https://api.tokenjoy.org/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKENJOY_API_KEY}" \
-d '{"model": "gpt-5", "input": "Hello!"}'更多用法见使用 Responses API。