Api
API Errors
Vidrush v1 response codes, HTTP status codes, and common request fixes.
Error codes
code | HTTP status | Meaning | Fix |
|---|---|---|---|
0 | 200 | Success | Read data |
-1 | 400, 404, or 500 | Invalid request, inaccessible task, moderation block, or server error | Read message and use the matching HTTP status |
-1001 | 401 | Unauthorized | Send a valid Authorization: Bearer sk-... header |
-1002 | 402 | Insufficient credits | Do not retry the task; add credits before creating it again |
Common 400 responses
| Example message | Cause | Fix |
|---|---|---|
model is required | model was missing or empty | Send a model ID from GET /api/v1/models |
prompt is required | prompt was missing or empty | Send a non-empty prompt |
| `mode must be one of text-to-video | image-to-video | video-to-video |
image_urls must be an array of URLs | image_urls was not a string array | Send an array of public HTTP(S) URLs |
video_urls must be an array of URLs | video_urls was not a string array | Send an array of public HTTP(S) URLs |
options must be an object | options was not an object | Put generation controls in an object |
| `sora-2 text-to-video supports duration 4s | 8s | 12s, got 30s` |
... requires image_urls | A mode needs an image | Add the required public image URL(s) |
... requires image_urls and video_urls | Motion Control needs both inputs | Add both input arrays |
... requires options.source_video_duration_seconds when video_urls is provided | A per-second model received video input without its source duration | Send a positive source video duration in seconds |
For an unsupported video model or an unsupported mode/option combination, refresh GET /api/v1/models instead of retrying the same request.