Getting started
First request
Send a minimal request with curl or an SDK to confirm your key and address work.
Send a minimal request to verify your key and URL. Replace YOUR_API_KEY with your API key, or choose a key at the top of the page to fill it in automatically. Model names must match the Model catalog; the example uses a currently available model.
OpenAI protocol
YOUR_API_KEY in the examples is a placeholder and will not work as copied. Sign in to pick one of your keys and fill it into every example on this page.
Sign in to fill in keycurl https://api.keyvia.cc/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"messages": [{ "role": "user", "content": "Reply only: Hello" }]
}'A successful request returns JSON. The reply is in choices[0].message.content.
Anthropic protocol
curl https://api.keyvia.cc/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 256,
"messages": [{ "role": "user", "content": "Reply only: Hello" }]
}'A successful request returns JSON. The reply is in content[0].text.
A reply confirms the connection
Continue with the guide for your tool:Claude Code, Codex CLI, Cursor, Cherry Studio.
For errors, see Error codes: 401 usually indicates a key problem; 404 usually indicates a URL or model-name problem.