1. 文本/多模态
dongzhou.cloud
  • API通用说明
  • 图像
    • 文生图
      POST
    • 图编辑
      POST
  • 文本/多模态
    • Responses Api
      POST
  1. 文本/多模态

Responses Api

POST
https://portal.dongzhou.cloud/v1/responses
💡
1.
一个通用模型调用接口,用于替代之前的接口/v1/chat/completions该接口用于向模型提交输入内容,并获取模型生成的响应结果。
2.
相比单一用途接口,它适合承载更多类型的任务,例如文本生成、对话问答、多模态理解、结构化输出、工具调用等。

请求参数

Header 参数

Body 参数application/json必填

示例

返回响应

🟢200非流式
application/json
Bodyapplication/json

🟢200流式
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://portal.dongzhou.cloud/v1/responses' \
--header 'authorization: Bearer sk-6IDxxxxxx' \
--header 'content-type: application/json' \
--data '{
    "model": "gpt-5.5",
    "input": "帮我生成一张高清黄山风景图",
    "instructions": "你是专业AI绘图师",
    "stream": true,
    "store": false
}'
响应示例响应示例
200 - 非流式 - 示例 1
{
    "id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b",
    "object": "response",
    "created_at": 1741476542,
    "status": "completed",
    "completed_at": 1741476543,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "model": "gpt-5.4",
    "output": [
        {
            "type": "message",
            "id": "msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b",
            "status": "completed",
            "role": "assistant",
            "content": [
                {
                    "type": "output_text",
                    "text": "In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.",
                    "annotations": []
                }
            ]
        }
    ],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "reasoning": {
        "effort": null,
        "summary": null
    },
    "store": true,
    "temperature": 1.0,
    "text": {
        "format": {
            "type": "text"
        }
    },
    "tool_choice": "auto",
    "tools": [],
    "top_p": 1.0,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 36,
        "input_tokens_details": {
            "cached_tokens": 0
        },
        "output_tokens": 87,
        "output_tokens_details": {
            "reasoning_tokens": 0
        },
        "total_tokens": 123
    },
    "user": null,
    "metadata": {}
}
修改于 2026-05-15 06:16:13
上一页
图编辑
Built with