Example AI API documentation
Connecting
The API is OpenAI-compatible. In your program, set:
- Base URL:
https://demo-en.alexshkarupa.com/v1 - API key: create one in your dashboard
Supported: /v1/chat/completions, /v1/responses, /v1/messages (Anthropic format), /v1/embeddings, /v1/rerank, /v1/models and media generation /v1/media/*. For streaming, pass stream: true.
Models and channels
Set the model field to a model from the Models & pricing page. Without a suffix the request goes through the default channel. To pick a specific channel, append its number: deepseek-v4.1-flash-1017-uncensored:c2 — channel 2.
If the channel you picked is temporarily unavailable, the request returns an error and is not rerouted to another channel. Without a suffix the “Auto” channel is used.
Example: curl
curl https://demo-en.alexshkarupa.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-v4.1-flash-1017-uncensored", "messages": [{"role": "user", "content": "Hello!"}]}'Example: Python
from openai import OpenAI
client = OpenAI(base_url="https://demo-en.alexshkarupa.com/v1", api_key="YOUR_KEY")
reply = client.chat.completions.create(
model="deepseek-v4.1-flash-1017-uncensored",
messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)Image, video, speech and music generation
The list of models with their parameters and “from” prices is at GET https://demo-en.alexshkarupa.com/v1/media/models. Generation is asynchronous: you create a job and poll its status. You can also generate without code — in your dashboard, under Media.
POST https://demo-en.alexshkarupa.com/v1/media/price— the exact price for the chosen parameters (same body as the generation).POST https://demo-en.alexshkarupa.com/v1/media/generate— body{model, prompt, opts, max_price?}; the response is202with ajobId.max_priceis your price cap for this job. TheIdempotency-Keyheader protects against a double start when a request is retried.GET https://demo-en.alexshkarupa.com/v1/media/jobs/{jobId}— statusprocessing/success/fail, result links inresultUrls, text (for speech recognition) inresultText.
You are charged once the result is ready, at the actual cost. Failed generations are free. To start a job your balance must cover its price plus the jobs still running. Result links work without a key (you can put them into <img>/<video>) and are kept for 7 days.
curl https://demo-en.alexshkarupa.com/v1/media/price \
-H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"model": "seedream-5-0-pro", "prompt": "A cat in space", "opts": {}}'curl https://demo-en.alexshkarupa.com/v1/media/generate \
-H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: my-order-42" \
-d '{"model": "seedream-5-0-pro", "prompt": "A cat in space", "opts": {}, "max_price": 50}'
# → 202 {"ok": true, "jobId": "…", "status": "processing", "price": 12.5, "currency": "USD"}
curl https://demo-en.alexshkarupa.com/v1/media/jobs/JOB_ID -H "Authorization: Bearer $API_KEY"
# → {"status": "success", "resultUrls": ["https://demo-en.alexshkarupa.com/v1/media/files/JOB_ID/0?sig=…"], "price": 12.5, "currency": "USD", …}Document reranking (rerank)
POST https://demo-en.alexshkarupa.com/v1/rerank orders documents by relevance to a query. The response: results — an array of {index, relevance_score}, most relevant first. Priced per input token, like embeddings.
curl https://demo-en.alexshkarupa.com/v1/rerank \
-H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"model": "rerank-model", "query": "How do I return an item?", "documents": ["Delivery takes 3 days", "Returns within 14 days"]}'Errors
401— wrong or disabled key;402— insufficient balance;422— the price cannot be calculated for these parameters, or it is abovemax_price;404— model or channel not found or disabled;429— too many requests;502,503,504— temporarily unavailable, retry the request.