Documentation
Connect the Dikaya API, SDKs and IDEs: request formats, streaming, demo limits, token accounting and error handling.
Quick start
Create an account, then open API and balance to copy your personal key. The account and chat interface currently use Russian. For an eligible demo, select seller-pro-2, text-only Chat Completions and at most 512 output tokens. Tool-using agents require a topped-up account.
curl https://dikaya.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_DIKAYA_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seller-pro-2","max_tokens":512,"messages":[{"role":"user","content":"Hello"}]}'Python SDK
from openai import OpenAI
client = OpenAI(base_url="https://dikaya.cloud/v1", api_key="YOUR_DIKAYA_KEY")
response = client.chat.completions.create(
model="seller-pro-2",
max_tokens=512,
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)IDE connections
For OpenAI-compatible clients, use https://dikaya.cloud/v1, your Dikaya key and the exact public model ID. Protocol compatibility does not imply every IDE feature is supported. Start with a plain text request before enabling agents or long file histories.
- OpenCode: configure an OpenAI-compatible custom provider and select seller-pro-2. Full configuration example in the Russian reference.
- Cursor: set your API key and override the OpenAI Base URL for custom chat models. This does not switch Cursor Tab; test Agent support in your installed version. Cursor API-key documentation.
- Continue: use its OpenAI-compatible provider with the same base URL, key and model. YAML example in the Russian reference.
- Cline and Roo Code: select OpenAI-compatible/custom API, then supply the URL, key and model. Tools and agent loops require paid access.
- Antigravity: use OpenCode in the project terminal; this is not a claimed replacement for the built-in Antigravity model. Detailed terminal workflow.
Claude Code
export ANTHROPIC_BASE_URL="https://dikaya.cloud"
export ANTHROPIC_AUTH_TOKEN="YOUR_DIKAYA_KEY"
claude --model "seller-pro-2[1m]"Do not append /v1 to ANTHROPIC_BASE_URL; the client adds its own path. These variables apply to the current terminal. Check for conflicting environment and project settings.
API endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/models | Models and retail token rates |
| GET | /v1/balance | Available balance and key limits |
| POST | /v1/chat/completions | Chat Completions format |
| POST | /v1/responses | Responses format |
| POST | /v1/messages | Messages format |
Authenticate with Authorization: Bearer YOUR_DIKAYA_KEY; Messages also accepts x-api-key. Set stream=true for SSE on POST endpoints. The gateway requests final usage where applicable; streaming does not change token rates.
Limits and billing
Demo: Pro 2 text Chat Completions, 512 output tokens, 6000 bytes of context, 10 requests/minute and one concurrent request. Paid output defaults to 2048 tokens, with a gateway maximum of 65536; a model can have a lower limit. Request bodies are capped at 16 MiB. A 413 size rejection occurs before reserving funds.
Images and reasoning
Flash accepts images directly. Paid Pro models use a separately billed Flash image-description stage; both stages reserve funds before inference. Embedded image descriptions are cached per key for 24 hours; HTTP URLs are not cached. Up to eight unique bridged images are allowed. Set dikaya_image_handling="reject" to opt out. X-Dikaya-Vision-* headers disclose bridge cost and cache hits.
An HTTP 200 response can contain tool_calls instead of text. The client must execute a requested client-side tool and continue the conversation. A length finish reason may mean reasoning consumed the output budget. Inspect finish_reason and usage rather than assuming a blank response is free. On Pro 2, reasoning_effort=none does not guarantee zero reasoning tokens.
Errors and recovery
- 400: check JSON, public model ID, requested limits and demo restrictions.
- 401: missing, invalid or revoked key.
- 402: insufficient available funds for the reservation; shorten context/output or top up.
- 413: reduce history, attachments or tool output below 16 MiB.
- 429: slow down and retry after the key limit permits.
- 502: processing failed or was interrupted. Check billing before retrying unknown outcomes.
An explicit rejection refunds unused work. If execution or usage is unknown, the reservation is retained for reconciliation. Closing the client connection does not cancel accounting. See the pricing and FAQ pages for image-stage charges, top-up conditions and data retention.
Practical guides
Guides on code, writing, GLM-5.3 and API integration (Russian)
Source: official Dikaya model catalogue, published rates and account/demo conditions. Pricing · Documentation
Facts reviewed: . Publisher: Dikaya.