API Access
Capkii exposes OpenAI-, Claude- and Gemini-compatible APIs at the same time. Existing applications need no code changes — just point the base URL at your Capkii site address and use an API key created on the API Keys page.
In the examples below, replace https://your-capkii-domain.com with your actual site address and sk-replace-with-your-key with your API key. The same API key works across all three protocols.
Verify before integrating
Open Test command on any API key in the API Keys page and Capkii assembles your real key, site address and available models into a runnable curl. Copy it into a terminal to verify.
OpenAI-compatible API
Usage is identical to the OpenAI API; the base URL is your site root.
How to write the API base
Clients expect different API base formats. If a connection fails, try these in order:
https://your-capkii-domain.comhttps://your-capkii-domain.com/v1https://your-capkii-domain.com/v1/chat/completions
Example
curl --request POST \
--url https://your-capkii-domain.com/v1/chat/completions \
--header 'Authorization: Bearer sk-replace-with-your-key' \
-H "Content-Type: application/json" \
--data '{
"model": "gpt-5-mini",
"messages": [
{
"role": "user",
"content": "hi~"
}
]
}'Available endpoints
Besides chat, /v1 also provides text completions, Responses, embeddings, rerank, moderations, image generation / edit / variation, speech synthesis / transcription / translation, and the realtime API. Request and response structures match the official OpenAI ones.
List the models available to the current API key:
curl https://your-capkii-domain.com/v1/models \
--header 'Authorization: Bearer sk-replace-with-your-key'Claude-compatible API
Usage is identical to the Claude API. The base URL is https://your-capkii-domain.com/claude and authentication uses the x-api-key header.
Example
curl --request POST \
--url https://your-capkii-domain.com/claude/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: sk-replace-with-your-key" \
-H "anthropic-version: 2023-06-01" \
--data '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "hi~"
}
]
}'List the models available under this protocol:
curl https://your-capkii-domain.com/claude/v1/models \
-H "x-api-key: sk-replace-with-your-key"Gemini-compatible API
The base URL is https://your-capkii-domain.com/gemini and authentication uses the x-goog-api-key header. The version segment in the path (such as v1beta) matches the official API.
Example
curl --request POST \
--url https://your-capkii-domain.com/gemini/v1beta/models/gemini-2.5-pro:generateContent \
--header 'Content-Type: application/json' \
--header 'x-goog-api-key: sk-replace-with-your-key' \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "hi~"
}
]
}
]
}'List the models available under this protocol:
curl https://your-capkii-domain.com/gemini/v1beta/models \
-H "x-goog-api-key: sk-replace-with-your-key"The API catalogue in the console
The API group in the sidebar lists four capability catalogue pages, one per modality. They cover the same ground as this page, but the addresses are already filled in with your actual site address:
| Page | Path | Endpoints covered |
|---|---|---|
| Chat | /panel/api/chat | /v1/chat/completions, /v1/responses, /claude/v1/messages, /gemini/v1beta/models/{model}:generateContent |
| Image | /panel/api/image | /v1/images/generations, /v1/images/edits, /v1/images/variations, plus the Recraft and Midjourney extensions |
| Audio | /panel/api/speech | /v1/audio/speech, /v1/audio/transcriptions, /v1/audio/translations, plus /v1/realtime |
| Video | /panel/api/video | Kling text-to-video / image-to-video and task lookup, plus the Gemini Veo long-running endpoint |
Every catalogue page has Endpoints, Examples, Available models and a link to the full documentation. The key in the examples is the placeholder sk-YOUR_TOKEN — replace it with an API key created on the API Keys page and the command runs as is. In a personal context the Chat page also embeds a Playground section so you can fire a request straight away.
Midjourney and async task records are not on the catalogue pages — see the Midjourney and Async tasks tabs on the Logs page.
About models and groups
- Which models you can call depends on the channel group selected for the API key and on whether the API key has model restrictions enabled. The available list is shown under Available models on the Dashboard, and can also be queried through the models endpoint of each protocol above.
- Claude / Gemini protocol requests can only be routed to channels of the matching type. If those two protocols return no models, your current group has no channel of that type — use the OpenAI-compatible API instead.
- When a request fails, use the Usage and logs page to locate the exact record by API key and time; the detail view shows the finish reason and the billing breakdown.
Related
- Reasoning settings: control the thinking behaviour of reasoning models
- Advanced usage: call patterns for non-standard scenarios
- API keys and quota: quota, expiry, model restrictions and IP allowlists
- FAQ: troubleshooting integration errors