---
title: Responses
description: 使用 Responses 协议提交输入，适用于支持此协议的模型与编程客户端。
api: "POST /v1/responses"
---

<RequestExample>
```bash 非流式
curl https://sub.vcnovb.cn/v1/responses \
  -H "Authorization: Bearer $VC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.2","input":"写一个判断偶数的 Python 函数。","stream":false}'
```
```bash 流式
curl -N https://sub.vcnovb.cn/v1/responses \
  -H "Authorization: Bearer $VC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.2","input":"写一个判断偶数的 Python 函数。","stream":true}'
```
</RequestExample>

## 请求参数

<ParamField body="model" type="string" required>支持 Responses 协议的可用模型。</ParamField>
<ParamField body="input" type="string | array" required>简单请求可传字符串；结构化输入需使用 Responses 格式。</ParamField>
<ParamField body="stream" type="boolean">开启后返回事件流，需要持续消费事件。</ParamField>

## 返回结果

请求使用 `input` 提交输入，响应中的 `output` 包含消息及工具调用。非流式文本可从消息项的 `content` 中读取 `output_text` 类型的内容。

流式响应采用 SSE。客户端需处理文本增量、完成和失败事件；遇到失败事件时读取其中的错误信息。

## Codex 接入

在密钥页面打开使用说明并选择 Codex，使用控制台生成的配置。详见[客户端配置](/guides/clients)。

