Quickstart
Five minutes from zero to a working request.
1. Create an account
Go to codegate.dev/register and sign up. Email plus a password is enough. You can also sign in with GitHub or one of the other configured OAuth providers.
2. Add credit
The billing model is prepaid. Log in, open Console, Top Up, and add a starting balance. A few dollars is enough to run this quickstart and burn through a few thousand messages.
Payment methods are cards, crypto, and bank transfer.
3. Create an API key
Open codegate.dev/console/token and click Add Token. Give it a name (something like local-dev is fine), leave the default quota, and hit save.
Copy the sk-... string it shows you. This is the only time it is displayed in full.
4. Send your first request
You have two ways to call CodeGate. Pick the one that matches how you talk to models today.
Option A: Anthropic Messages protocol
curl https://codegate.dev/v1/messages \
-H "x-api-key: sk-..." \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Say hello."}]
}'Option B: OpenAI Chat Completions protocol
curl https://codegate.dev/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "Say hello."}]
}'Both use the same base URL. The auth header and request shape differ; the underlying key is the same.
5. Verify
You should see a JSON response with a completion. If you get a 401, double-check that you pasted the whole sk-... value including the prefix. If you get a 402, add credit at Console, Top Up.
Next
- Wire the key into a client: Claude Code, Codex, opencode.
- Read the Authentication page for header details.
- Browse the API reference for every supported endpoint.