Gemini 4 Neon API Setup & Coding Guide (1M Context)

Run gemini-4-neon via standard OpenAI POST /v1/chat/completions (https://deepclub.net/v1) for fast end-to-end 1M-context coding across Cursor, Cline, Roo Code, and Python/TypeScript SDKs.

Parameter Details
Live Model IDs gemini-4-neon
Endpoint POST /v1/chat/completions
SDK Base URL https://deepclub.net/v1 (OpenAI SDK)
Billing & Privacy Per 1M tokens (including prompt cache rates). See Live Pricing; site-wide Zero Data Retention (ZDR)

1. Where Gemini 4 Neon Fits in the Gemini 4 Lineup

Google positions gemini-4-neon for frontier intelligence + fast end-to-end task completion. Unlike slower ultra-heavy reasoners, Neon keeps wall-clock turnaround tight while preserving a full 1M token context window and 64K–1M max output:

2. Production Python Streaming Template (OpenAI SDK)

On DeepClub, all Gemini 4 text models run over POST /v1/chat/completions. Do not point google-genai at generateContent:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://deepclub.net/v1",
    api_key=os.environ["DEEPCLUB_API_KEY"],
)

stream = client.chat.completions.create(
    model="gemini-4-neon",
    messages=[
        {"role": "system", "content": "You are a senior backend engineer. Output minimal diffs."},
        {"role": "user", "content": "Add idempotent retry handling for HTTP 429 and 5xx only."},
    ],
    stream=True,
    stream_options={"include_usage": True},
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
    if chunk.usage:
        print(f"\n[usage] in={chunk.usage.prompt_tokens} out={chunk.usage.completion_tokens}")

3. IDE & Vercel AI SDK 5+ Quick Rules

  1. Cursor / Cline / Roo Code: Choose OpenAI Compatible, set Base URL to https://deepclub.net/v1, and enter exact Model ID gemini-4-neon (no google/ prefix).
  2. Vercel AI SDK 5+: Explicitly call createOpenAI({ baseURL: 'https://deepclub.net/v1' }).chat('gemini-4-neon') so AI SDK sends /v1/chat/completions instead of /v1/responses.
  3. Keep system prompt prefixes stable: Put static repo conventions and file context first so repeat turns hit discounted cache_read billing.

Frequently Asked Questions

Does DeepClub use Google native generateContent for gemini-4-neon?

No. DeepClub exposes Gemini 4 text models through standard OpenAI-compatible POST /v1/chat/completions at https://deepclub.net/v1 so every IDE plugin and OpenAI SDK works out of the box.

How does Gemini 4 Neon compare to Claude Opus 5.5 and GPT-6.2 Sol?

Gemini 4 Neon is the smoothest 1M-context fit for Cursor, Cline, and Roo Code with fast end-to-end turnaround, whereas Opus 5.5 shines in Claude Code and GPT-6.2 Sol wins budget coding and frontend/Three.js.

Does gemini-4-neon support prompt caching on DeepClub?

Yes. Keep system instructions and shared repo context identical at the start of messages to hit discounted cache_read pricing.

Related Engineering Guides & Troubleshooting

Frequently Asked Questions

Does DeepClub use Google native generateContent for gemini-4-neon?
No. DeepClub exposes Gemini 4 text models through standard OpenAI-compatible POST /v1/chat/completions at https://deepclub.net/v1 so every IDE plugin and OpenAI SDK works out of the box.
How does Gemini 4 Neon compare to Claude Opus 5.5 and GPT-6.2 Sol?
Gemini 4 Neon is the smoothest 1M-context fit for Cursor, Cline, and Roo Code with fast end-to-end turnaround, whereas Opus 5.5 shines in Claude Code and GPT-6.2 Sol wins budget coding and frontend/Three.js.
Does gemini-4-neon support prompt caching on DeepClub?
Yes. Keep system instructions and shared repo context identical at the start of messages to hit discounted cache_read pricing.

Updated