/v1/format-converter

Convert image files between JPG/PNG/WEBP.

Tool Usage Notes

Accepts one or multiple image URLs.
Choose output format: jpg, png, or webp.
If one image is converted, you get a single file.
If multiple images are converted, you get a ZIP file.

Estimate Before Processing

Use the estimate endpoint to preview token cost and validate your input URLs before starting conversion.

curl -X POST https://filemazing.com/v1/format-converter/estimate \
  -H "Authorization: Bearer fm_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": ["https://example.com/file"],
    "response_type": "json"
  }'
{
  "ok": true,
  "tool": "format-converter",
  "mode": "estimate",
  "estimated_tokens": 1,
  "available_tokens": 10,
  "enough_tokens": true,
  "shortfall_tokens": 0
}

Example Request

Set desired output image format.

curl -X POST https://filemazing.com/api/v1/format-converter \
  -H "Authorization: Bearer fm_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": ["https://example.com/source.webp"],
    "output_format": "png",
    "response_type": "json"
  }'

Request Parameters Breakdown

Parameter Required Type Options Default Example
inputs Yes array<string> HTTP/HTTPS URL(s) to image files none (required) ["https://example.com/source.webp"]
Provide one or more image URLs.
output_format Yes string jpg, png, webp none (required) png
Target output image format.
response_type No string json, xml, text json json
Controls API response payload format.
promo_code No string Any active promo code empty SPRING25
Optional; applies discount rules when valid.

Example Response

Converted output is available from the download URL.

{
  "ok": true,
  "tool": "format-converter",
  "mode": "sync",
  "status": "completed",
  "download_url": "https://filemazing.com/tool/format-converter/jobs/.../download",
  "estimated_tokens": 1,
  "final_tokens": 1
}

Response Fields Breakdown

Field Type Always Returned Example
ok boolean Yes true
Indicates success/failure.
tool string Yes format-converter
Tool identifier.
mode string Yes sync
Current execution mode.
status string Yes completed
Processing state.
download_url string Yes https://filemazing.com/tool/format-converter/jobs/.../download
Single file or ZIP download URL.
estimated_tokens integer Yes 1
Estimated reserved tokens.
final_tokens integer Yes 1
Final charged tokens.