Developers
Change one line.
Keep your code.
The endpoint is OpenAI-compatible: point your existing SDK at api.gc4.ai and your gift-card balance pays for every model.
Email-only account · No credit card · Everapi.gc4.ai
-base_url="https://api.openai.com/v1"+base_url="https://api.gc4.ai/v1"
That's the whole migration. 39 models, one balance,
per-token prices mirrored from openrouter.ai.
per-token prices mirrored from openrouter.ai.
Quickstart
200 on the first paste.
The snippets below carry a placeholder key. Grab a real one — it's email-only, no card — then paste it in and run.
Get a keygc4_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxquickstart.gc4.ai
1from openai import OpenAI23client = OpenAI(4 base_url="https://api.gc4.ai/v1",5 api_key="gc4_sk_live_xxxxxxxxxxxxxxxxxxxxxxxx", # replace with your key6)78r = client.chat.completions.create(9 model="anthropic/claude-haiku-4.5",10 messages=[{"role": "user", "content": "Say hi in 5 words."}],11)12print(r.choices[0].message.content)
Copy the Python snippet
Expected response
{
"choices": [
{
"message": {
"role": "assistant",
"content": "Hi there, five words exactly."
}
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 8,
"cost_usd": 0.000053
}
}First request detected21 tokens · $0.000053 · ledgered in your account
Errors
Every error you'll meet.
An empty balance is a hard stop: there is no overdraft and no negative balance, ever. Limits are 60 requests a minute per key. Upstream provider errors pass through unchanged in OpenAI-compatible format.
401Bad or revoked key
{
"error": {
"code": "invalid_key",
"message": "Key not recognized. Check for whitespace."
}
}404Model id not on the ledger (typo'd slug)
{
"error": {
"code": "model_not_found",
"message": "No model anthropic/claude-haiku-45. Did you mean anthropic/claude-haiku-4.5?"
}
}402Balance empty: hard stop, never overdraft
{
"error": {
"code": "balance_empty",
"message": "Balance is $0.00. Convert a card at gc4.ai/convert.",
"convert_url": "https://gc4.ai/convert"
}
}429Rate limited: 60 req/min per key
{
"error": {
"code": "rate_limited",
"message": "60 requests/min exceeded. Retry after 2.1s.",
"retry_after": 2.1
}
}