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 · Everper-token prices mirrored from openrouter.ai.
Send your first request.
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-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1from openai import OpenAI23client = OpenAI(4 base_url="https://api.gc4.ai/v1",5 api_key="gc4-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", # 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)
{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 1786752000,
"model": "anthropic/claude-haiku-4.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hi there, five words exactly."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 8,
"total_tokens": 21,
"cost": 0.000053
}
}Sampling controls.
The API honors max_tokens, temperature, and top_p. Models that support tools also honor tools and tool_choice. response_format is accepted and ignored; it is not supported.
For reasoning-capable models, an explicit max_tokens value below 1024 is raised to 1024 on both endpoints. If a non-streaming chat completion uses that output budget for internal reasoning and returns no visible content, the response includes a warning with retry guidance.
Read your balance and key spend.
GET /v1/me returns integer micro-USD balances and this key's settled usage this month. In-flight reservations are excluded, so the settled figure may be lower than the amount used for spend-cap enforcement.
$ curl https://api.gc4.ai/v1/me \
-H "Authorization: Bearer gc4-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Every error you'll meet.
An empty balance is a hard stop: there is no overdraft and no negative balance, ever. 60 requests per minute per key sustained, with short bursts up to 120 allowed. Retry-After is an integer number of seconds with a minimum of 1. Upstream provider errors use the documented OpenAI-compatible error shapes.
A non-streaming response arrives as a single JSON body when generation completes. If the connection drops or the body does not parse as JSON, treat it as a failed attempt and retry. Each request is billed only for the tokens it actually used.
{
"error": {
"message": "Invalid authentication credentials.",
"type": "authentication_error",
"code": 401
}
}{
"error": {
"message": "The model `meta/llama-4-scou` does not exist. Did you mean `meta/llama-4-scout`?",
"type": "invalid_request_error",
"code": 404,
"metadata": {
"suggestion": "meta/llama-4-scout"
}
}
}{
"error": {
"message": "Insufficient credits to fulfill this request. Add credits to continue.",
"type": "insufficient_quota",
"code": 402,
"metadata": {
"balance": "$0.0123",
"balance_micro": 12345,
"top_up_url": "https://gc4.ai/convert"
}
}
}{
"error": {
"message": "Rate limit exceeded. Please slow down and retry.",
"type": "rate_limit_exceeded",
"code": 429,
"metadata": {
"retry_after": 1
}
}
}