CanalAPI

Getting started

Create a key and complete your first request with Claude Code, Codex, or your own API integration.

1. Create an account

Open the website, register, and sign in. Check that your account has available credit before making requests; verification requests may also incur charges. Refer to the models and pricing page and your dashboard for current prices.

2. Create an API key

Create a dedicated key under API Keys, for example local-codex. Save the full key immediately: its plaintext cannot be viewed again after closing the dialog. Use separate keys for separate purposes and set an appropriate spending cap. If you need model or IP restrictions and no control is available, confirm the process with support. See API keys.

Keep keys out of source repositories, frontend code, screenshots, and chats. Replace YOUR_CANALAPI_KEY in examples with your own key.

Key created dialog with Copy key, Copy API URL, and setup guides; key redacted

Screenshot of a local test-user view. The key was masked before capture and account details are excluded. Copy the complete key when creating your own; the dots shown here are not a usable key.

3. Set the Base URL

Tools expect different base paths. An incorrect path commonly causes 404 or protocol errors.

ClientBase URLNext step
Claude Code / Anthropic SDKhttps://api.canalapi.comConfigure Claude Code
Codex / OpenAI SDKhttps://api.canalapi.com/v1Configure Codex
Native Gemini RESThttps://api.canalapi.com/v1betaEndpoint overview

These are base URLs. The SDK appends the endpoint path: do not include /chat/completions, /messages, or /responses in a base URL, or add /v1 twice.

4. Send your first request

Copy the full model ID from the model page and confirm that it supports your client's protocol. YOUR_MODEL_ID, YOUR_CODEX_MODEL_ID, and similar values are placeholders, not valid model names.

  • Claude Code: follow the setup guide, check the connection in /status, and ask it to “Reply only OK”.
  • Codex: merge the user configuration, choose a model that supports Responses and tools, then check /status and send a minimal prompt.
  • Your own application: use the complete PowerShell, curl, JavaScript, and Python examples in the API quickstart.

Success means receiving a normal response, confirming the intended model, and finding the corresponding request in your usage logs. Allow time for log updates rather than repeatedly sending the request.

GET /v1/models is public. It checks catalog access and network connectivity, not key validity, account credit, or every model's protocol support.

5. Next steps

On this page