Convert

Start a media conversion job

Submits conversion options and dispatches the job to the worker queue. All files must be fully uploaded via TUS and show "status":"completed" (verify with GET /api/convert/session/{uid}/files) before calling this endpoint.

The call is idempotent: calling it again for a session that already has a job returns the existing job without creating a duplicate.

Authentication: X-Api-Key header required.

post/api/convert/job

Request

  • Base URL: https://snapwonders.com
  • URL: https://snapwonders.com/api/convert/job
  • Auth: API key in header X-Api-Key

Request body

upload_uidstring uuid required

The upload_uid returned by POST /api/convert/session

image_format'jpeg' | 'png' | 'webp' | 'avif' | 'heic' | 'jxl'

Output format for image files. Default: jpeg.

video_format'mp4h264' | 'mp4h265' | 'webm' | 'mkv' | 'mov'

Output format for video files. Default: mp4h264.

image_qualityinteger

JPEG/WebP output quality 1–100. Default: 85.

video_crfinteger

Video CRF value 0–51 (lower = better quality). Default: 23.

video_max_dimension480 | 720 | 1080

Cap video resolution to this height in pixels. Omit or set to 0 to keep original resolution.

strip_metadataboolean

Strip EXIF/GPS/encoder metadata from output files. Default: false.

image_resize_widthinteger

Resize images to fit within this bounding-box width in pixels. Longest-edge fit, aspect ratio preserved, no upscaling. Omit for no resize.

image_resize_heightinteger

Resize images to fit within this bounding-box height in pixels. Longest-edge fit, aspect ratio preserved, no upscaling. Omit for no resize.

pdf_dpiinteger

PDF only. Render resolution in DPI. Default: 150.

pdf_page_frominteger

PDF only. First page to render, 1-based. Default: 1.

pdf_page_tointeger

PDF only. Last page to render, 1-based. 0 means all pages. Default: 0.

expiry'1h' | '12h' | '1d' | '2d' | '1w' | '1m'

How long the result download links remain accessible after the job completes. 1h = 1 hour, 12h = 12 hours, 1d = 1 day (default), 2d = 2 days, 1w = 1 week, 1m = 1 month. Free-tier keys are silently clamped to upload.free_max_expiry (default 1d): the job still succeeds, but anything longer is reduced. Pro accounts get the requested value. No response currently returns the granted expiry, so assume the free maximum unless the owning account is Pro.

Example request

{
  "upload_uid": "550e8400-e29b-41d4-a716-446655440000",
  "image_format": "webp",
  "video_format": "mp4h264",
  "image_quality": 85,
  "video_crf": 23,
  "video_max_dimension": 1080,
  "image_resize_width": 1920,
  "image_resize_height": 1080,
  "pdf_dpi": 150,
  "pdf_page_from": 1,
  "expiry": "1d"
}

Response

Job already exists (idempotent repeat call) — returns existing job

Changes

No recorded changes to this operation across all 1 revision of this API.