API essentials
This page covers documented examples, not a complete upstream API specification. Client feature support depends on its protocol and the model/key group.
| Protocol | Base URL | Example endpoint |
|---|---|---|
| OpenAI-compatible | https://api.nekocloud.vip/v1 | POST /chat/completions or POST /responses |
| Anthropic-compatible | https://api.nekocloud.vip | Use the client SDK's Anthropic API path |
| Gemini-compatible | https://api.nekocloud.vip/v1beta | Use the client SDK's Gemini API path |
Authentication and first request
Create an API key on the main site. Send it in Authorization: Bearer <your-key> for OpenAI-compatible requests. Do not publish it in code, URLs, screenshots, or issue reports.
curl https://api.nekocloud.vip/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"model":"your-available-model","messages":[{"role":"user","content":"Hello"}]}'Replace the example model with one accessible to your key's group. For Codex, use the Responses setup instead of assuming chat completions work for every model. See Model Plaza for displayed prices and units; Usage on the main site is the per-request billing record.
Streaming and errors
For a client that supports streaming chat completions, set "stream": true; consume the event stream incrementally rather than buffering it as JSON. Clients should handle interrupted streams without assuming the entire answer was delivered.
| Status | First check |
|---|---|
| 401 | Is the Authorization header present and the key valid? |
| 403 | Balance, account status, or applicable safety policy; inspect the response error code |
| 429 | Reduce concurrency, respect any retry guidance, then back off |
| Model unavailable | Exact model name and key-group access |
Do not blindly retry non-idempotent requests: they may already have reached the upstream. For persistent failures, record the time, model, response code and request ID (if present), but redact keys and user input before contacting support.