Api
API Overview
Base URL, authentication, response envelope, task lifecycle, and HTTP semantics for the Vidrush v1 media API.
Base URL
https://vidrush-ai.com| Method | Endpoint | Authentication | Purpose |
|---|---|---|---|
GET | /api/v1/models | No | Model catalog and pricing; ?type=video (default), image, or music |
GET | /api/v1/voices | Bearer key | Text-to-speech voice catalog |
POST | /api/v1/videos | Bearer key | Create a credit-consuming video task |
POST | /api/v1/images | Bearer key | Create an image task |
POST | /api/v1/music | Bearer key | Create a music task |
POST | /api/v1/speech | Bearer key | Convert text to speech |
POST | /api/v1/sound-effects | Bearer key | Generate a sound effect |
GET | /api/v1/tasks/{taskId} | Bearer key | Read task status and result URLs (all media types) |
GET | /api/v1/credits | Bearer key | Read remaining credits |
Authenticated requests use Authorization: Bearer sk-.... See Authentication.
Response envelope
Every v1 response is JSON with this envelope:
{
"code": 0,
"message": "ok",
"data": {}
}Use the HTTP status for transport handling and code for the business result.
| HTTP status | code | Meaning |
|---|---|---|
200 | 0 | Successful request |
400 | -1 | Invalid request, model, option, or moderation block |
401 | -1001 | Missing or invalid API key |
402 | -1002 | Insufficient credits |
404 | -1 | Task does not exist or is not accessible to this key |
500 | -1 | Internal server error |
Task lifecycle
Video and image creation are asynchronous — after the create call, poll GET /api/v1/tasks/{taskId} every 5 seconds. Music and audio render synchronously and usually return success with the result URL in the create response; the same taskId still resolves through the task endpoint for a uniform flow.
| Status | Action |
|---|---|
pending | Continue polling |
processing | Continue polling |
success | Read the generated URLs from data.taskUrls |
failed | Stop and report the task failure |
canceled | Stop and report that the task was canceled |
Continue with Video, Image, Music, or Audio generation, Tasks, or the model reference.