Call Claude, GPT and Gemini with One API Key: an OpenAI-Compatible Quickstart

Point base_url at https://getmodel.ai and switch between Claude, GPT, Gemini and more without changing a line of integration code. With curl, Python and Node.js examples plus streaming notes.

Maintaining SDKs, keys and billing for several LLM vendors is the first tax every team pays when adopting AI. GetModel collapses all of it into one thing: one key + one OpenAI-compatible endpoint, models freely interchangeable.

Setup

  1. Sign up and log in to the GetModel console;
  2. Create a key (looks like sk-...) on the “API Tokens” page;
  3. The endpoint is https://getmodel.ai/v1.

curl

curl https://getmodel.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-key" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [{"role": "user", "content": "Explain an API gateway in one sentence"}]
  }'

To switch models, change only the model field — e.g. gpt-5.2 or gemini-3.0-pro; the request shape stays identical. See the pricing page for available models and live prices.

Python (openai SDK)

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-key",
    base_url="https://getmodel.ai/v1",
)

resp = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Node.js

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-your-key',
  baseURL: 'https://getmodel.ai/v1',
});

const resp = await client.chat.completions.create({
  model: 'gemini-3.0-pro',
  messages: [{ role: 'user', content: 'Hello' }],
});
console.log(resp.choices[0].message.content);

Streaming

Add stream: true — the SSE format matches OpenAI exactly. For token usage, also pass stream_options: {"include_usage": true} and the final chunk carries the usage object.

stream = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Write a short poem about APIs"}],
    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="")

FAQ

  • Are native APIs supported too? Yes. Besides the OpenAI-compatible layer, Claude’s native /v1/messages, Gemini’s native API and others work with the same key.
  • How does billing work? Pay per actual token usage of each model, from one shared balance; every request is itemized in the console logs.
  • Rate limits? Enforced per key and per group — see your console for quotas. For production, enable client retries; the gateway already does multi-channel failover upstream.