Convert a file
convert_fileConvert a file, or run a tool on it, on the toolsforfree.app server. Name a conversion with from and to, or a tool with operation and format. Waits up to 40 seconds and returns a download link, with a small text result inline; a longer job comes back with what to pass to get_job. If you can run commands, send the raw file instead: curl --data-binary @FILE -H "content-type: application/octet-stream" "" answers {taskId, engine}; then call get_job with those and the target format.
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": {
"fileBase64": "<fileBase64>"
},
"name": "convert_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target format id, e.g. "mp4". | |
| from | No | Source format id, e.g. "mov". | |
| format | No | The file's format id, with operation. | |
| options | No | Settings, as the option fields search_tools returns for the conversion or tool, e.g. {"image":{"quality":80}}. Anything else is refused with a message naming the field. | |
| operation | No | A tool id from search_tools, e.g. "compress-video", instead of from and to. | |
| fileBase64 | Yes | The file, base64-encoded. At most 6 MB. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | ||
| next | No | ||
| error | No | ||
| state | No | ||
| engine | No | ||
| format | No | ||
| reason | No | ||
| taskId | No | ||
| expires | No | ||
| failure | No | ||
| message | No | ||
| download | No | ||
| progress | No | ||
| outputBytes | No | ||
| downloadBefore | No |