# Gemini 4 Neon API

Google's Gemini model for fast reasoning on complex coding and knowledge work.

Canonical page: https://routerhub.si/models/gemini-4-neon

- ID: `gemini-4-neon`
- Details and setup: https://routerhub.si/models/gemini-4-neon
- Provider: Google
- Variant: Standard
- Protocols: chat (OpenAI-compatible Chat Completions API, https://routerhub.si/v1/chat/completions)
- Availability: preview
- Input per million tokens: $0.75
- Output per million tokens: $3.75
- Cached input per million tokens (cache hit): $0.0375
- Context limit: 1,048,576 tokens
- Maximum input: 1,048,575 tokens
- Maximum output: 65,536 tokens
- Compatible tools: OpenCode, VS Code + Continue, VS Code + Cline, Hermes Agent, cURL / Python

## RouterHub vs Google API pricing

USD per 1 million tokens.

| Token type | RouterHub | Official API |
| --- | ---: | ---: |
| Input | $0.75 | $3 |
| Output | $3.75 | $15 |
| Cached input | $0.0375 | $0.15 |

RouterHub costs 75% less at 1,000 input and 500 output tokens, before caching.

[Official pricing source](https://ai.google.dev/gemini-api/docs/pricing#gemini-4-neon) · Checked 2026-11-22.


## cURL

```bash
curl --connect-timeout 30 --max-time 600 https://routerhub.si/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-4-neon","messages":[{"role":"user","content":"Write a short noir scene set in a lighthouse."}],"max_tokens":256}'
```

## Python

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ROUTERHUB_API_KEY"],
    base_url="https://routerhub.si/v1",
    timeout=600.0,
    max_retries=0,
)
response = client.chat.completions.create(
    model="gemini-4-neon",
    messages=[{"role": "user", "content": "Write a short noir scene set in a lighthouse."}],
    max_tokens=256,
)
print(response.choices[0].message.content)
```

## Setup guides

- OpenCode: https://routerhub.si/guides/opencode
- VS Code + Continue: https://routerhub.si/guides/vscode-continue
- VS Code + Cline: https://routerhub.si/guides/vscode-cline
- Hermes Agent: https://routerhub.si/docs/tools/hermes-agent
- cURL / Python: https://routerhub.si/docs/tools/api-request
