Convert a file
convert_fileConvert a file to another format. Give exactly one of url (public link to the file) or content_base64 (file content, max 10 MB), plus output_format. The call waits up to wait_seconds (default 50, max 80) for the result. When the status is succeeded, the answer contains the download_url and the time it expires (files are deleted after 24 hours). When the status is queued or processing, call get_conversion with the id. Costs 1 credit per conversion of an input up to 100 MB (100 free credits per month); failed conversions are refunded. Needs an API key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output_format": "<output_format>"
},
"name": "convert_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | public http(s) URL of the file to convert. Use this or content_base64, not both. | |
| filename | No | file name with extension, for example clip.mp4. Required with content_base64 unless input_format is set. | |
| settings | No | optional conversion settings as a JSON object, for example {"bitrate":"192k"} | |
| input_format | No | source format. Default: the file extension. | |
| wait_seconds | No | seconds to wait for the result, 0 to 80. Default 50. | |
| output_format | Yes | target format, for example mp3, pdf or webp | |
| content_base64 | No | the file content, base64 encoded, max 10 MB decoded. Use this or url, not both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | conversion id | |
| error | No | ||
| input | No | ||
| output | No | ||
| status | Yes | queued, processing, succeeded or failed | |
| progress | Yes | progress in percent | |
| created_at | No | ||
| finished_at | No | ||
| credits_charged | Yes |