{"openapi":"3.1.0","info":{"title":"Convert API","version":"1.0.0","summary":"File conversion across 74 input formats and 897 conversion pairs.","description":"Convert files between images, audio, video, documents, ebooks, archives and fonts.\n\n**No account.** `POST /v1/keys` issues a key immediately; there is no signup and no email.\n\n**Nothing is kept.** Inputs are deleted as soon as the output exists, and outputs 15 minutes after the conversion finishes. That applies to the database rows too, not just the files.\n\n**Conversions are asynchronous.** `POST /v1/conversions` returns `202` with a job id; poll `GET /v1/conversions/{id}` until `status` is `done`, then follow `output.url`.","contact":{"name":"Convert","url":"https://n3d-convert.com/api"},"license":{"name":"Free to use, no warranty","identifier":"MIT"}},"servers":[{"url":"https://n3d-convert.com","description":"Production"}],"tags":[{"name":"Keys","description":"Self-service API keys"},{"name":"Conversions","description":"Convert a file and collect the result"},{"name":"Catalogue","description":"What can be converted into what"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Send `Authorization: Bearer ck_…`."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative to the bearer header."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","description":"Stable machine-readable code. Branch on this, not on the message.","enum":["missing_key","invalid_key","revoked_key","rate_limited","quota_exceeded","unsupported_content_type","no_file","missing_target","file_too_large","unknown_format","unknown_target","unsupported_conversion","unreadable","not_found","not_ready","expired","bad_request"]},"message":{"type":"string","description":"Human-readable. May be reworded at any time."}}}}},"Conversion":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","error","expired"]},"progress":{"type":"integer","minimum":0,"maximum":100},"source_format":{"type":"string","examples":["jpg"]},"target_format":{"type":"string","examples":["png"]},"error":{"type":["string","null"],"description":"Set when status is \"error\"."},"output":{"type":["object","null"],"description":"Null until the conversion is done.","properties":{"filename":{"type":"string"},"bytes":{"type":"integer"},"url":{"type":"string","format":"uri"}}},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the output file is deleted."}}},"Quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"},"window_seconds":{"type":"integer"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"paths":{"/v1/keys":{"post":{"tags":["Keys"],"summary":"Create an API key","description":"Returns the key once and never again — only its hash is stored. Limited to 3 keys per IP per day.","security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":60,"description":"Your own note. Never shown to anyone else."}}}}}},"responses":{"201":{"description":"Key created.","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","examples":["ck_a1b2c3d4_…"]},"key_id":{"type":"string"},"warning":{"type":"string"},"quotas":{"type":"object"}}}}}},"429":{"description":"Key-creation limit for this IP reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversions":{"post":{"tags":["Conversions"],"summary":"Convert a file","description":"Upload a file and the format you want. Returns `202` immediately with a job — conversion happens in the background.\n\nSingle-request uploads are capped at 90 MB, which is what the CDN in front of this API allows in one body. Larger files go through the web UI.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","target"],"properties":{"file":{"type":"string","format":"binary","description":"The file. Its real type is detected from the bytes, not the extension."},"target":{"type":"string","enum":["3gp","7z","aac","ac3","aiff","amr","avi","avif","azw3","bmp","cbz","csv","dds","doc","docx","epub","fb2","flac","flv","gif","heic","html","htmlz","ico","jp2","jpg","m4a","md","mkv","mobi","mov","mp3","mp4","mpeg","odp","ods","odt","ogg","ogv","opus","otf","pcx","pdb","pdf","png","ppm","ppt","pptx","rtf","tar","tarbz2","targz","tarxz","tga","tiff","ts","ttf","txt","wav","webm","webp","wma","wmv","woff","woff2","xls","xlsx","xpm","zip"],"description":"Output format."},"quality":{"type":"integer","minimum":1,"maximum":100,"description":"Converter option, where the engine supports one."}}}}}},"responses":{"202":{"description":"Accepted. Poll the job.","headers":{"Location":{"schema":{"type":"string"},"description":"URL of the new conversion."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"400":{"description":"No target given, or a target this API does not know.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File larger than the single-request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Body was not multipart, or the file type is unrecognised.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"That source cannot be converted to that target.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily conversion or byte quota exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Conversions"],"summary":"List your recent conversions","responses":{"200":{"description":"Up to 50 recent conversions for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"conversions":{"type":"array","items":{"$ref":"#/components/schemas/Conversion"}}}}}}}}}},"/v1/conversions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Conversions"],"summary":"Check a conversion","responses":{"200":{"description":"Current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"404":{"description":"No such conversion, or it belongs to another key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Conversions"],"summary":"Delete a conversion and its output now","description":"Everything is deleted on a timer anyway; this makes it immediate.","responses":{"204":{"description":"Deleted."},"404":{"description":"No such conversion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversions/{id}/download":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Conversions"],"summary":"Download the output","description":"Redirects to the file. Supports range requests and resumable transfers.","responses":{"302":{"description":"Redirect to the file."},"404":{"description":"No such conversion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not finished yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Output has been deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"tags":["Keys"],"summary":"Your quota state","responses":{"200":{"description":"Current usage.","content":{"application/json":{"schema":{"type":"object","properties":{"key_id":{"type":"string"},"label":{"type":["string","null"]},"conversions_all_time":{"type":"integer"},"quotas":{"type":"object","properties":{"conversions":{"$ref":"#/components/schemas/Quota"},"bytes":{"$ref":"#/components/schemas/Quota"},"burst":{"$ref":"#/components/schemas/Quota"}}}}}}}}}}},"/v1/keys/current":{"delete":{"tags":["Keys"],"summary":"Revoke the key you are using","description":"Immediate and irreversible. Create a new one with POST /v1/keys.","responses":{"204":{"description":"Revoked."}}}},"/v1/formats":{"get":{"tags":["Catalogue"],"summary":"Every format and conversion pair","security":[],"responses":{"200":{"description":"74 input formats, 897 pairs.","content":{"application/json":{"schema":{"type":"object","properties":{"formats":{"type":"object","description":"key → { label, cat, mime, exts }"},"categories":{"type":"object"},"conversions":{"type":"object","description":"source format → array of target formats"},"limits":{"type":"object"}}}}}}}}}}}