# gemini-4-argon — API, Pricing & Context Window | Vivgrid

> Source: https://vivgrid.com/docs/models/gemini-4-argon

gemini-4-argon on Vivgrid: Google's flagship reasoning and coding model with a 1M-token context window, 1M max output, and text, image, video, audio, and PDF input.

`gemini-4-argon` is Google's flagship reasoning model in the Gemini 4 series, succeeding [`gemini-3.1-pro-preview`](/docs/models/gemini-3.1-pro-preview) for complex software engineering, deep mathematical and scientific problem solving, and long-horizon autonomous agents. It pairs a **~1.05M-token context window** with up to **~1.05M max output tokens** and accepts **text, image, video, audio, and PDF** inputs.

On Vivgrid, `gemini-4-argon` runs as a globally centralized model reachable through the same OpenAI-compatible endpoint and unified key as every other model in the catalog.

## Specifications

| Field | Value |
| --- | --- |
| Provider | Google |
| Model ID | `gemini-4-argon` |
| Best for | Coding |
| Available on | Chat Completions, Vibe coding |
| Context window | 1,048,576 tokens |
| Max output | 1,048,576 tokens |
| Modalities | Text, Image, Video, Audio, PDF |
| Tool / function calling | Yes |
| Knowledge cutoff | 2026-03 |
| Acceleration | Global (centralized) |

## Pricing

Pricing in USD per 1M tokens.

| Input | Cached input | Output |
| --- | --- | --- |
| $4.00 | $0.20 | $20.00 |

### 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.1200 |
| Warm prompt, 90% of the input served from cache | $0.0516 |


Input is priced at **\$4.00 per 1M tokens**, cached input at **\$0.20 per 1M tokens**, and output (including thinking tokens) at **\$20.00 per 1M tokens**, with a single flat rate across the full context window.

## Use gemini-4-argon in your coding agent

`gemini-4-argon` 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.

### OpenCode

[OpenCode](https://opencode.ai) has Vivgrid built in, so you can use `gemini-4-argon` 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 `gemini-4-argon` under the Vivgrid provider in your global OpenCode config, `~/.config/opencode/opencode.json`. The `@ai-sdk/openai-compatible` provider talks to Vivgrid over **Chat Completions** (`/v1/chat/completions`):

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

Export your key and launch OpenCode:

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

Use `/models` to switch between `gemini-4-argon` 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 `gemini-4-argon` to the Vivgrid provider in `~/.pi/agent/models.json`. Pi talks to Vivgrid over **Chat Completions** (`/v1/chat/completions`):

```json title="~/.pi/agent/models.json" lines icon="json" highlight={4,5,9}
{
  "providers": {
    "vivgrid": {
      "baseUrl": "https://api.vivgrid.com/v1",
      "apiKey": "viv-xxxxxxxxxxxxx",
      "api": "openai-completions",
      "models": [
        {
          "id": "gemini-4-argon",
          "input": ["text", "image"],
          "contextWindow": 1048576,
          "maxTokens": 1048576
        }
      ]
    }
  }
}
```

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": "gemini-4-argon"
}
```

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/gemini-4-argon
```

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

## API surfaces

The Vivgrid Console catalogs `gemini-4-argon` 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 | `/chat/completions` | 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 `gemini-4-argon` directly.

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

## Choosing within the Gemini family

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

| Model | Context | Max output | Input | Output |
| --- | --- | --- | --- | --- |
| `gemini-4-argon` (this page) | 1,048,576 | 1,048,576 | $4.00 | $20.00 |
| [`gemini-3.8-flash`](/docs/models/gemini-3.8-flash) | 1,000,000 | 128,000 | $0.75 | $3.75 |


## Ideal use cases

- Complex software engineering and multi-step autonomous coding agents
- Deep mathematical, scientific, and cybersecurity reasoning
- Multimodal document, image, video, and audio synthesis up to ~1M tokens
- Long-horizon generation and analysis with up to ~1M output tokens

## Related models

- [gemini-3.1-pro-preview](/docs/models/gemini-3.1-pro-preview) — the prior high-end Gemini release
- [gemini-3.8-flash](/docs/models/gemini-3.8-flash) — faster, lower-cost Gemini sibling
- [gpt-6-astra](/docs/models/gpt-6-astra) — OpenAI's frontier gpt-6 coding model
