Quick start
Submit your first file conversion in 30 seconds. cURL and Python examples included.
Convert a PNG to a JPG
curl -u "$CONVERTERER_API_KEY:" \
https://api.converterer.com/convert \
-F "input=@photo.png" \
-F "output_format=jpg"
Response (201 Created):
{
"id": "9f1a8e7c-1b9b-4f0a-9d2c-1a2b3c4d5e6f",
"status": "queued",
"done": false,
"object": "conversion-task"
}
Poll for completion
curl -u "$CONVERTERER_API_KEY:" \
https://api.converterer.com/convert/9f1a8e7c-1b9b-4f0a-9d2c-1a2b3c4d5e6f
When done is true and status is delivered, the file is in your destination’s storage at {id}.{output_format} (or whatever file_name you passed on submission). Retrieve it directly from your bucket.
Same flow in Python
import os, time, requests
API = "https://api.converterer.com"
auth = (os.environ["CONVERTERER_API_KEY"], "")
with open("photo.png", "rb") as f:
r = requests.post(
f"{API}/convert",
auth=auth,
files={"input": ("photo.png", f, "image/png")},
data={"output_format": "jpg"},
)
task = r.json()
while not task["done"]:
time.sleep(2)
task = requests.get(f"{API}/convert/{task['id']}", auth=auth).json()
print(task["status"]) # "delivered"
That’s the whole loop: submit, poll, fetch. For production use you’ll likely want webhooks instead of polling.