Rates are the upstream official list price — zero markup, published line by line on pricing→
← All models

Google · Gemini

Gemini 3.1 Pro API

The preview release of Gemini 3.1 Pro. Preview models can change in behaviour and price upstream.

Gemini 3.1 Pro is made by Google. On PixCode it is billed at the upstream official list price with zero markup: $2.00 input and $12.00 output per million tokens, with a 1M context window.

It speaks the OpenAI protocol only (/v1/chat/completions), so it cannot be plugged into Claude Code directly; use it in opencode, Cline, Roo Code or any OpenAI SDK.

Mind the tiered price: when a request’s prompt (including cache) exceeds 200k tokens, the whole request is billed at $4.00 input / $18.00 output.

Explicit prompt caching is supported: cache reads at $0.20, cache writes at $0.375 (5 min).

1M

Context window

$2.00

Input / 1M tokens

$12.00

Output / 1M tokens

OpenAI only

Protocols

Rates

USD per million tokens, read live from the gateway — the same data your charges come from.

ItemStandardAbove 200k
Cache read$0.20$0.40
Input$2.00$4.00
Output$12.00$18.00
Cache write (5 min)$0.375$0.375

Which tools can use it

It depends on the protocol. Claude Code only speaks Anthropic; Roo Code, Kilo Code and Goose use OpenAI; opencode, Cline, Zed and Factory Droid can be configured either way.

  • Claude CodeNot supported
  • opencodeOpenAI endpoint
  • ClineOpenAI endpoint
  • Roo CodeOpenAI endpoint
  • Kilo CodeOpenAI endpoint
  • Factory DroidOpenAI endpoint
  • ZedOpenAI endpoint
  • GooseOpenAI endpoint

Setup

Replace sk-px-... with the API key from your dashboard. Other tools are covered in the docs.

opencode · ~/.config/opencode/opencode.json
{
  "provider": {
    "pixcode": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "PixCode",
      "options": {
        "baseURL": "https://api.pixcode.ai/v1",
        "apiKey": "sk-px-..."
      },
      "models": {
        "gemini-3.1-pro-preview": { "name": "Gemini 3.1 Pro" }
      }
    }
  },
  "model": "pixcode/gemini-3.1-pro-preview"
}
OpenAI-compatible · curl
curl https://api.pixcode.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-px-..." \
  -H "Content-Type: application/json" \
  -d '{"model": "gemini-3.1-pro-preview", "messages": [{"role": "user", "content": "Hello"}]}'

Across the family

Every Gemini model on PixCode, in USD per million tokens.

ModelContextInputOutput
gemini-3.1-pro-previewthis page1M$2.00$12.00
gemini-4-argon1M$2.00$10.00
gemini-3.5-flash1M$1.50$9.00
gemini-3.8-flash1M$0.75$3.75
gemini-3.8-flash-dst1M$0.75$3.75
gemini-3.7-flash1M$0.75$3.75
gemini-3.6-flash1M$0.75$3.75
gemini-3.5-flash-lite1M$0.30$2.50

One base URL, 60 models.

A monthly Pass converts 1:1 into crystals, billed at the upstream official list price with zero markup. Purchased crystals never expire.