Errors & limits

Error format, status codes, rate limits and retry advice for the VideoUpscaler API, including how to retry an upscale safely with an Idempotency-Key.

Error format

Every error has the same JSON shape. Use code in your code; message is for people and may change.

{
  "error": {
    "code": "insufficient_credits",
    "message": "Not enough credits for this video. Buy credits to continue."
  }
}

Status codes

StatusCodeMeaningRetry?
400invalid_requestThe request is malformedNo — fix the request
401unauthorizedMissing or invalid API keyNo
402insufficient_creditsNot enough creditsAfter buying credits
403paid_plan_requiredThe account has never bought credits or subscribedAfter buying credits
403invalid_upload_tokenUpload URL invalid or expiredRequest a new upload URL
403invalid_stream_tokenEvent stream URL invalid or expiredOpen /tasks/{id}/events again
404not_foundNo such task in your accountNo
409idempotency_conflictIdempotency-Key reused with other parametersUse a new key
411invalid_requestUpload PUT without a body or Content-LengthNo — fix the request
413file_too_largeVideo over the size limitNo
422video_fetch_failedvideo_url couldn't be downloadedAfter fixing the URL
422unsupported_videoNot a readable MP4, MOV or WebMNo
422video_too_longVideo longer than the limit for its resolutionNo
422video_not_foundNothing was uploaded at this video_urlAfter the upload finishes
429rate_limitedToo many requestsYes, after Retry-After seconds
500internal_errorSomething went wrong on our sideYes, with the same Idempotency-Key
502upstream_errorProcessing couldn't start; any charge was refundedYes, with a new Idempotency-Key
504upstream_timeoutDownloading video_url took too longYes, or use a faster host

Limits

LimitValue
RequestsAbout 120 per minute per API key
Video length1200 seconds at 1080p, 600 seconds at 2k and 4k
Remote video_url size500MB
Uploaded file size100MB
Upload URL lifetime1 hour
Active API keys20 per account

Retrying safely

Always send an Idempotency-Key to /upscale. If a request times out or you get a 500 or 504, retry with the same key: you get the task that was already created instead of a second charge.

A 502 upstream_error is different: the task was created, failed to start and was refunded, so the same key keeps returning that failed task. Retry with a new key.