Base URL
The single host behind every cheapaimodel endpoint, and the exact base URL each SDK and tool expects.
Every endpoint lives on one host:
https://api.cheapaimodel.aiThere is no regional host and no separate host per provider. The same API key and the same balance work for both wire formats below.
Which value to use
OpenAI-style clients expect the base URL to include /v1; Anthropic-style clients expect the bare host and append /v1/messages themselves.
| Wire format | Base URL | Requests go to |
|---|---|---|
| OpenAI-compatible | https://api.cheapaimodel.ai/v1 | /v1/chat/completions, /v1/responses, /v1/embeddings, /v1/models |
| Anthropic Messages | https://api.cheapaimodel.ai | /v1/messages |
By SDK and tool
| Client | Setting | Value |
|---|---|---|
| OpenAI SDK (Python) | base_url | https://api.cheapaimodel.ai/v1 |
| OpenAI SDK (TypeScript) | baseURL | https://api.cheapaimodel.ai/v1 |
| OpenAI SDKs via environment | OPENAI_BASE_URL | https://api.cheapaimodel.ai/v1 |
| LangChain (Python / TypeScript) | base_url / configuration.baseURL | https://api.cheapaimodel.ai/v1 |
| LlamaIndex | api_base in OpenAILike | https://api.cheapaimodel.ai/v1 |
| Vercel AI SDK | baseURL in createOpenAICompatible | https://api.cheapaimodel.ai/v1 |
| LiteLLM | api_base (model openai/<id>) | https://api.cheapaimodel.ai/v1 |
| Anthropic SDK (Python / TypeScript) | base_url / baseURL | https://api.cheapaimodel.ai |
| Anthropic SDKs via environment | ANTHROPIC_BASE_URL | https://api.cheapaimodel.ai |
| Claude Code | ANTHROPIC_BASE_URL | https://api.cheapaimodel.ai |
| Codex CLI | base_url in config.toml | https://api.cheapaimodel.ai/v1 |
| Cursor | Override OpenAI Base URL | https://api.cheapaimodel.ai/v1 |
| Cline | Base URL | https://api.cheapaimodel.ai/v1 |
| Continue | apiBase in config.yaml | https://api.cheapaimodel.ai/v1 |
| Zed | api_url in settings.json | https://api.cheapaimodel.ai/v1 |
| Aider | OPENAI_API_BASE or --openai-api-base | https://api.cheapaimodel.ai/v1 |
| Open WebUI | URL of the OpenAI API connection | https://api.cheapaimodel.ai/v1 |
| Dify | API Base URL (OpenAI-API-compatible) | https://api.cheapaimodel.ai/v1 |
| n8n | Base URL in the OpenAI credential | https://api.cheapaimodel.ai/v1 |
| OpenClaw | baseUrl in models.providers | https://api.cheapaimodel.ai/v1 |
| curl | full URL | https://api.cheapaimodel.ai/v1/<endpoint> |
Common mistakes
/v1on an Anthropic client. The SDK appends/v1/messages, so the request goes to/v1/v1/messagesand fails with404andInvalid URL (POST /v1/v1/messages). Use the bare host.- Missing
/v1on an OpenAI client. The request goes to/chat/completions, which is not an API path, and fails with404and the plain-text bodyfault filter abortinstead of JSON. Add/v1. - The endpoint path in the base URL. Set
https://api.cheapaimodel.ai/v1, nothttps://api.cheapaimodel.ai/v1/chat/completions; the SDK adds the path, and the doubled path fails with404. - The site or console host.
cheapaimodel.aiandconsole.cheapaimodel.aiserve web pages, not the API.
Once the base URL is right, send your key as described in Authentication & API keys.