Your first request in two minutes.
Create a key, point your client at one base URL, and call any model with curl, Python or Node.
Create a key
Sign in and create a key under Dashboard, API keys. The secret is shown once and stored only as a hash, so copy it then. The free models work with a zero balance; every other model draws on prepaid credits.
Create an API keyPoint your client at Rapid Router
Every endpoint lives under one base URL, https://rapidrouter.ai/api/v1. Keep the key in an environment variable rather than in code.
export RAPIDROUTER_API_KEY="sk-rr-v1-..."Send your first request
This one is a free model, so it works on a new account before you add credits. After that, name any model in the catalog by its vendor/model id.
curl https://rapidrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemma-4-31b-it:free",
"messages": [
{
"role": "user",
"content": "Hi"
}
]
}'Read the reply
The standard chat completion, with two additions: provider says which upstream served it, and usage.cost is what the request billed, in US dollars: 0 here, because the model is free. Swap the model string and the same code calls GPT, Gemini or any of the others.
{
"id": "chatcmpl-7c1f9e2a4b",
"object": "chat.completion",
"model": "google/gemma-4-31b-it:free",
"provider": "google",
"choices": [
{ "index": 0, "message": { "role": "assistant", "content": "..." }, "finish_reason": "stop" }
],
"usage": { "prompt_tokens": 9, "completion_tokens": 24, "total_tokens": 33, "cost": 0 }
}Change two values and nothing else: the base URL, and the model string, which is namespaced (anthropic/claude-haiku-4-5, not gpt-4). That is all the OpenAI SDKs above needed, and the same holds for Anthropic's SDK, the Vercel AI SDK, LangChain and any tool that takes a custom base URL; see frameworks and SDKs.
# pip install anthropic (works because Rapid Router also speaks /v1/messages)
# The base URL has no /v1 here: the Anthropic SDK adds /v1/messages itself.
import os
from anthropic import Anthropic
client = Anthropic(base_url="https://rapidrouter.ai/api", api_key=os.environ["RAPIDROUTER_API_KEY"])
m = client.messages.create(
model="google/gemma-4-31b-it:free",
max_tokens=1024,
messages=[{"role":"user","content":"Hi"}],
)
print(m.content[0].text)