api.horny.studio
API reference
Queue, files, webhook and error codes. Calls go to https://api.horny.studio/v1. The catalog and prices are open on the API page.
Catalog and pricesapi.horny.studio/v1Quick start
First request
Base URL: https://api.horny.studio/v1
curl -X POST https://api.horny.studio/v1/queue/bytedance/seedance-2.5/text-to-video \
-H "Authorization: Key ch_live_…" \
-H "Content-Type: application/json" \
-d '{"prompt":"a quiet street at dusk, handheld","duration_seconds":8,"resolution":"1080p","generate_audio":true}'- The 202 response contains request_id, status_url, response_url and cancel_url.
- Poll status_url every 2–5 seconds or pass webhook_url.
- On COMPLETED fetch the result from response_url. File links are valid for 24 hours.
For AI agents
Machine-readable sources
Reference
Methods
| GET | /models | Model catalog, units and prices |
| POST | /estimate | Exact request cost before launch |
| POST | /chat/completions | Text model: messages and max_tokens, a direct reply or a stream |
| POST | /queue/{model_id} | Queue a generation, 202 response with request_id |
| GET | /requests/{id}/status | Status: IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED |
| GET | /requests/{id}/response | Result with signed file links |
| PUT | /requests/{id}/cancel | Cancel a queued request |
| POST | /files | Upload an input file, returns file_id |
| GET | /requests/{id} | Request card: status, quote, actual charge |
Webhooks
Completion notification
Pass webhook_url in the query or body. Treat the notification as a signal to fetch the result: confirm it via response_url with your key.
POST https://api.horny.studio/v1/queue/bytedance/seedance-2.5/text-to-video?webhook_url=https://example.com/hooks/imhorny
// после завершения на webhook_url придёт POST
{
"request_id": "req_9f2c…",
"status": "COMPLETED",
"response_url": "https://api.horny.studio/v1/requests/req_9f2c…/response"
}Files
Input files
POST /v1/files with the bytes and a Content-Type. The response holds a file_id like chfile_…, which goes into any URL field of the input.
- Public https links to input files are accepted as well
- Results are not archived: a signed link lives 24 hours, then 410
- An Idempotency-Key header protects against duplicate submits
Errors
Response codes
| 401 | unauthorized | Key missing, revoked or invalid |
| 402 | insufficient_balance | The shared USDT balance cannot cover the hold. Top up in the studio account. There is no separate wallet |
| 402 | key_limit_reached | The key's monthly limit is reached |
| 400 | unknown_model · unpriceable | Model not in the catalog or inputs do not allow pricing |
| 409 | idempotency_conflict | Same Idempotency-Key with a different body |
| 409 | request_not_ready | Result requested before completion |
| 429 | rate_limited | Key RPM or concurrency limit exceeded |
| 503 | capacity_unavailable | Capacity temporarily unavailable — retry later, nothing was charged |
| 410 | expired | The signed link (24 hours) has expired |