Your key
Endpoints
One host, two formats. Use whichever your tool speaks; the key and the balance are the same.
- OpenAI base URL
- https://api.nerdly.us/v1
- Anthropic base URL
- https://api.nerdly.us
- Chat
- POST /v1/chat/completions
- Responses
- POST /v1/responses
- Messages
- POST /v1/messages
- Models
- GET /v1/models (no key needed)
- Key
- Authorization: Bearer sk-nerd-…, or x-api-key
First request
Put your key in NERDLY_API_KEY, then:
OpenAI format: POST /v1/chat/completions.
shell
1
curl https://api.nerdly.us/v1/chat/completions \2
-H "Authorization: Bearer $NERDLY_API_KEY" \3
-H "content-type: application/json" \4
-d '{"model": "deepseek-v4-flash-0731", "messages": [{"role": "user", "content": "Write a regex for ISO 8601 dates."}]}'Anthropic format: POST /v1/messages, with the key in x-api-key.
shell
1
curl https://api.nerdly.us/v1/messages \2
-H "x-api-key: $NERDLY_API_KEY" \3
-H "anthropic-version: 2023-06-01" \4
-H "content-type: application/json" \5
-d '{"model": "deepseek-v4-flash-0731", "max_tokens": 1024, "messages": [{"role": "user", "content": "Write a regex for ISO 8601 dates."}]}'Errors
- 401 invalid_api_key
- The key is wrong or was revoked. Sign in again above.
- 402 insufficient_balance
- The balance does not cover the request. Add funds.
- 404 model_not_found
- No model with that id. Check the models page.
- 429
- Too many requests at once. Retry after a moment.
Set up your tool
In an MCP client (Claude, Cursor, VS Code, Windsurf, Cline, Codex), add the Nerdly MCP server instead: every model as tools, including one that builds a small app.
Questions about the API.
Something else? Email hello@nerdly.us
Yes. Signing in here, in Chat or in Code gives this browser the same account key, and every request from any of them pays from the same balance.
Every model on the models page, by the id shown under its name. GET /v1/models lists them without a key.
The model’s price per million tokens for what you send and what it writes, taken from your balance. Top-ups start at $10. On Plus and Pro, a POST /v1/chat/completions request on one of the 12 included models takes one of the day’s messages instead, while it stays under the plan’s size; everything else pays from the balance.
No. Requests pass through to the model and are not stored; we keep a usage record (time, size, charge) for billing. The company running the model receives the request so it can answer.
Requests are refused with 402 insufficient_balance until you add funds. Auto top-up stays off unless you switch it on in billing.