Api

API Errors

Vidrush v1 response codes, HTTP status codes, and common request fixes.

Error codes

codeHTTP statusMeaningFix
0200SuccessRead data
-1400, 404, or 500Invalid request, inaccessible task, moderation block, or server errorRead message and use the matching HTTP status
-1001401UnauthorizedSend a valid Authorization: Bearer sk-... header
-1002402Insufficient creditsDo not retry the task; add credits before creating it again

Common 400 responses

Example messageCauseFix
model is requiredmodel was missing or emptySend a model ID from GET /api/v1/models
prompt is requiredprompt was missing or emptySend a non-empty prompt
`mode must be one of text-to-videoimage-to-videovideo-to-video
image_urls must be an array of URLsimage_urls was not a string arraySend an array of public HTTP(S) URLs
video_urls must be an array of URLsvideo_urls was not a string arraySend an array of public HTTP(S) URLs
options must be an objectoptions was not an objectPut generation controls in an object
`sora-2 text-to-video supports duration 4s8s12s, got 30s`
... requires image_urlsA mode needs an imageAdd the required public image URL(s)
... requires image_urls and video_urlsMotion Control needs both inputsAdd both input arrays
... requires options.source_video_duration_seconds when video_urls is providedA per-second model received video input without its source durationSend 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.