Konvertio API
REST API for file conversion. Integrate video, audio, image, document, and archive conversion directly into your app.
/priser/api/v1
Introduction
The Konvertio API lets you convert files programmatically. The API is asynchronous: you send a file, get a job_id back, poll the status, and download the result.
Authentication
All API calls require an API key in the header X-API-Key.
X-API-Key: kv_live_din_nokkel_her
kv_demo_lett_886555866155
Quickstart (5 minutes)
/api/v1/convert/api/v1/status/{port}/{job_id} til status == "done"/api/v1/download/{port}/{job_id}POST /api/v1/convert
Uploads a file and starts conversion.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | β | The file to convert (multipart/form-data) |
output_format | string | β | Output format, e.g. mp4, pdf, mp3 |
quality | string | β | high / medium / low (standard: medium) |
Response 202
{
"job_id": "a3f8c2d1-...",
"status": "queued",
"status_url": "/priser/api/v1/status/5001/a3f8c2d1-...",
"service_port": 5001
}
GET /api/v1/status/{port}/{job_id}
Check the status of a conversion job. Poll every 1β2 seconds.
Response
{
"status": "processing", // queued | processing | done | error
"progress": 65, // 0β100
"message": "Converting⦠12s / 28s",
"output_file": null // filename when done
}
GET /api/v1/download/{port}/{job_id}
Download the converted file. Returns a binary stream with the correct Content-Type.
GET /api/v1/formats
List of all supported input and output formats.
{
"video": ["mp4","avi","mov","mkv","webm","flv","wmv","gif","mp3","aac"],
"audio": ["mp3","wav","flac","aac","ogg","opus","m4a","wma","aiff","ac3"],
"image": ["jpg","png","webp","gif","bmp","tiff","ico","pdf"],
"document": ["pdf","docx","doc","odt","rtf","txt","html","xlsx","ods","csv","pptx","odp"],
"archive": ["zip","tar.gz","tar.bz2","tar.xz","tar","7z"]
}
GET /api/key/info
Check the current quota status for your API key.
{
"plan": "basis",
"plan_name": "Basis",
"calls_today": 47,
"calls_month": 1243,
"limit_day": 500,
"limit_month": 10000,
"max_file_mb": 2000,
"priority": "high"
}
Error codes
| Code | Meaning |
|---|---|
400 | Invalid request (missing field, invalid format) |
401 | Invalid or missing API key |
413 | File exceeds the plan's file size limit |
429 | Quota exceeded β daily or monthly limit reached |
503 | Microservice unavailable (check that it's running) |
Python example
import requests, time
API_KEY = "kv_demo_lett_886555866155"
BASE = "/priser/api/v1"
HEADERS = {"X-API-Key": API_KEY}
# 1. Upload and start conversion
with open("video.mp4", "rb") as f:
resp = requests.post(
f"{BASE}/convert",
headers=HEADERS,
files={"file": f},
data={"output_format": "mp3", "quality": "high"}
)
job = resp.json()
port = job["service_port"]
jid = job["job_id"]
print(f"Jobb startet: {jid}")
# 2. Poll until done
while True:
s = requests.get(f"{BASE}/status/{port}/{jid}", headers=HEADERS).json()
print(f" {s['progress']}% β {s['message']}")
if s["status"] == "done":
break
if s["status"] == "error":
raise Exception(s["message"])
time.sleep(1.5)
# 3. Download
r = requests.get(f"{BASE}/download/{port}/{jid}", headers=HEADERS)
with open("output.mp3", "wb") as f:
f.write(r.content)
print("β
Lagret som output.mp3")
Rate limits
| Limit | Value | Per |
|---|---|---|
| Uploads | 5 | minute per IP |
| Status polling | 60 | minute per IP |
| All requests | 120 | minute per IP |
On exceeding the limit, HTTP 429 is returned with retry_after in seconds.
Plans and API quotas
| Plan | Price/mo | API calls/mo | Max file | Priority |
|---|---|---|---|---|
| Light | $8.99 | 1000 | 1000 MB | Normal |
| Basic | $13.99 | 10000 | 2000 MB | High |
| Unlimited | $24.99 | β | β | Highest |
| Enterprise | Contact | β | β | Dedicated |
API plans for developers
Dedicated plans for developers building on the Konvertio API. High volume? Contact us.
- β 1 000 API-kall/mnd
- β Alle formater
- β REST API
- β E-poststotte
- β Filer slettes automatisk
- β 10 000 API-kall/mnd
- β Fast conversion
- β Alle formater
- β Prioritert stotte
- β 99,5% oppetid (mal)
- β 30 000 API-kall/mnd
- β Hoyeste prioritet
- β Alle formater
- β Rask stotte
- β 99,5% oppetid (mal)
- β Unlimited volume
- β Dedicated server
- β SLA agreement
- β Dedicated contact
- β Invoice billing