Developer Dashboard

New Model Added: GPT-6.1 Terra ​

Date: 2026-10-27 / (1405-08-05)

Summary ​

GPT-6.1 Terra is now available through AvalAI for visual reasoning, writing, and computer-use workflows. Use gpt-6.1-terra on Chat Completions or Responses, with standard rates of $1.00 per million input tokens and $5.00 per million output tokens.

Details ​

OpenAI: GPT-6.1 Terra ​

GPT-6.1 Terra is OpenAI's fast, efficient reasoning model for interpreting images, working with application screens, and producing clearer, more natural text. Typical uses include comparing product photos with catalog entries, interpreting technical drawings, reading invoices, and drafting or revising proposals. It also supports coding tasks; evaluate GPT-6.1 Sol or GPT-6 Astra for the most demanding software-engineering work.

OpenAI reports improvements over GPT-5.6 Terra in visual reasoning, computer use, factuality, and coding. Those provider evaluations describe the upstream model; they are not latency, accuracy, or cost-per-task guarantees for an AvalAI integration. See the OpenAI provider guide.

Model capabilities and access ​

ItemGPT-6.1 Terra
Exact AvalAI model IDgpt-6.1-terra
Enabled AvalAI endpointsPOST /v1/chat/completions, POST /v1/responses
Minimum AvalAI account tierTier 0
Maximum input tokens922,000
Maximum output tokens128,000
Shared context reported by OpenAI1,050,000 tokens
Input / outputText and image input; text output
Model capabilitiesReasoning, vision, PDF input, structured outputs, and prompt caching
Tool callingRequires Responses for this model

Input, output, and reasoning must fit the shared context. The separate input/output ceilings do not promise that every account can send a request at those maxima: account token and request rate limits also apply. Check rate limits before sizing a large workload.

For existing chat integrations, start with a text request on /v1/chat/completions. Choose /v1/responses for new Terra tool-calling workflows. OpenAI specifies that Terra tool calling requires Responses, so do not attach this model to an existing Chat Completions tools loop without migrating the loop. This release enables the two endpoints listed above; Messages and Batch are not announced for Terra through AvalAI.

Computer use is a model capability that an application can build on by supplying a supported tool and execution environment. The text examples below do not execute desktop actions. Check the chosen AvalAI route's support before adding hosted tools, image/PDF transport, or other optional features; Terra's text output is distinct from direct image generation.

Pricing ​

All rates are AvalAI prices in USD per 1,000,000 tokens:

Total request input lengthInputCached inputCache creation inputOutput
Up to and including 272K tokens$1.00$0.05$1.25$5.00
Above 272K tokens$2.00$0.10$2.50$7.50

Exactly 272,000 input tokens uses the lower tier. Above that boundary, the higher rates apply to the full request, including its output; this is not a surcharge on only the excess input tokens. The boundary selects a pricing tier, not a context limit.

Standard cached-input reads are 95% cheaper than ordinary input. Cache creation is a separate billing category where it is charged; count a token once in its applicable input category rather than charging it again as ordinary input. A listed cache rate does not guarantee a cache hit, a retention period, or support for a particular cache-control field. Reasoning tokens count toward billed output.

For example, 1,000 uncached input tokens and 200 output tokens cost (1000 × 1.00 + 200 × 5.00) / 1,000,000 = $0.002, before any separately charged tools. With 300,000 uncached input tokens and 1,000 output tokens, the full-request higher tier gives (300000 × 2.00 + 1000 × 7.50) / 1,000,000 = $0.6075.

These standard token rates are half GPT-6.1 Sol's corresponding standard rates. OpenAI's Batch/Flex discounts, Fast-mode pricing, hosted-tool charges, and product subscription allowances are separate from the AvalAI endpoint support announced here. See AvalAI pricing and prompt caching.

API request and response examples ​

Set AVALAI_API_KEY in your server-side environment and use the OpenAI Python or JavaScript SDK for the SDK tabs. Configure the SDK with AvalAI's https://api.avalai.ir/v1 base URL. Each program makes one request, with a 60-second timeout and no automatic retry; curl also has a 10-second connection timeout.

The examples leave reasoning effort at the model default and allow up to 2,048 output tokens. Both output-budget fields include reasoning tokens, so a reasoning-heavy request can use the budget before producing final text. Adjust the budget and deadline for your task within the model and account limits.

The response JSON below is illustrative, not captured from a live AvalAI request. IDs, timestamps, answers, usage counts, and exchange rates are sample values. Optional response fields may differ or be absent. estimated_cost, when present, is AvalAI accounting metadata; use actual returned usage and the User API for cost tracking.

Chat Completions ​

Chat Completions uses messages and the max_completion_tokens output budget. Read the assistant's final text from choices[0].message.content.

bash
curl --silent --show-error --fail-with-body \
  --connect-timeout 10 --max-time 60 --retry 0 \
  https://api.avalai.ir/v1/chat/completions \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "model": "gpt-6.1-terra",
    "messages": [
      {
        "role": "user",
        "content": "In one sentence, explain why clear API error messages help developers."
      }
    ],
    "max_completion_tokens": 2048
  }'
python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AVALAI_API_KEY"],
    base_url="https://api.avalai.ir/v1",
    timeout=60.0,
    max_retries=0,
)

completion = client.chat.completions.create(
    model="gpt-6.1-terra",
    messages=[
        {
            "role": "user",
            "content": "In one sentence, explain why clear API error messages help developers.",
        }
    ],
    max_completion_tokens=2048,
)

print(completion.choices[0].message.content)
javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AVALAI_API_KEY,
  baseURL: "https://api.avalai.ir/v1",
  timeout: 60_000,
  maxRetries: 0,
});

const completion = await client.chat.completions.create({
  model: "gpt-6.1-terra",
  messages: [
    {
      role: "user",
      content: "In one sentence, explain why clear API error messages help developers.",
    },
  ],
  max_completion_tokens: 2048,
});

console.log(completion.choices[0].message.content);

Illustrative success response:

json
{
  "id": "chatcmpl-terra-example",
  "object": "chat.completion",
  "created": 1793102400,
  "model": "gpt-6.1-terra",
  "system_fingerprint": null,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Clear API error messages help developers identify the cause of a failure and choose the right fix.",
        "refusal": null,
        "annotations": []
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 100,
    "total_tokens": 120,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "audio_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 80,
      "audio_tokens": 0,
      "accepted_prediction_tokens": 0,
      "rejected_prediction_tokens": 0
    }
  },
  "service_tier": "default",
  "estimated_cost": {
    "unit": "0.0005200000",
    "irt": 52.0,
    "exchange_rate": 100000
  }
}

The illustrative 100 completion tokens include 80 reasoning tokens. At the lower tier, (20 × 1.00 + 100 × 5.00) / 1,000,000 = $0.00052. The example exchange rate of 100,000 Tomans/USD gives 52 Tomans; it is not a current exchange-rate quote. Inspect finish_reason; length can indicate that the completion budget was exhausted.

Responses ​

Responses uses input and max_output_tokens. store: false avoids relying on stored-response retrieval for this example; it does not establish a zero-data-retention policy. Read final text with SDK response.output_text. In raw JSON, scan typed output items for messages containing output_text content; reasoning and tool items can appear before a message.

bash
curl --silent --show-error --fail-with-body \
  --connect-timeout 10 --max-time 60 --retry 0 \
  https://api.avalai.ir/v1/responses \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "model": "gpt-6.1-terra",
    "input": "In one sentence, explain why clear API error messages help developers.",
    "max_output_tokens": 2048,
    "store": false
  }'
python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AVALAI_API_KEY"],
    base_url="https://api.avalai.ir/v1",
    timeout=60.0,
    max_retries=0,
)

response = client.responses.create(
    model="gpt-6.1-terra",
    input="In one sentence, explain why clear API error messages help developers.",
    max_output_tokens=2048,
    store=False,
)

print(response.output_text)
javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AVALAI_API_KEY,
  baseURL: "https://api.avalai.ir/v1",
  timeout: 60_000,
  maxRetries: 0,
});

const response = await client.responses.create({
  model: "gpt-6.1-terra",
  input: "In one sentence, explain why clear API error messages help developers.",
  max_output_tokens: 2048,
  store: false,
});

console.log(response.output_text);

Illustrative success response:

json
{
  "id": "resp_terra_example",
  "object": "response",
  "created_at": 1793102400,
  "status": "completed",
  "completed_at": 1793102401,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": 2048,
  "model": "gpt-6.1-terra",
  "output": [
    {
      "id": "rs_terra_example",
      "type": "reasoning",
      "summary": []
    },
    {
      "id": "msg_terra_example",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Clear API error messages help developers identify the cause of a failure and choose the right fix.",
          "annotations": [],
          "logprobs": []
        }
      ]
    }
  ],
  "parallel_tool_calls": true,
  "previous_response_id": null,
  "reasoning": {
    "effort": "medium",
    "summary": null
  },
  "store": false,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "tool_choice": "auto",
  "tools": [],
  "truncation": "disabled",
  "usage": {
    "input_tokens": 20,
    "input_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 0
    },
    "output_tokens": 100,
    "output_tokens_details": {
      "reasoning_tokens": 80
    },
    "total_tokens": 120
  },
  "user": null,
  "metadata": {},
  "estimated_cost": {
    "unit": "0.0005200000",
    "irt": 52.0,
    "exchange_rate": 100000
  }
}

The sample uses the same illustrative token/cost arithmetic as the chat response. output_tokens includes the 80 reasoning tokens. A raw Responses object does not need a top-level output_text field; that convenient accessor belongs to the SDK. Check status, error, and incomplete_details before treating a response as a completed answer.

Reasoning, tools, and integration guidance ​

OpenAI documents none, low, medium (the default), high, xhigh, and max reasoning effort for Terra. minimal is not listed. On Chat Completions the field is reasoning_effort; on Responses it is nested as reasoning: {"effort": "medium"}. Start with the default, then compare quality, time, and billed tokens on representative tasks before changing it. Higher effort can improve difficult reasoning while increasing latency and output usage.

For tool migration, use the Responses request schema rather than copying Chat's nested tools[].function shape. A Responses function has type: "function", name, description, and parameters on the tool itself. Handle returned function calls and send matching function_call_output items through an application-controlled loop. Follow function calling and the Responses reference for the complete contract; hosted tools still require the selected AvalAI route to support them.

For images, use the selected endpoint's documented image-input structure, and verify transport with representative inputs before using it in production. For structured output, use Chat response_format or Responses text.format with a supported schema. The baseline examples above establish neither optional feature through live execution. See vision and structured outputs.

When diagnosing a failed request, retain the HTTP status, error body, and avalai-request-id. Correct invalid parameters or credentials before retrying. A terminal quota error requires account intervention; repeated unchanged requests will not fix it. For timeout, incomplete output, or transient overload, inspect the actual result and the application's retry policy before making another potentially billable request.