ai newsMo., 26. Okt.
EilmeldungOpenAI launches GPT-6.1 Terra, a cheaper model for everyday computer work

Use Claude Code, Cursor and Cline with one OpenAI-compatible key (GPT, Claude, Gemini, DeepSeek)

Disclosure: I work on 666 AI , the gateway used in the examples below. The setup pattern works with any OpenAI-compatible gateway. If you switch between models a lot, you end up with several API keys, several bills, and a different config in every tool. Gateways fix that: one key, one balance, and

dev.toMontag 20:19 · 26.10.1 Min. Lesezeit
Bild: dev.to

Disclosure: I work on 666 AI, the gateway used in the examples below. The setup pattern works with any OpenAI-compatible gateway.

If you switch between models a lot, you end up with several API keys, several bills, and a different config in every tool. Gateways fix that: one key, one balance, and the tool only needs two fields changed — the base URL and the key.

Below are working configs for the most common tools.

curl https://YOUR-ENDPOINT/v1/chat/completions \ -H "Authorization: Bearer $KEY " \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hi"}]}' Enter fullscreen mode Exit fullscreen mode A JSON response means you're done.

Claude Code speaks the Anthropic protocol, so point it at the Anthropic-format address:

# ~/.zshrc or ~/.bashrc export ANTHROPIC_BASE_URL = "https://YOUR-ENDPOINT" export ANTHROPIC_AUTH_TOKEN = "YOUR_KEY" Enter fullscreen mode Exit fullscreen mode Reopen the terminal and run claude. The most common mistake is adding /v1 here — don't.

from openai import OpenAI client = OpenAI ( api_key = " YOUR_KEY ", base_url = " https://YOUR-ENDPOINT/v1 " ) resp = client. chat. completions. create ( model = " claude-sonnet-5-5 ", messages = [{ " role ": " user ", " content ": " Explain this regex: ^ \\ d{3}- \\ d{4}$ " }], ) print ( resp. choices [ 0 ]. message. content ) Enter fullscreen mode Exit fullscreen mode Switching models is now a one-word change ( claude-sonnet-5-5 → gemini-3.5-flash → deepseek-v4-flash ), with no new SDK and no new key.

A common split is Claude for refactors, DeepSeek for cheap bulk tasks and Gemini for long documents. With all three behind one key, the editor config never changes. Only the model name does.

If you want to try the gateway in these examples, signup is free and there's a daily free chat allowance: 666gogogo.com. Full docs: Documentation.

Quelle: dev.to (dev.to). Original öffnen