Base URL
https://api.kasyana.com/v1
Everything below follows the OpenAI API shape. Authentication is by bearer API key, issued in the platform panel.
Authentication
Authorization: Bearer sk-<your-api-key>
Keys are created in the panel and shown once at creation. Revoking a key stops it immediately.
List models
GET /v1/models
curl https://api.kasyana.com/v1/models \
-H "Authorization: Bearer sk-<your-api-key>"
Chat completions
POST /v1/chat/completions
curl https://api.kasyana.com/v1/chat/completions \
-H "Authorization: Bearer sk-<your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Set "stream": true in the body to receive a Server-Sent-Events stream ending with data: [DONE]. Supported body fields: model, messages, stream, temperature, top_p, max_tokens, stop, presence_penalty, frequency_penalty, response_format, stream_options.
Upstreams & model routing
The API is a general router: attach your provider subscriptions in the panel (LLM → Upstreams) and one unified endpoint serves them all. Model names select the upstream by namespace:
openai/gpt-5.6-sol # upstream "openai"
deepseek/deepseek-v4-flash # upstream "deepseek"
deepseek-v4-flash # no namespace = the default upstream
Webhook-safe rules: namespaces are the first path segment; a model
without a namespace goes to the default upstream; unknown namespaces
return 400. Credentials are encrypted at rest and never
echoed back (GET /panel-api/upstreams omits them).
Anthropic Messages API
For clients that speak the Anthropic protocol (notably Claude Code), an Anthropic-compatible endpoint is served at the same base URL:
POST https://api.kasyana.com/v1/messages
Header: anthropic-version: 2023-06-01
curl https://api.kasyana.com/v1/messages \
-H "Authorization: Bearer sk-<your-api-key>" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'
Claude Code: set ANTHROPIC_BASE_URL=https://api.kasyana.com,
ANTHROPIC_AUTH_TOKEN=sk-<your-api-key> and
ANTHROPIC_MODEL=deepseek-v4-flash[1m] in
~/.claude/settings.json. Tool calling and image inputs are
supported; thinking is forced off at the upstream (stable
agent loops); errors are returned in the Anthropic error envelope.
Limits
Requests are rate-limited per key (120 burst, 2/second sustained).
Usage tracking
The panel shows token usage per key and per day.