# gpt-6.1-terra — API, Pricing & Context Window | Vivgrid

> Source: https://vivgrid.com/docs/models/gpt-6.1-terra

gpt-6.1-terra on Vivgrid: OpenAI's fast, efficient model for visual reasoning, computer use, and writing, with a 1.05M-token context window, 128K max output, and geo-distributed acceleration.

`gpt-6.1-terra` is OpenAI's fast, efficient gpt-6 model for **visual reasoning, precise computer use, and clear, natural writing**, succeeding `gpt-5.6-terra`. It keeps the generation's **1.05M-token context window** and **128K-token max output** at $1.10 per 1M input tokens, under half of `gpt-5.6-terra`'s input and output price and between `gpt-6-luna` and `gpt-6.1-sol`.

On Vivgrid, `gpt-6.1-terra` is served through a single OpenAI-compatible endpoint with **geo-distributed acceleration across AMER, EMEA, and APAC**, reachable with the same unified key as the rest of the catalog. It is available on both **Chat Completions** (`/chat/completions`) and the **Responses API** (`/responses`).

## Specifications

| Field | Value |
| --- | --- |
| Provider | OpenAI |
| Model ID | `gpt-6.1-terra` |
| Best for | General-purpose |
| Available on | Chat Completions, Vibe coding |
| Context window | 1,050,000 tokens |
| Max output | 128,000 tokens |
| Modalities | Text, Image |
| Tool / function calling | Yes |
| Knowledge cutoff | 2026-06 |
| Acceleration | Geo-distributed — AMER, EMEA, APAC |

## Pricing

Pricing in USD per 1M tokens.

| Input | Cached input | Output |
| --- | --- | --- |
| $1.10 | $0.055 | $5.50 |

### What one request costs

The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.

| Request | Cost |
| --- | --- |
| Cold prompt, nothing cached | $0.0330 |
| Warm prompt, 90% of the input served from cache | $0.0142 |


Prompt caching is billed at **$1.375 per 1M cache-write tokens**, with cached reads at $0.055.

Requests beyond **272K input tokens** are billed at the long-context rate: $2.20 input / $0.11 cached input / $2.75 cache write / $8.25 output per 1M tokens.

## Use gpt-6.1-terra in your coding agent

`gpt-6.1-terra` works with the same Vivgrid key and `https://api.vivgrid.com/v1` endpoint as every other model in the catalog. Grab your API key from the [Vivgrid Console](https://console.vivgrid.com), then drop one of the configurations below into your agent of choice.

### Codex

Install Codex:

```bash
npm i -g @openai/codex
```

Add Vivgrid as a provider and make `gpt-6.1-terra` the default model in `~/.codex/config.toml`. Codex talks to Vivgrid over the **Responses API**:

```toml title="~/.codex/config.toml" lines icon="rust" highlight={1,2,14}
model = "gpt-6.1-terra"
model_provider = "vivgrid"
preferred_auth_method = "apikey"
forced_login_method = "api"

[features]
streamable_shell = true
unified_exec = true
shell_snapshot = true

[model_providers.vivgrid]
name = "Vivgrid"
base_url = "https://api.vivgrid.com/v1"
wire_api = "responses"
experimental_bearer_token = "viv-xxxxxxxxxxxxx"
```

Then start Codex in your project:

```bash
codex
```

Already using another Vivgrid model in Codex? Switch for a single run with `codex -m gpt-6.1-terra`. See the full [Codex tutorial](/docs/tutorials/codex).

### OpenCode

[OpenCode](https://opencode.ai) has Vivgrid built in, so you can use `gpt-6.1-terra` without writing any config: open `/models`, search for `vivgrid`, paste your API key and pick the model. The [OpenCode tutorial](/docs/tutorials/opencode) walks through it step by step.

Prefer to configure it by hand? Install OpenCode:

```bash
npm i -g opencode-ai
```

Declare `gpt-6.1-terra` under the Vivgrid provider in your global OpenCode config, `~/.config/opencode/opencode.json`. The `@ai-sdk/openai` provider talks to Vivgrid over the **Responses API** (`/v1/responses`):

```json title="~/.config/opencode/opencode.json" lines icon="json" highlight={3,6,9,10}
{
  "$schema": "https://opencode.ai/config.json",
  "model": "vivgrid/gpt-6.1-terra",
  "provider": {
    "vivgrid": {
      "npm": "@ai-sdk/openai",
      "name": "Vivgrid",
      "options": {
        "baseURL": "https://api.vivgrid.com/v1",
        "apiKey": "{env:VIVGRID_API_KEY}"
      },
      "models": {
        "gpt-6.1-terra": {
          "name": "gpt-6.1-terra",
          "tool_call": true,
          "attachment": true,
          "modalities": { "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1050000, "output": 128000 }
        }
      }
    }
  }
}
```

Export your key and launch OpenCode:

```bash
export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencode
```

Use `/models` to switch between `gpt-6.1-terra` and other Vivgrid models mid-session. See the full [OpenCode tutorial](/docs/tutorials/opencode).

### Pi

Install [Pi](https://pi.dev):

```bash
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
```

Add `gpt-6.1-terra` to the Vivgrid provider in `~/.pi/agent/models.json`. The provider defaults to Chat Completions, and `gpt-6.1-terra` overrides `api` at the model level to use the **Responses API** (`/v1/responses`):

```json title="~/.pi/agent/models.json" lines icon="json" highlight={4,5,12,13}
{
  "providers": {
    "vivgrid": {
      "baseUrl": "https://api.vivgrid.com/v1",
      "apiKey": "viv-xxxxxxxxxxxxx",
      "api": "openai-completions",
      "compat": {
        "sendSessionAffinityHeaders": true
      },
      "models": [
        {
          "id": "gpt-6.1-terra",
          "api": "openai-responses",
          "input": ["text", "image"],
          "contextWindow": 1050000,
          "maxTokens": 128000
        }
      ]
    }
  }
}
```

Make it the model Pi starts with in `~/.pi/agent/settings.json`:

```json title="~/.pi/agent/settings.json" lines icon="json" highlight={2,3}
{
  "defaultProvider": "vivgrid",
  "defaultModel": "gpt-6.1-terra"
}
```

Then verify and start Pi:

```bash
pi --list-models vivgrid
pi
```

Or run a one-shot prompt without entering the TUI:

```bash
pi -p "explain the auth flow in this repo" --model vivgrid/gpt-6.1-terra
```

See the full [Pi tutorial](/docs/tutorials/pi).

## API surfaces

The Vivgrid Console catalogs `gpt-6.1-terra` on 2 surfaces, all behind the same API key. The endpoint shown is the one the Console previews for that surface.

| Surface | Primary endpoint | Use it for |
| --- | --- | --- |
| Chat Completions | `/chat/completions` | Agent projects, where Vivgrid injects the model, system prompt and tools server-side, and Model API calls that name the model per request. |
| Vibe coding | `/responses` | Coding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop. |

## Quick start

Get an API key from the Vivgrid Console (https://console.vivgrid.com), then call `gpt-6.1-terra` directly.

### `/chat/completions`

```bash
curl https://api.vivgrid.com/v1/chat/completions \
  -H "Authorization: Bearer $VIVGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.1-terra",
    "messages": [
      { "role": "user", "content": "Say hello in English, Chinese and Spanish." }
    ],
    "stream": true
  }'
```

### `/responses`

```bash
curl https://api.vivgrid.com/v1/responses \
  -H "Authorization: Bearer $VIVGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.1-terra",
    "input": "Refactor this function and explain the change.",
    "stream": true
  }'
```

## Choosing within the gpt-6 family

Prices are USD per 1M tokens at the base rate.

| Model | Context | Max output | Input | Output |
| --- | --- | --- | --- | --- |
| [`gpt-6-astra`](/docs/models/gpt-6-astra) | 1,050,000 | 128,000 | $10.00 | $50.00 |
| [`gpt-6.1-sol`](/docs/models/gpt-6.1-sol) | 1,050,000 | 128,000 | $2.00 | $10.00 |
| [`gpt-6-sol`](/docs/models/gpt-6-sol) | 1,050,000 | 128,000 | $2.00 | $10.00 |
| `gpt-6.1-terra` (this page) | 1,050,000 | 128,000 | $1.10 | $5.50 |
| [`gpt-6-luna`](/docs/models/gpt-6-luna) | 1,050,000 | 128,000 | $0.10 | $0.50 |


## Ideal use cases

- Visual reasoning over screenshots, charts, and scanned documents
- Computer-use agents that need precise, step-by-step UI actions
- Clear, natural writing: drafting, editing, and customer-facing replies
- Long-document and long-conversation work within a 1.05M-token context

## Related models

- [gpt-5.6-terra](/docs/models/gpt-5.6-terra) — the prior terra release, from the gpt-5.6 generation
- [gpt-6.1-sol](/docs/models/gpt-6.1-sol) — the balanced gpt-6 model for coding agents
- [gpt-6-luna](/docs/models/gpt-6-luna) — the fast, low-cost gpt-6 model
