MiaRouter logo
MIAROUTER DOCS
Open Console ↗

Connect your tools

Use your MiaRouter API key and an exact model identifier from the live catalog. Confirm that the selected model supports your client’s API format and is included in your trial or paid balance.

OpenAI-compatible clients

Use https://miarouter.online/v1 as the base URL. Check the model card for Chat Completions or Responses support before selecting the client’s protocol.

curl https://miarouter.online/v1/chat/completions   -H "Authorization: Bearer $MIAROUTER_API_KEY"   -H "Content-Type: application/json"   -d '{"model":"YOUR_AVAILABLE_MODEL","messages":[{"role":"user","content":"Say hello"}]}'

Codex

Current Codex custom providers use the Responses protocol. Set an environment variable containing your MiaRouter key, then configure the provider in ~/.codex/config.toml. Choose a catalog model that supports Responses and your tool workflow.

model = "YOUR_RESPONSES_MODEL"
model_provider = "miarouter"

[model_providers.miarouter]
name = "MiaRouter"
base_url = "https://miarouter.online/v1"
env_key = "MIAROUTER_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false

The provider configuration follows the official OpenAI configuration reference, checked October 15, 2026. The example does not guarantee every catalog model supports every Codex capability.

Claude-native clients

Use https://miarouter.online as the Anthropic base URL; the client appends the Messages API path. In Claude Code, configure the provider environment and choose an available Claude-compatible model.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://miarouter.online",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_MIAROUTER_KEY"
  }
}

Cursor and other compatible apps

In your client’s provider settings, use the OpenAI-compatible base URL https://miarouter.online/v1, your MiaRouter key and an exact supported model name. Client features such as inline completion may have separate provider requirements; check the client’s documentation.

Validate the connection

First list models if your client supports discovery, then send one real request. Verify the response and Usage Logs. Authentication, account verification, model access, quota, rate limits and upstream health are separate checks. Keep the request ID if something fails.