> ## Documentation Index
> Fetch the complete documentation index at: https://bianxieai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建响应

> 使用 Responses 工作流生成模型输出

| 字段                          | 类型           | 必填 | 说明                     |
| --------------------------- | ------------ | -- | ---------------------- |
| `model`                     | string       | 是  | 模型 ID。                 |
| `input`                     | string/array | 是  | 文本或输入项列表。              |
| `instructions`              | string       | 否  | 本次响应的系统级指令。            |
| `max_output_tokens`         | integer      | 否  | 输出 token 上限。           |
| `stream`                    | boolean      | 否  | 返回 SSE 事件流。            |
| `tools`, `tool_choice`      | array/mixed  | 否  | 工具定义及选择策略。             |
| `text`                      | object       | 否  | 文本格式配置，包括 JSON Schema。 |
| `temperature`, `top_p`      | number       | 否  | 采样设置。                  |
| `previous_response_id`      | string       | 否  | 延续先前响应。                |
| `store`, `metadata`, `user` | mixed        | 否  | 存储、元数据与用户标识。           |
| `include`                   | array        | 否  | 请求在响应中附带额外数据。          |

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.bianxie.ai/v1/responses \
    -H "Authorization: Bearer API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "your-model",
      "input": "你好"
    }'
  ```

  ```python Python theme={null}
  client.responses.create(model="your-model", input="你好")
  ```

  ```javascript Node.js theme={null}
  await client.responses.create({ model: "your-model", input: "Hello" });
  ```
</CodeGroup>

响应包含 `id`、`status`、`model`、`output[]`、`usage` 与错误信息。文本通常位于 `output` 中的 `output_text` 内容项。流式模式返回带类型的响应事件。
