Gemini · about 2 minutes

Gemini access

No separate Google key required. 9Coding's OpenAI-compatible endpoint reaches the full Gemini lineup, 1M context and multimodal input included, using exactly the same code you'd use for GPT or Claude.

Python (OpenAI SDK)

main.py
from openai import OpenAI

client = OpenAI(
    base_url="https://api.9coding.com/v1",
    api_key="sk-9c-your-key"
)

resp = client.chat.completions.create(
    model="gemini-3.5-flash",   # 1M context, fast
    messages=[{"role": "user", "content": "Summarise this document…"}]
)
print(resp.choices[0].message.content)

curl

terminal
curl https://api.9coding.com/v1/chat/completions \
  -H "Authorization: Bearer sk-9c-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-3.5-flash","messages":[{"role":"user","content":"ping"}]}'
When Gemini is the right pick: very long documents or a whole codebase read in one pass (that's what the 1M context buys you), and anywhere latency matters — the Flash models are the fastest option here. For hard reasoning reach for Claude Opus; for writing code, Claude Fable or GPT. One key covers all of them, so switching is a matter of changing the model name.

Troubleshooting

  • Which Gemini models — the Gemini 3.5 series is available; the full list lives in the console.
  • Multimodal input — pass image_url content blocks exactly as the OpenAI specification describes.
  • Billing — Gemini bills as you go from your top-up balance; subscription allowances cover the main Claude and GPT models.