Transcode Video
The transcode recipe converts media between formats. Use it to go from MOV to MP4, MP4 to WebM, or to extract audio from video into MP3/AAC/WAV.
Basic usage
Section titled “Basic usage”Convert an MOV file to MP4:
curl -X POST https://api.xora.sh/v1/jobs \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mode": "recipe", "input": { "url": "https://example.com/recording.mov" }, "output": { "format": "mp4" }, "recipe": { "name": "transcode" } }'const response = await fetch('https://api.xora.sh/v1/jobs', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ mode: 'recipe', input: { url: 'https://example.com/recording.mov' }, output: { format: 'mp4' }, recipe: { name: 'transcode' } })});const data = await response.json();console.log(data);import requests
response = requests.post( "https://api.xora.sh/v1/jobs", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "mode": "recipe", "input": { "url": "https://example.com/recording.mov" }, "output": { "format": "mp4" }, "recipe": { "name": "transcode" } })data = response.json()print(data)Response
Section titled “Response”{ "jobId": "01JXYZ1234ABCDEF56789000", "state": "queued"}Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Must be "transcode" |
The transcode recipe takes no extra parameters — the output format in output.format determines the conversion target.
Supported conversions
Section titled “Supported conversions”| Input → Output | Example use case |
|---|---|
MOV → mp4 | iPhone recordings for web delivery |
MP4 → webm | Optimized web video |
WebM → mp4 | Browser recording to universal format |
MP4 → mp3 | Extract audio track as MP3 |
Video → aac | Extract audio as AAC |
Video → wav | Lossless audio extraction |
Output formats
Section titled “Output formats”| Format | Type |
|---|---|
mp4 | Video |
webm | Video |
mov | Video |
mp3 | Audio |
aac | Audio |
wav | Audio |
Examples
Section titled “Examples”MOV to MP4
Section titled “MOV to MP4”{ "mode": "recipe", "input": { "url": "https://example.com/recording.mov" }, "output": { "format": "mp4" }, "recipe": { "name": "transcode" }}MP4 to WebM
Section titled “MP4 to WebM”{ "mode": "recipe", "input": { "url": "https://example.com/video.mp4" }, "output": { "format": "webm" }, "recipe": { "name": "transcode" }}Video to MP3 (audio extraction)
Section titled “Video to MP3 (audio extraction)”{ "mode": "recipe", "input": { "url": "https://example.com/interview.mp4" }, "output": { "format": "mp3" }, "recipe": { "name": "transcode" }}