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

# GPT-6.1 Sol

> 通过 AnyFast 使用 OpenAI GPT-6.1 Sol，处理复杂编码、智能体工作流、推理、视觉和结构化输出任务。

GPT-6.1 Sol 是 OpenAI 面向复杂编码、计算机操作和专业工作的均衡型模型。使用模型 ID `gpt-6.1-sol`，可调用 OpenAI 兼容的 Responses API `POST /v1/responses` 或 Chat Completions API `POST /v1/chat/completions`。

<Info>
  函数调用、结构化输出和提示词缓存优先使用 Responses API。AnyFast 的 Chat Completions 在 `reasoning_effort: "low"` 下也接受函数调用；Responses 路由符合 OpenAI 的工具调用建议。
</Info>

## 模型规格

| 属性 | 值 |
| - | - |
| 模型 ID | `gpt-6.1-sol` |
| 推荐接口 | Responses API |
| 输入 | 文本、图像 |
| 输出 | 文本 |
| 上下文窗口（官方规格） | 1,050,000 tokens |
| 最大输出 | 128,000 tokens |
| 知识截止时间 | 2026 年 4 月 30 日 |
| 推理强度 | `low`、`medium`、`high`、`xhigh`、`max` |
| 默认推理强度 | `medium` |
| 微调 | 不支持 |

## 适用场景

* 复杂软件工程和跨文件代码修改
* 使用函数调用的长流程智能体任务
* 多步骤规划、调试和技术分析
* 大上下文文档或代码仓库分析
* 结合文本与图像输入的视觉任务
* 受 JSON Schema 约束的结构化输出

## 快速开始

<Tabs sync={false}>
  <Tab title="Responses API">
    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/responses \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gpt-6.1-sol",
        "input": "检查这个重试设计，找出竞态条件，并给出安全的实施方案。",
        "reasoning": {
          "effort": "high",
          "summary": "auto"
        },
        "max_output_tokens": 4096
      }'
    ```
  </Tab>

  <Tab title="Chat Completions">
    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/chat/completions \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gpt-6.1-sol",
        "messages": [
          { "role": "user", "content": "给出一份简洁的部署检查清单。" }
        ],
        "reasoning_effort": "medium",
        "max_completion_tokens": 2048
      }'
    ```
  </Tab>
</Tabs>

## 工具调用

模型需要推理并调用工具时，使用 Responses API：

```bash cURL theme={null}
curl https://www.anyfast.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.1-sol",
    "input": "查询 api-gateway 的部署状态。",
    "reasoning": { "effort": "high" },
    "tools": [{
      "type": "function",
      "name": "get_deployment_status",
      "description": "返回服务当前的部署状态。",
      "parameters": {
        "type": "object",
        "properties": {
          "service": { "type": "string" }
        },
        "required": ["service"],
        "additionalProperties": false
      },
      "strict": true
    }],
    "tool_choice": "auto"
  }'
```

<Warning>
  AnyFast 在 `reasoning_effort: "low"` 下接受 Chat Completions 函数调用，并返回 `choices[].message.tool_calls` 与 `finish_reason: "tool_calls"`。OpenAI 建议通过 Responses API 调用工具。
</Warning>

## 推理与采样规则

| 推理强度 | 典型用途 |
| - | - |
| `low` | 轻量推理的日常任务 |
| `medium` | 通用编码和分析；默认值 |
| `high` | 复杂多步骤任务 |
| `xhigh` | 高难度专业和工程任务 |
| `max` | 最大推理深度 |

<Warning>
  GPT-6.1 Sol 不支持 `none` 推理强度。请移除 `temperature`、`top_p` 和 `top_logprobs`。Chat Completions 还需移除 `logprobs`；Responses 的 `include` 中不要请求 `message.output_text.logprobs`。
</Warning>

## 核心参数

| 参数 | 接口 | 说明 |
| - | - | - |
| `model` | 两者 | 必须为 `gpt-6.1-sol` |
| `input` | Responses | 文本或有序输入项 |
| `messages` | Chat Completions | 有序会话消息 |
| `reasoning.effort` | Responses | `low`、`medium`、`high`、`xhigh` 或 `max` |
| `reasoning_effort` | Chat Completions | 与 Responses 相同的推理强度 |
| `max_output_tokens` | Responses | 可见输出和推理 token 的上限，最高 128,000 |
| `max_completion_tokens` | Chat Completions | 补全和推理 token 的上限 |
| `tools` | 两者 | Responses 使用顶层函数定义；Chat Completions 使用 `function` 包装对象，AnyFast 已实测支持。 |
| `text.format` | Responses | 文本或严格 JSON Schema 输出配置 |
| `prompt_cache_options.ttl` | Responses | `30m` 请求已被接受，但实际保留时间尚未验证。 |
| `stream` | 两者 | 流式返回响应事件 |

<Note>
  AnyFast 实测 Responses JSON 中，文本位于 `type: "output_text"` 内容块的 `output[].content[].text`；函数调用是 `output[]` 中 `type: "function_call"` 的条目。原始响应没有顶层 `output_text` 字段，严格 JSON Schema 请求调用成功。`prompt_cache_options.ttl: "30m"` 请求返回 `prompt_cache_retention: "24h"`；短提示词未写入缓存，实际保留时间尚未验证。Chat Completions 请求使用公开 ID `gpt-6.1-sol`，响应则返回 `model: "azure/gpt-6.1-sol"`。
</Note>

<Card title="API 参考" icon="code" href="/zh/api-reference/model-api/openai/gpt-6.1-sol">
  查看 GPT-6.1 Sol API 参考。
</Card>

## 官方参考

* [GPT-6.1 Sol 模型页面](https://developers.openai.com/api/docs/models/gpt-6.1-sol)
* [GPT-6 使用指南](https://developers.openai.com/api/docs/guides/latest-model)

<script src="/public/feedback.js" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.