Convert a file from a URL
convert_fileEnd-to-end conversion of a remote file: fetches 'source_url' (with SSRF protection), uploads it to FileConvert, and starts a conversion from 'source_format' to 'target_format' (named by extension, e.g. png → webp, docx → pdf). Returns the conversion 'job_id' and the uploaded 'file_id'. Poll progress with get_job_status(job_id); when the status is Completed, call get_download_url(job_id) for the result. Conversions consume account credits. For a file you hold locally, use upload_file + start_conversion instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_url | Yes | Public http(s) URL of the file to convert. It is fetched server-side with SSRF protection (private/loopback/link-local/metadata targets are refused). Max 200 MiB. | |
| format_type | No | Optional category hint ('image', 'video', 'audio', 'document', 'archive', 'ebook'); only needed when an extension exists in several categories. | |
| source_format | No | Current format of the file, named by extension, e.g. 'png', 'docx', 'mp4'. Required unless source_format_id is given. | |
| target_format | No | Desired output format, named by extension, e.g. 'webp', 'pdf', 'mp3'. Must be in the same category as the source (image→image, document→document, …). Required unless target_format_id is given. | |
| format_type_id | No | Advanced: numeric format-type id from list_formats. Not needed when formats are given by name. | |
| source_format_id | No | Advanced: numeric id of the source format from list_formats. Alternative to source_format. | |
| target_format_id | No | Advanced: numeric id of the target format from list_formats. Alternative to target_format. | |
| additional_arguments | No | Optional free-form conversion arguments passed through to the converter. |