# viv-fast — API, Pricing & Context Window | Vivgrid

> Source: https://vivgrid.com/docs/models/viv-fast

viv-fast is Vivgrid's own fast, low-cost multimodal model: text and image input, a 1M-token context window, and up to 256K output tokens.

`viv-fast` is Vivgrid's SLM for fast, high-volume workloads. It accepts **text, image input**, keeps a **1M-token context window** and **256K-token max output**, supports **function calling**, and is priced at **\$0.13 per 1M input tokens**, **\$0.05 cached**, and **\$0.40 output**.

It is available on both OpenAI surfaces — **Chat Completions** (`/chat/completions`) and the **Responses API** (`/responses`) — so coding CLIs that expect the Responses wire format, such as [Codex](/docs/tutorials/codex) and [Pi](/docs/tutorials/pi), work against the same key.

## Specifications

| Field | Value |
| --- | --- |
| Provider | Vivgrid |
| Model ID | `viv-fast` |
| Best for | General-purpose |
| Available on | Chat Completions, Vibe coding |
| Context window | 1,000,000 tokens |
| Max output | 256,000 tokens |
| Modalities | Text, Image |
| Tool / function calling | Yes |
| Knowledge cutoff | 2026-09 |
| Acceleration | Geo-distributed — AMER, EMEA, APAC |

## Pricing

Pricing in USD per 1M tokens.

| Input | Cached input | Output |
| --- | --- | --- |
| $0.13 | $0.05 | $0.40 |

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


## Use viv-fast in your coding agent

`viv-fast` 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 `viv-fast` 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 = "viv-fast"
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 viv-fast`. See the full [Codex tutorial](/docs/tutorials/codex).

### OpenCode

[OpenCode](https://opencode.ai) has Vivgrid built in, so you can use `viv-fast` 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 `viv-fast` 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`), the endpoint `viv-fast` is catalogued on for coding agents:

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

Export your key and launch OpenCode:

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

Use `/models` to switch between `viv-fast` 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 `viv-fast` to the Vivgrid provider in `~/.pi/agent/models.json`. The provider defaults to Chat Completions, and `viv-fast` 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": "viv-fast",
          "api": "openai-responses",
          "input": ["text", "image"],
          "contextWindow": 1000000,
          "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": "viv-fast"
}
```

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/viv-fast
```

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

## API surfaces

The Vivgrid Console catalogs `viv-fast` 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 `viv-fast` 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": "viv-fast",
    "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": "viv-fast",
    "input": "Refactor this function and explain the change.",
    "stream": true
  }'
```


## Ideal use cases

- **High-volume agent loops** — cheap input and cached-input pricing keeps long, tool-heavy sessions affordable.
- **Multimodal understanding** — reason over screenshots, diagrams, and other images in the same request as text.
- **Long-context work** — feed large codebases, transcripts, or document sets into the 1M-token window.
- **Coding CLIs on the Responses API** — drop-in for tools such as Codex and Pi.

## Related models

- [gpt-6-astra](/docs/models/gpt-6-astra) — frontier model from OpenAI
- [claude-fable-5.1](/docs/models/claude-fable-5-1) — frontier model from Anthropic
- [gemini-3.8-flash](/docs/models/gemini-3.8-flash) — fast multimodal model from Google
- [deepseek-v4.1-flash](/docs/models/deepseek-v4.1-flash) — open-sourced fast, low-cost coding model
