VidLabDocsDashboard
ReferenceMarkdown

Uploads

A file on your machine goes into a generation as a link. POST /v1/uploads takes the file itself as the request body (no multipart), stores it with us and answers with a link to put in images, end_image, video or audio. It is free.

curl -s -X POST https://vidlab.ai/v1/uploads \
  -H "Authorization: Bearer $VIDLAB_API_KEY" \
  -H "Content-Type: image/png" \
  -H "X-File-Name: presenter.png" \
  --data-binary @presenter.png
json
{
  "data": {
    "url": "https://...",
    "mime": "image/png",
    "bytes": 48213,
    "kind": "image",
    "expires_at": "2026-11-09T12:00:00.000Z"
  }
}
PartWhat it is
BodyThe file's bytes.
Content-TypeThe file's real type. It is checked against the file's first bytes.
X-File-NameOptional. Your own record of the name; it never becomes part of the link.
urlThe link to send in an input field. Works for about a week.
kindimage, video or audio.

Types and sizes

KindTypesLargest upload
ImageJPEG, PNG, WEBP, GIF20 MB
VideoMP4, MOV, WEBM200 MB
AudioMP3, WAV, M4A, OGG, WEBM50 MB
  • Files are deleted 7 days after the upload.
  • A file that is not what its Content-Type says, or any other type (SVG and HTML included), is refused with 415 unsupported_media_type. A file over its limit answers 413 file_too_large. Too many uploads answers 429 (rate_limited, or daily_upload_limit once an account has used its daily share).

Other ways to send a file

  • A public https link to a file you host anywhere that serves it without sign-in (a link that lives at least a few minutes). Largest: image 20 MB, video 500 MB, audio 50 MB. Media must download directly.
  • A base64 data URL, data:<type>;base64,<bytes>, for a small file. The whole request body can be at most 2 MB, and base64 makes a file a third bigger, so send anything larger as a link.
  • At most 24 files in one generation.

While the generation is queued, VidLab reads each file once, checks its type and size and measures every video and sound. The route gets VidLab's own short-lived copy, never your link, and the copy is deleted when the generation finishes. A file that cannot be used fails the generation before it reaches a route, so nothing is charged:

Failure codeWhyFix
invalid_inputThe link could not be downloaded or took too long (5 minutes), the file is over its kind's limit, it is empty, or it is not the kind of file the field takes. The message says which.Send a public https link or upload the file, a smaller one if it was too large, and the right file type.