Quickstart
Get from zero to your first routed LLM call in under 3 minutes.
Step 1 — Get your API key
Create a free account. You immediately receive two keys:
- Test key — Returns synthetic responses. Free, no LLM calls.
- Live key — Routes to real providers using your stored provider keys.
Step 2 — Add a provider key (for live mode)
Go to Dashboard → Gateway → Provider Keys and paste your OpenAI or Anthropic API key. We store it encrypted with AES-256. Skip this step if you only want test mode.
Step 3 — Change one line of code
Python
pip install openai # already installed? skip this
from openai import OpenAI
client = OpenAI(
api_key="gml-sk-test_...", # your test key
base_url="https://api.gateml.io/v1" # ← only change
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
# → [GateML test mode] This is a synthetic response...
TypeScript / Node.js
npm install gateml # thin wrapper around OpenAI SDK
import { createGateMLClient } from 'gateml';
const client = await createGateMLClient({ apiKey: 'gml-sk-test_...' });
const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);
Step 4 — Go live
Switch your key from gml-sk-test_... to gml-sk-live_.... That's it. GateML will now forward your requests to the real provider using your stored provider key.
Tip: Configure a fallback chain in Gateway → Routing. For example: gpt-4o → claude-sonnet-4-6 → gpt-4o-mini. GateML retries automatically on rate-limits (429) and errors (5xx).
What's next?