Go to chat

Quickstart: your first request

Three steps, no SDK required. If you have curl you have everything.

Base URLhttps://api.magmarouter.com/v1
Chat completions endpointhttps://api.magmarouter.com/v1/chat/completions

Steps

1. Get a key

Sign in at the dashboard with a six digit code sent to your email, then mint a key. Give it a lifetime cap, a monthly cap, or both. The key is shown once and stored only as a hash, so copy it now.

Keys start sk-mr-.

2. Pick a model

The catalogue is queryable. Filters are abliterated, uncensored, free and long.

curl "https://api.magmarouter.com/v1/models?filter=uncensored&limit=5" \
  -H "authorization: Bearer sk-mr-..."

3. Send the request

curl https://api.magmarouter.com/v1/chat/completions \
  -H "authorization: Bearer sk-mr-..." \
  -H "content-type: application/json" \
  -d '{
    "model": "glm-5.3-xploded",
    "messages": [{"role": "user", "content": "hello"}]
  }'

The response is the OpenAI shape your client already parses, plus an x-magma-receipt header. Usage and cost settle against your key the moment the response completes.

Streaming

Set "stream": true and read server-sent events as usual. Output tokens are counted as they stream, so if the client hangs up mid-response the hold settles on what was actually generated rather than waiting for a timeout.