Convert a file
convertChange a file to another format and return a download link. Provide a source URL or an uploaded file ID; set format-specific options from list_options.
Instructions
Convert a file to another format and return a download link. Give it one of: source_url (any URL the server can fetch — the best option when the file is already somewhere reachable) or import_id (from create_upload — the way in for a file on someone's device, whatever its size). Settings such as resizing, quality or codecs go in options — call list_options first to get the exact names for the conversion. Runs against your account and counts toward your quota.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | Conversion settings, keyed by the option names from list_options. Names differ per conversion, so do not guess them. | |
| filename | No | File name of the source, e.g. "photo.jpg". | |
| import_id | No | Id returned by create_upload, after the bytes have been PUT to its upload URL. | |
| source_url | No | URL of the file to convert, fetched by our server. Any link reachable from the internet works. | |
| input_format | No | Source format (optional; inferred from the file name or URL). | |
| output_format | Yes | Target format, e.g. "jpg", "pdf", "mp3". |