Getting started
Base URL
Which address to use for each protocol and tool, and when to include /v1.
The gateway root URL is shown below. Each protocol and tool appends its own paths. An extra or missing /v1 is a common cause of 404 errors.
Root URL
https://api.keyvia.ccWithout /v1. Use this directly for Claude Code, Anthropic SDK, Cherry Studio, and Gemini CLI.
By protocol
For official SDKs or direct HTTP requests, choose the URL for your protocol:
| Protocol | Base URL for the SDK | Full endpoint |
|---|---|---|
| OpenAI compatible | https://api.keyvia.cc/v1base_url / baseURL in the OpenAI SDK | https://api.keyvia.cc/v1/chat/completions |
| Anthropic compatible | https://api.keyvia.ccThe Anthropic SDK appends /v1/messages | https://api.keyvia.cc/v1/messages |
| Gemini compatible | https://api.keyvia.ccThe Google GenAI SDK appends /v1beta | https://api.keyvia.cc/v1beta/models/{model}:generateContent |
By tool
Many tools automatically append /v1 or the endpoint path and need only the root URL. Others require the full prefix. These are the values used in the tool guides:
| Tool | URL to enter | Notes |
|---|---|---|
| Claude Code | https://api.keyvia.cc | ANTHROPIC_BASE_URL: root URL |
| Codex CLI | https://api.keyvia.cc/v1 | base_url in config.toml, including /v1 |
| Gemini CLI | https://api.keyvia.cc | GOOGLE_GEMINI_BASE_URL: root URL |
| Cursor | https://api.keyvia.cc/v1 | Override OpenAI Base URL, including /v1 |
| Cline / Roo Code | https://api.keyvia.cc/v1 or https://api.keyvia.cc | Include /v1 for OpenAI Compatible; use the root URL for Anthropic |
| Cherry Studio | https://api.keyvia.cc | Use the root URL for all three protocols |
| OpenCode | https://api.keyvia.cc/v1 | The provider’s baseURL, including /v1 |
| CC Switch | https://api.keyvia.cc | Console import fills this in automatically |
Troubleshooting
| Symptom | Common causes |
|---|---|
| 404 Not Found | An extra or missing /v1, or an unknown model name. |
| 401 Unauthorized | An incorrect or incomplete key, or a missing Bearer prefix in the header. |
| Gemini request fails | Gemini uses /v1beta rather than /v1. Enter the root URL in the SDK. |
For more status codes, see Error codes.