> ## 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 Terra

> 通过 AnyFast 使用 GPT-6.1 Terra 完成视觉推理、计算机操作和清晰的文本写作。

GPT-6.1 Terra 是 OpenAI 面向视觉推理、精确计算机操作和清晰写作的快速高效模型。使用模型 ID `gpt-6.1-terra`，可调用 OpenAI 兼容的 Responses API `POST /v1/responses` 或 Chat Completions API `POST /v1/chat/completions`。

> [!NOTE]
>
> 函数调用、结构化输出和提示词缓存优先使用 Responses API。AnyFast 接受基本的 Chat Completions 文本请求，但在 `reasoning_effort: "low"` 下的 Chat Completions 函数调用返回了 `404 DeploymentNotFound`。

## 模型规格

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

## 适用场景

* 将商品照片匹配到目录条目，或解读技术图纸。
* 在目标明确的工作流中操作应用界面。
* 起草和修改简洁、自然的文本。
* 根据明确的验收标准完成范围有限的代码修复。
* 联合分析文本和图像输入。
* 生成符合严格 JSON Schema 的数据。

## 快速开始

**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-terra",
    "input": "总结这两份商品描述的主要区别。",
    "reasoning": { "effort": "medium" },
    "max_output_tokens": 1024
  }'
```

**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-terra",
    "messages": [
      { "role": "user", "content": "总结这份商品描述。" }
    ],
    "reasoning_effort": "medium",
    "max_completion_tokens": 1024
  }'
```

## 工具调用

模型需要推理并调用工具时，使用 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-terra",
    "input": "查询 Paris 的天气。",
    "reasoning": { "effort": "medium" },
    "tools": [{
      "type": "function",
      "name": "get_weather",
      "description": "查询城市天气。",
      "parameters": {
        "type": "object",
        "properties": {
          "city": { "type": "string" }
        },
        "required": ["city"],
        "additionalProperties": false
      },
      "strict": true
    }],
    "tool_choice": "required"
  }'
```

> [!WARNING]
>
> AnyFast 实测 Responses 请求返回了包含 `name`、`arguments` 和 `call_id` 的 `function_call` 条目。`reasoning_effort: "low"` 下的 Chat Completions 函数调用返回 `404 DeploymentNotFound`；工具调用请使用 Responses。

## 推理与采样规则

| 推理强度 | 典型用途 |
| - | - |
| `none` | 无需推理的简单任务 |
| `low` | 轻量推理的日常任务 |
| `medium` | 通用视觉分析和写作；默认值 |
| `high` | 较复杂的多步骤任务 |
| `xhigh` | 高难度视觉或计算机操作工作流 |
| `max` | 最大推理深度 |

> [!WARNING]
>
> AnyFast 的 Responses 请求已实测接受全部六档推理强度。在 `medium` 强度下设置 `temperature: 0.5` 会返回 HTTP 400，且 `error.param` 为 `"temperature"`。推理强度不为 `none` 时，请移除 `temperature`、`top_p` 和 `top_logprobs`。Chat Completions 还需移除 `logprobs`；Responses 的 `include` 中不要请求 `message.output_text.logprobs`。

## 核心参数

| 参数 | 接口 | 说明 |
| - | - | - |
| `model` | 两者 | 必须为 `gpt-6.1-terra` |
| `input` | Responses | 文本或有序输入项，包括图像 |
| `messages` | Chat Completions | 有序会话消息 |
| `reasoning.effort` | Responses | `none`、`low`、`medium`、`high`、`xhigh` 或 `max`；均已实测 |
| `reasoning_effort` | Chat Completions | 文本请求已实测支持 `medium` |
| `max_output_tokens` | Responses | 可见输出和推理 token 的上限，最高 128,000 |
| `max_completion_tokens` | Chat Completions | 补全和推理 token 的上限 |
| `tools` | Responses | 顶层函数工具定义 |
| `tool_choice` | Responses | 函数工具请求已实测支持 `required` |
| `text.format` | Responses | 严格 JSON Schema 输出已实测成功 |
| `prompt_cache_options.ttl` | Responses | `30m` 已被接受；有效保留时间尚未验证 |
| `stream` | 两者 | 流式返回响应事件；两种接口均已实测 |

> [!NOTE]
>
> AnyFast 实测 Responses JSON 中，文本位于 `output_text` 内容块的 `output[].content[].text`，函数调用位于 `output[]` 条目中。原始 JSON 没有顶层 `output_text` 字段，严格 JSON Schema 请求调用成功。`prompt_cache_options.ttl: "30m"` 请求返回 `prompt_cache_retention: "24h"`；短提示词未写入缓存。Chat Completions 返回 `model: "azure/gpt-6.1-terra"`，且缺少 `choices[].logprobs`。

> **[API 参考](https://docs.anyfast.ai/zh/api-reference/model-api/openai/gpt-6.1-terra.md)**
>
> 查看 GPT-6.1 Terra API 参考。

## 官方参考

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


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