跳转到内容
EN

读取响应

先调用「生成响应」,用返回的 ID 替换 resp_123。

GET/model/v1/responses/{response_id}● 支持

官方文档 ↗

请求参数

  • response_idstring必填

    path: Id of the stored response, the id returned by createResponse (it looks like resp_...). An unknown id, a response created with store false, an expired response and another tenant's response all answer 404.

返回

200 response

按 ID 读取一条已保存的响应。如果创建时 store 为 false,我们不会保存这次响应,读取会返回 404 response_not_found;超过保留期(默认 30 天)后读取也会返回同样的 404。

鉴权、限流、参数校验等平台错误按 problem+json 返回;OCR 的错误也为 problem+json,其它模型调用的错误按该端点所属格式(OpenAI 或 Anthropic)返回,参见 错误码

请求示例

curl
# 先调用「生成响应」,用返回的 ID 替换 resp_123。
curl https://api.deepraxis.com/model/v1/responses/resp_123 \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# 先调用「生成响应」,用返回的 ID 替换 resp_123。
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/model/v1",
    api_key="$PRAXIS_API_KEY",
)

resp = client.responses.retrieve("resp_123")
TypeScript
// 先调用「生成响应」,用返回的 ID 替换 resp_123。
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/model/v1",
  apiKey: "$PRAXIS_API_KEY",
});

const resp = await client.responses.retrieve("resp_123");

响应示例 200

{
  "id": "2923c78c-1c5a-4828-a44b-c3a37ce3531d",
  "object": "response",
  "created_at": 1791870818,
  "status": "completed",
  "background": false,
  "completed_at": 1791870819,
  "content_filters": null,
  "error": null,
  "frequency_penalty": 0,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": null,
  "max_tool_calls": null,
  "model": "deepseek-flash",
  "moderation": null,
  "output": [
    {
      "type": "reasoning",
      "id": "c60e99a3-579b-49e6-9ba7-f2d4123726c7",
      "status": "completed",
      "content": [
        {
          "type": "reasoning_text",
          "text": "你好呀!很高兴见到你。😊\n\n我是 DeepSeBy——一个乐于助人的 AI 助手。无论你想聊天、提问、写作、翻译、编程,还是解决某个具体问题,我都很乐意帮忙。\n\n今天有什么我可以为你做的吗?"
        }
      ],
      "summary": [],
      "encrypted_content": "2923c78c-1c5a-4828-a44b-c3a37ce3531d-0"
    },
    {
      "type": "message",
      "id": "41620f4e-c2df-4146-a823-3cb4237d4571",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "annotations": [],
          "logprobs": [],
          "text": "你好呀!很高兴见到你。😊\n\n我是 DeepSeBy,一个乐于助人的 AI 助手。无论你想聊天、提问、写作、翻译、编程,还是解决某个具体问题,我都很乐意帮忙。\n\n今天有什么我可以为你做的吗?"
        }
      ],
      "phase": "final_answer",
      "role": "assistant"
    }
  ],
  "parallel_tool_calls": true,
  "presence_penalty": 0,
  "previous_response_id": null,
  "prompt_cache_key": null,
  "prompt_cache_retention": null,
  "reasoning": {
    "effort": null,
    "summary": null
  },
  "safety_identifier": null,
  "service_tier": "default",
  "store": true,
  "temperature": 1,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": null
  },
  "tool_choice": "auto",
  "tools": [],
  "top_logprobs": 0,
  "top_p": 1,
  "truncation": "disabled",
  "usage": {
    "input_tokens": 31,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 107,
    "output_tokens_details": {
      "reasoning_tokens": 53
    },
    "total_tokens": 138
  },
  "user": null,
  "metadata": {}
}

响应

HTTP 200

Native Responses API response

application/json

名称 类型 说明
$ object