cheapaimodel

Base URL

The single host behind every cheapaimodel endpoint, and the exact base URL each SDK and tool expects.

Copy

Every endpoint lives on one host:

https://api.cheapaimodel.ai

There 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 formatBase URLRequests go to
OpenAI-compatiblehttps://api.cheapaimodel.ai/v1/v1/chat/completions, /v1/responses, /v1/embeddings, /v1/models
Anthropic Messageshttps://api.cheapaimodel.ai/v1/messages

By SDK and tool

ClientSettingValue
OpenAI SDK (Python)base_urlhttps://api.cheapaimodel.ai/v1
OpenAI SDK (TypeScript)baseURLhttps://api.cheapaimodel.ai/v1
OpenAI SDKs via environmentOPENAI_BASE_URLhttps://api.cheapaimodel.ai/v1
LangChain (Python / TypeScript)base_url / configuration.baseURLhttps://api.cheapaimodel.ai/v1
LlamaIndexapi_base in OpenAILikehttps://api.cheapaimodel.ai/v1
Vercel AI SDKbaseURL in createOpenAICompatiblehttps://api.cheapaimodel.ai/v1
LiteLLMapi_base (model openai/<id>)https://api.cheapaimodel.ai/v1
Anthropic SDK (Python / TypeScript)base_url / baseURLhttps://api.cheapaimodel.ai
Anthropic SDKs via environmentANTHROPIC_BASE_URLhttps://api.cheapaimodel.ai
Claude CodeANTHROPIC_BASE_URLhttps://api.cheapaimodel.ai
Codex CLIbase_url in config.tomlhttps://api.cheapaimodel.ai/v1
CursorOverride OpenAI Base URLhttps://api.cheapaimodel.ai/v1
ClineBase URLhttps://api.cheapaimodel.ai/v1
ContinueapiBase in config.yamlhttps://api.cheapaimodel.ai/v1
Zedapi_url in settings.jsonhttps://api.cheapaimodel.ai/v1
AiderOPENAI_API_BASE or --openai-api-basehttps://api.cheapaimodel.ai/v1
Open WebUIURL of the OpenAI API connectionhttps://api.cheapaimodel.ai/v1
DifyAPI Base URL (OpenAI-API-compatible)https://api.cheapaimodel.ai/v1
n8nBase URL in the OpenAI credentialhttps://api.cheapaimodel.ai/v1
OpenClawbaseUrl in models.providershttps://api.cheapaimodel.ai/v1
curlfull URLhttps://api.cheapaimodel.ai/v1/<endpoint>

Common mistakes

  • /v1 on an Anthropic client. The SDK appends /v1/messages, so the request goes to /v1/v1/messages and fails with 404 and Invalid URL (POST /v1/v1/messages). Use the bare host.
  • Missing /v1 on an OpenAI client. The request goes to /chat/completions, which is not an API path, and fails with 404 and the plain-text body fault filter abort instead of JSON. Add /v1.
  • The endpoint path in the base URL. Set https://api.cheapaimodel.ai/v1, not https://api.cheapaimodel.ai/v1/chat/completions; the SDK adds the path, and the doubled path fails with 404.
  • The site or console host. cheapaimodel.ai and console.cheapaimodel.ai serve web pages, not the API.

Once the base URL is right, send your key as described in Authentication & API keys.