Skip to main content
POST
Convert a File
Convert one image or video to another format and get the converted file back. Nothing is stored, no post is created, and no quota is used.

Headers

Behavior

  • Send the file as multipart/form-data in the file field. Only the first file is read.
  • On success the body is the converted file itself, sent as an attachment, not JSON. Errors are JSON like every other endpoint.
  • The source type is detected from the file’s bytes, not its name.
  • What converts to what: PNG, JPG and WebP convert to png, jpeg, webp, avif or gif. GIF converts to png, jpeg, webp, avif or mp4. MP4, MOV and MKV convert to mp4, gif or mp3.
  • Video to GIF requires Plus. It uses the first 10 seconds at 15 fps and 480 px wide.
  • MP4 output is remuxed with +faststart when the source is already H.264, and transcoded otherwise.
  • Metadata is always stripped. JPG orientation is applied to the pixels first, so photos stay upright.
  • Files are capped at 50 MB on Free, 20 GB on Plus, and 50 GB on Ultra and team keys. Converting does not count toward your weekly quota.
  • Conversion runs inside the request, so a large video can take a while.
  • To host the result, upload it with POST /upload. AVIF and MP3 are not upload types, so those are download-only.
  • Rate limited to 10 conversions per minute.

Examples

Responses

On success the headers name the file:
On failure the body is JSON:

Errors

Authorizations

relay-key
string
header
required

Your relay key from snipp.gg/settings/relay

Headers

convert-target
enum<string>
required

Output format.

Available options:
png,
jpeg,
webp,
avif,
gif,
mp4,
mp3

Body

multipart/form-data
file
file
required

The file to convert.

Response

The converted file, sent as an attachment.

The response is of type file.