# RouterHub Quickstart

RouterHub provides one API key for GPT, Claude, DeepSeek, and GLM models in the public catalogue. Requests use the API protocol listed for the selected model. Create an account at https://routerhub.si/register, add credits from https://routerhub.si/dashboard/billing, and create a key at https://routerhub.si/dashboard/keys. API keys are shown once. Keep them private; do not ask a user to paste one into a public chat, source repository, or browser code.

## Discover models

Fetch https://routerhub.si/models.json for the current model IDs, supported protocols, and published rates. Select a model ID exactly as listed. Do not infer protocol support or model limits from the model name. Responses and Chat Completions use a bearer API key; Anthropic Messages uses x-api-key and anthropic-version: 2023-06-01.

## API base

```text
https://routerhub.si/v1
```

## Chat Completions API: DeepSeek and GLM

Use https://routerhub.si/v1/chat/completions with a model whose models.json protocols contains chat. The published DeepSeek and GLM IDs are `deepseek-v4.1-flash`, `glm-5.3`, and `glm-5.3-flash`. These models use Chat Completions; select the Chat Completions client method in your app.

```bash
curl https://routerhub.si/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Reply with OK."}]}'
```

Replace the model ID with `glm-5.3` or `glm-5.3-flash` to use GLM. Check the current catalogue before sending a request. SDK examples and current input, output, and cached input rates:

- DeepSeek: https://routerhub.si/guides/deepseek
- GLM: https://routerhub.si/guides/glm

## Responses API: GPT and Codex

https://routerhub.si/v1/responses. Use only a model whose models.json protocols contains responses.

```bash
curl https://routerhub.si/v1/responses \
  -H "Authorization: Bearer $ROUTERHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-6.1-sol","input":"Reply with OK."}'
```

## Anthropic Messages API: Claude

https://routerhub.si/v1/messages. Use only a model whose protocols contains messages.

```bash
curl https://routerhub.si/v1/messages \
  -H "x-api-key: $ROUTERHUB_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-5-5","max_tokens":64,"messages":[{"role":"user","content":"Reply with OK."}]}'
```

## Agent instructions

An AI agent may identify a suitable model, explain setup, and generate a user-specific configuration. The human account owner must sign up, add credits, create the API key, and enter the secret directly into their local tool. Never request, receive, store, or commit the user's password or API key. Before making a paid inference request, get the user's confirmation and clearly state it will consume prepaid credits. Verify a successful request in the Usage page.

## Tool guides

- [OpenCode](https://routerhub.si/guides/opencode)
- [VS Code with Continue](https://routerhub.si/guides/vscode-continue)
- [VS Code with Cline](https://routerhub.si/guides/vscode-cline)
- [Claude Code](https://routerhub.si/guides/claude-code)
- [Codex](https://routerhub.si/guides/codex)

## Machine-readable references

- Catalogue: https://routerhub.si/models.json
- OpenAPI: https://routerhub.si/openapi.json
- Pricing and feature notes: https://routerhub.si/models
