> ## 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 Responses 或 Chat Completions。

> [!NOTE]
>
> 需要推理与工具调用时使用 Responses API。AnyFast 接受 Chat Completions 文本请求，但低强度函数调用返回 `404 DeploymentNotFound`。

> [!NOTE]
>
> Responses 返回 `model: "gpt-6.1-terra"`；Chat Completions 返回 `model: "azure/gpt-6.1-terra"`，且缺少 `choices[].logprobs`。`prompt_cache_options.ttl: "30m"` 请求返回 `prompt_cache_retention: "24h"`；有效缓存时长尚未验证。


## OpenAPI

````yaml zh/api-reference/model-api/openai/openapi/gpt-6.1-terra/openapi.yaml POST /v1/responses
openapi: 3.1.0
info:
  title: GPT-6.1 Terra
  description: 通过 AnyFast 创建 GPT-6.1 Terra Responses 响应和聊天补全。
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/responses:
    post:
      summary: 创建 GPT-6.1 Terra 响应
      description: 根据文本或图像输入创建响应。函数调用、严格 JSON Schema 输出和缓存请求字段均已在 AnyFast 实测。
      operationId: createResponseGPT61Terra
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResponseRequest'
      responses:
        '200':
          description: 成功创建响应。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
        '400':
          description: 请求无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 缺少 API Key 或 API Key 无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            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
              }'
components:
  schemas:
    CreateResponseRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - gpt-6.1-terra
        input:
          oneOf:
            - type: string
            - type: array
              minItems: 1
              items:
                type: object
                additionalProperties: true
          description: 文本或有序输入项，包括图像内容。
        reasoning:
          type: object
          properties:
            effort:
              type: string
              enum:
                - none
                - low
                - medium
                - high
                - xhigh
                - max
              default: medium
        max_output_tokens:
          type: integer
          minimum: 1
          maximum: 128000
          description: 输出和推理 token 的总上限。
        stream:
          type: boolean
          default: false
        text:
          type: object
          description: 文本输出配置；严格 JSON Schema 格式已实测。
          properties:
            format:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - text
                    - json_schema
                name:
                  type: string
                schema:
                  type: object
                  additionalProperties: true
                strict:
                  type: boolean
        prompt_cache_options:
          type: object
          description: 已接受 30m TTL 请求；有效保留时间尚未验证。
          properties:
            ttl:
              type: string
              enum:
                - 30m
        tools:
          type: array
          description: Responses 函数工具已在 AnyFast 实测。
          items:
            type: object
            required:
              - type
              - name
              - parameters
            properties:
              type:
                type: string
                enum:
                  - function
              name:
                type: string
              description:
                type: string
              parameters:
                type: object
                additionalProperties: true
              strict:
                type: boolean
        tool_choice:
          type: string
          description: '`required` 已通过函数工具请求实测。'
          example: required
    ResponseObject:
      type: object
      required:
        - id
        - object
        - created_at
        - model
        - status
        - output
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - response
        created_at:
          type: integer
          description: 响应创建时的 Unix 时间戳。
        completed_at:
          type: integer
          description: 响应完成时的 Unix 时间戳。
        model:
          type: string
          example: gpt-6.1-terra
        status:
          type: string
          enum:
            - completed
            - failed
            - in_progress
            - cancelled
            - queued
            - incomplete
        output:
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              type:
                type: string
                description: 实测值包括 message、reasoning 和 function_call。
              status:
                type: string
              role:
                type: string
              content:
                type: array
                items:
                  type: object
                  additionalProperties: true
                  properties:
                    type:
                      type: string
                      description: 文本位于 output_text 内容块中。
                    text:
                      type: string
              name:
                type: string
              arguments:
                type: string
              call_id:
                type: string
        reasoning:
          type: object
          properties:
            effort:
              type: string
            context:
              type: string
            mode:
              type: string
        prompt_cache_retention:
          type: string
          description: 实测 30m TTL 请求在此处返回 24h；短请求未发生缓存写入。
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            input_tokens_details:
              type: object
              properties:
                cached_tokens:
                  type: integer
                cache_write_tokens:
                  type: integer
            output_tokens:
              type: integer
            output_tokens_details:
              type: object
              properties:
                reasoning_tokens:
                  type: integer
            total_tokens:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            type:
              type: string
            param:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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