Browse Docs
Archives (14)
Audio (38)
Documents (26)
Ebooks (7)
Fonts (13)
Images (62)
Video (10)
On This Page

Getting Started

Base URL

https://api.tools.fast

1) Get an API key

Create a free account — you'll get 500 Pro credits that never expire, no credit card required. Then go to API Keys and create a key. Pass it in the X-Fast-Api-Key header with every request. The CLI wrappers in step 3 read the TOOLS_FAST_API_KEY environment variable. The inline examples below use a local API_KEY shell variable for brevity.

2) Convert a file

Convert.FAST uses an async 3-step flow: submit, poll, download.

The cURL examples use jq for JSON parsing.

cURL
API_KEY="fast_prod_your_key_here"

# 1) submit
JOB_ID=$(curl -sS -X POST "https://api.tools.fast/convert" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@photo.heic" \
  -F "targetFormat=jpg" | jq -r '.id')
# → 202 Accepted: {"id": "019e...", "status": "Queued", "creditCost": 1}

# 2) poll
# Add a timeout (e.g. 5 minutes) in production
while true; do
  RESPONSE=$(curl -sS "https://api.tools.fast/convert/job/${JOB_ID}" \
    -H "X-Fast-Api-Key: $API_KEY")
  STATUS=$(echo "$RESPONSE" | jq -r '.status')
  [ "${STATUS}" = "Succeeded" ] && break
  [ "${STATUS}" = "Failed" ] || [ "${STATUS}" = "Canceled" ] && exit 1
  sleep 1
done

# 3) download (output.fileName tells you the correct filename)
FILENAME=$(echo "$RESPONSE" | jq -r '.output.fileName')
curl -sS "https://api.tools.fast/convert/job/${JOB_ID}/download" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -o "./${FILENAME}"
PowerShell
$ApiKey = "fast_prod_your_key_here"

# 1) submit
$job = Invoke-RestMethod -Method Post "https://api.tools.fast/convert" `
  -Headers @{ "X-Fast-Api-Key" = $ApiKey } `
  -Form @{ file = Get-Item "photo.heic"; targetFormat = "jpg" }

# 2) poll
do {
  $status = Invoke-RestMethod "https://api.tools.fast/convert/job/$($job.id)" `
    -Headers @{ "X-Fast-Api-Key" = $ApiKey }
  if ($status.status -in "Failed", "Canceled") { throw "Job $($job.id) $($status.status)" }
  Start-Sleep -Seconds 1
} while ($status.status -ne "Succeeded")

# 3) download (output.fileName tells you the correct filename)
Invoke-RestMethod "https://api.tools.fast/convert/job/$($job.id)/download" `
  -Headers @{ "X-Fast-Api-Key" = $ApiKey } -OutFile "./$($status.output.fileName)"

See the Conversion endpoint for full details.

Compound targetFormats: Most conversions use simple format names (jpg, pdf, mp3), but some converters have compound names — e.g. bank-statement-excel, pdf-ocr. Use GET /convert/conversions to discover the exact targetFormat values.

3) CLI wrappers

For quick scripts or LLM agent use, our CLI wrappers handle submit, poll, and download in a single command.

cURL
curl -fsSL https://convert.fast/convert.fast.sh -o convert.fast.sh && chmod +x convert.fast.sh
export TOOLS_FAST_API_KEY="fast_prod_your_key_here"

./convert.fast.sh photo.heic jpg
./convert.fast.sh document.pdf docx
./convert.fast.sh scan.pdf docx output.docx '{"ocr":{"enabled":true}}'
PowerShell
Invoke-RestMethod "https://convert.fast/convert.fast.ps1" -OutFile convert.fast.ps1
$env:TOOLS_FAST_API_KEY = "fast_prod_your_key_here"

./convert.fast.ps1 photo.heic jpg
./convert.fast.ps1 document.pdf docx
./convert.fast.ps1 scan.pdf docx output.docx '{"ocr":{"enabled":true}}'

Output filename

The wrappers determine the output filename in this order:

  1. Your output argument./convert.fast.sh photo.heic jpg my-photo.jpg
  2. API-provided filename — if you omit the output argument, the wrapper uses output.fileName from the job status response (the authoritative filename)
  3. Fallback — input stem + target extension (e.g. photo.jpg)

If you provide an output path but its extension doesn't match the actual output, the wrapper auto-corrects the extension and prints a warning. This matters for multi-output conversions (e.g. PDF→JPG with many pages) where the download is a ZIP archive — the wrapper will correct output.jpg to output.zip.

Copied.