Convert
Change a file's format — mov → mp4, png → webp, or a document to PDF. The
file-first recipe takes the target format directly and lowers it to the wire for
you.
Audio formats
| Accepted | |
|---|---|
audio/aac · audio/flac · audio/mp4 · audio/mpeg · audio/ogg · audio/wav | Stable |
⚠️ This list is specific to convert. Each operation accepts its own set —
merge, for example, does not take audio/mp4.
Do not carry a list from one page to another; call getSchema() for the
authoritative set at runtime.
File-first
- TypeScript
- PHP
- Python
- Rust
const result = await client
.file('./clip.mov')
.convert('mp4')
.run({ maxWait: '10m' });
console.log(result.url);
$run = $client->file('./clip.mov')
->convert('mp4')
->run(maxWait: '10m');
echo $run->url;
Coming soon.
Coming soon.
convert(format) accepts a few extra options (image width/height/fit,
quality, GIF knobs, …); they are typed and validated before upload.
Batch convert
- TypeScript
- PHP
- Python
- Rust
const result = await client
.files(['./a.png', './b.png', './c.png'])
.convert('webp')
.run({ maxWait: '10m' });
$run = $client->files(['./a.png', './b.png', './c.png'])
->convert('webp')
->run(maxWait: '10m');
Coming soon.
Coming soon.