API Overview
Authenticate with a Kensa API key and call the REST API at https://www.kensa.cc/api/v1.
The Kensa REST API lets you generate videos, check their status and read your credits from your own code. It uses the same models and the same credit balance as the web app.
Get an API key
API access is part of the Ultimate plan.
- Sign in and open API Keys from the account menu.
- Enter a name for the key and click Create.
- Copy the key. It starts with
kens_and is shown only once; Kensa stores only a hash of it.
You can revoke a key on the same page at any time. A revoked key stops working immediately. Keys also stop working when the account is no longer on the Ultimate plan.
Base URL
https://www.kensa.cc/api/v1Authentication
Send the key as a Bearer token in the Authorization header:
curl https://www.kensa.cc/api/v1/credit/balance \
-H "Authorization: Bearer kens_your_key"An x-api-key: kens_your_key header works too. Keep keys on your server; never put them in browser or mobile app code.
Requests and responses
Send request bodies as JSON with Content-Type: application/json. Every JSON response has a success field:
{ "success": true, "data": { } }{ "success": false, "error": { "message": "Unauthorized" } }Some errors also include error.details, for example { "reason": "insufficient_credits" }.
Status codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 400 | Invalid request: failed validation, an image that can't be read, or content that breaks the usage policy |
| 401 | Missing, unknown or revoked API key, or the account is not on the Ultimate plan |
| 402 | Not enough credits (details.reason: "insufficient_credits") |
| 404 | Video not found |
| 429 | Too many requests, or too many generations running at once (details.reason: "parallel_limit"). The Ultimate plan runs up to 5 generations at the same time. |
| 503 | The model is under maintenance (details.reason: "model_maintenance"), or the image check is temporarily unavailable |
| 500 | Unexpected server error |
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /video/generate | Start a generation |
| GET | /video/{uuid}/status | Check the status of a generation |
| GET | /video/{uuid} | Get a video |
| GET | /video/{uuid}/download | Download the MP4 file |
| GET | /video/list | List your videos |
| DELETE | /video/{uuid} | Delete a video |
| GET | /config/models | List the models and their options (no key needed) |
| GET | /credit/balance | Get your credit balance |
| GET | /credit/history | List your credit transactions |
Generations run asynchronously. There are no webhooks for API clients: poll the status endpoint until the video is COMPLETED or FAILED.