{"components":{"schemas":{"Account":{"additionalProperties":false,"properties":{"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Paid credits left on the account","type":"integer"}],"description":"Paid credits left on the account"},"email":{"type":"string"},"end_user_quota":{"additionalProperties":false,"description":"Only with X-End-User: the free quota of the visitor","properties":{"files_per_day":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"files_used":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"The higher of the counts for the visitor and for the IP address","type":"integer"}],"description":"The higher of the counts for the visitor and for the IP address"},"reset_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"video_minutes_per_day":{"type":"number"},"video_minutes_used":{"description":"The higher of the counts for the visitor and for the IP address","type":"number"}},"required":["files_per_day","files_used","video_minutes_per_day","video_minutes_used","reset_at"],"type":"object"},"free_quota":{"additionalProperties":false,"properties":{"compute_minutes_per_day":{"type":"number"},"compute_minutes_used":{"type":"number"},"conversions_per_day":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"conversions_used":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"reset_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"}},"required":["conversions_per_day","conversions_used","compute_minutes_per_day","compute_minutes_used","reset_at"],"type":"object"},"id":{"type":"string"},"max_file_size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Largest file in bytes, for uploads and multipart requests","type":"integer"}],"description":"Largest file in bytes, for uploads and multipart requests"},"sandbox":{"type":"boolean"},"service":{"description":"Service key: may send X-End-User","type":"boolean"},"webhook_signing_secret":{"description":"Secret for checking the Switchfile-Signature header of webhooks","type":"string"},"webhook_url":{"nullable":true,"type":"string"}},"required":["id","email","credits","free_quota","webhook_url","webhook_signing_secret","sandbox","service","max_file_size"],"type":"object"},"Archive":{"additionalProperties":false,"properties":{"expires_at":{"description":"url works until this time, at most until the first included conversion is deleted","type":"string"},"files":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Number of files in the ZIP when it was created","minimum":0,"type":"integer"}],"description":"Number of files in the ZIP when it was created","minimum":0},"id":{"format":"uuid","type":"string"},"object":{"enum":["archive"],"type":"string"},"url":{"description":"Signed URL of the ZIP file, works without an API key","type":"string"}},"required":["object","id","url","expires_at","files"],"type":"object"},"Batch":{"additionalProperties":false,"properties":{"archive":{"$ref":"#/components/schemas/BatchArchive"},"conversions":{"items":{"$ref":"#/components/schemas/Conversion"},"type":"array"},"counts":{"additionalProperties":false,"properties":{"failed":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"finished":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"total":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]}},"required":["total","finished","failed"],"type":"object"},"created_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"id":{"format":"uuid","type":"string"},"links":{"additionalProperties":false,"properties":{"self":{"type":"string"}},"required":["self"],"type":"object"},"object":{"enum":["batch"],"type":"string"},"status":{"enum":["processing","finished"],"type":"string"}},"required":["id","object","status","counts","conversions","archive","created_at","links"],"type":"object"},"BatchArchive":{"additionalProperties":false,"nullable":true,"properties":{"expires_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"format":{"enum":["zip"],"type":"string"},"status":{"enum":["pending","ready","empty"],"type":"string"},"url":{"description":"Signed URL of the ZIP file, set when status is ready","nullable":true,"type":"string"}},"required":["format","status","url","expires_at"],"type":"object"},"BatchConversion":{"additionalProperties":false,"properties":{"filename":{"description":"File name of the input","maxLength":255,"minLength":1,"type":"string"},"from":{"description":"ID of an earlier conversion. Its input is converted again, without a new upload","format":"uuid","type":"string"},"input_format":{"description":"Input format, if the file name does not show it","maxLength":20,"minLength":1,"type":"string"},"options":{"additionalProperties":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"number"},{"type":"boolean"}],"nullable":true},"description":"Settings for the conversion, for example { \"quality\": 80 }. null and an empty string count as not set. See the options per target format in the docs","maxProperties":50,"type":"object","x-pattern":"^[a-z][a-z0-9_]{0,63}$"},"preset":{"description":"ID or name of a preset from the dashboard. It sets the target format and the options. Values in options override single settings of the preset. A preset with an input format only takes files of that format.","maxLength":100,"minLength":1,"type":"string"},"to":{"description":"Target format, for example mp4. Required without preset. With preset it is optional and must match the preset","maxLength":20,"minLength":1,"type":"string"},"upload_id":{"description":"ID of a file sent through POST /v1/uploads","format":"uuid","type":"string"},"url":{"description":"Download the input from this public http or https URL","maxLength":4096,"minLength":1,"type":"string"}},"type":"object"},"Conversion":{"additionalProperties":false,"properties":{"batch_id":{"format":"uuid","nullable":true,"type":"string"},"created_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Credits used, set once the conversion is done","type":"integer"}],"description":"Credits used, set once the conversion is done","nullable":true},"download_url":{"description":"Signed URL of the first result file","nullable":true,"type":"string"},"error":{"additionalProperties":false,"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"expires_at":{"description":"Input and result are deleted at this time","nullable":true,"type":"string"},"finished_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"input":{"additionalProperties":false,"properties":{"filename":{"nullable":true,"type":"string"},"format":{"nullable":true,"type":"string"},"size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}],"nullable":true}},"required":["filename","format","size"],"type":"object"},"links":{"additionalProperties":false,"properties":{"self":{"type":"string"}},"required":["self"],"type":"object"},"object":{"enum":["conversion"],"type":"string"},"options":{"additionalProperties":{},"type":"object","x-pattern":"^(.*)$"},"progress":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Progress in percent","maximum":100,"minimum":0,"type":"integer"}],"description":"Progress in percent","maximum":100,"minimum":0},"result":{"additionalProperties":false,"nullable":true,"properties":{"files":{"items":{"$ref":"#/components/schemas/ConversionFile"},"type":"array"}},"required":["files"],"type":"object"},"status":{"enum":["queued","processing","finished","failed"],"type":"string"},"to":{"type":"string"}},"required":["id","object","status","progress","input","to","options","result","download_url","error","credits","batch_id","created_at","finished_at","expires_at","links"],"type":"object"},"ConversionFile":{"additionalProperties":false,"properties":{"filename":{"type":"string"},"size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"url":{"description":"Signed download URL, works without an API key until expires_at","type":"string"}},"required":["filename","size","url"],"type":"object"},"ConversionList":{"additionalProperties":false,"properties":{"data":{"description":"Your conversions in the order of ids. IDs that do not exist for your account are left out","items":{"$ref":"#/components/schemas/Conversion"},"type":"array"}},"required":["data"],"type":"object"},"ConvertRequest":{"additionalProperties":false,"description":"Exactly one source: url, upload_id or from. To send the file in the request, use multipart/form-data.","properties":{"filename":{"description":"File name of the input","maxLength":255,"minLength":1,"type":"string"},"from":{"description":"ID of an earlier conversion. Its input is converted again, without a new upload","format":"uuid","type":"string"},"input_format":{"description":"Input format, if the file name does not show it","maxLength":20,"minLength":1,"type":"string"},"options":{"additionalProperties":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Settings for the conversion, for example { \"quality\": 80 }. null and an empty string count as not set. See the options per target format in the docs","maxProperties":50,"type":"object","x-pattern":"^[a-z][a-z0-9_]{0,63}$"},"preset":{"description":"ID or name of a preset from the dashboard. It sets the target format and the options. Values in options override single settings of the preset. A preset with an input format only takes files of that format.","maxLength":100,"minLength":1,"type":"string"},"to":{"description":"Target format, for example mp4. Required without preset. With preset it is optional and must match the preset","maxLength":20,"minLength":1,"type":"string"},"upload_id":{"description":"ID of a file sent through POST /v1/uploads","format":"uuid","type":"string"},"url":{"description":"Download the input from this public http or https URL","maxLength":4096,"minLength":1,"type":"string"},"webhook_url":{"maxLength":4096,"pattern":"^https?://","type":"string"}},"type":"object"},"ConvertTask":{"additionalProperties":true,"properties":{"engine":{"description":"Use only this engine (value as in GET /v2/convert/formats). Internal identifier, may change; usually left out","type":"string"},"engine_version":{"description":"The task fails if the engine ran in another version. Internal identifier, may change; usually left out","type":"string"},"filename":{"maxLength":255,"minLength":1,"type":"string"},"ignore_error":{"description":"If true, the job does not fail when this task fails","type":"boolean"},"input":{"anyOf":[{"minLength":1,"type":"string"},{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}],"description":"Name of the task that provides the input, or a list of names"},"input_format":{"description":"File format, for example pdf or tar.gz","maxLength":20,"minLength":1,"type":"string"},"operation":{"enum":["convert"],"type":"string"},"output_format":{"description":"File format, for example pdf or tar.gz","maxLength":20,"minLength":1,"type":"string"},"timeout":{"description":"Time limit for this task in seconds","exclusiveMinimum":0,"type":"number"}},"required":["operation","input","output_format"],"type":"object"},"CreateArchive":{"additionalProperties":false,"properties":{"conversions":{"description":"IDs of finished conversions, in the order of the ZIP file. An ID that appears twice counts once","items":{"format":"uuid","type":"string"},"maxItems":50,"minItems":1,"type":"array"}},"required":["conversions"],"type":"object"},"CreateBatch":{"additionalProperties":false,"properties":{"archive":{"description":"Also offer all results as one ZIP file in archive.url","enum":["zip"],"type":"string"},"conversions":{"items":{"$ref":"#/components/schemas/BatchConversion"},"maxItems":500,"minItems":1,"type":"array"},"webhook_url":{"maxLength":4096,"pattern":"^https?://","type":"string"}},"required":["conversions"],"type":"object"},"CreateJob":{"additionalProperties":false,"properties":{"redirect":{"description":"Sync requests only: redirect to the URL of the first exported file","type":"boolean"},"tag":{"maxLength":255,"nullable":true,"type":"string"},"tasks":{"additionalProperties":{"$ref":"#/components/schemas/TaskRequest"},"description":"The tasks of the job. Each key is the task name","maxProperties":200,"minProperties":1,"type":"object","x-pattern":"^[A-Za-z0-9_-]{1,100}$"},"webhook_url":{"maxLength":4096,"nullable":true,"pattern":"^https?://","type":"string"}},"required":["tasks"],"type":"object"},"CreateUpload":{"additionalProperties":false,"properties":{"filename":{"description":"File name. Its extension sets the input format","maxLength":255,"minLength":1,"type":"string"},"size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Size in bytes, if known. Over the limit, this request fails with 413 FILE_TOO_LARGE","minimum":0,"type":"integer"}],"description":"Size in bytes, if known. Over the limit, this request fails with 413 FILE_TOO_LARGE","minimum":0}},"type":"object"},"DirectUpload":{"description":"import/upload only: a signed URL for large files, without the 100 MB limit of result.form. The task finishes on its own a few seconds after the PUT. Call POST /v2/tasks/{id}/upload-complete to finish it right away.","properties":{"expires_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Headers the PUT request must send (usually none)","type":"object","x-pattern":"^(.*)$"},"max_file_size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Largest allowed file in bytes. A larger upload makes the task fail","type":"integer"}],"description":"Largest allowed file in bytes. A larger upload makes the task fail"},"method":{"enum":["PUT"],"type":"string"},"url":{"description":"Signed URL. Send the file as the raw body of a PUT request, not as a form","type":"string"}},"required":["method","url","headers","expires_at","max_file_size"],"type":"object"},"Error":{"additionalProperties":false,"properties":{"code":{"description":"Stable error code, for example INVALID_DATA, UNAUTHENTICATED or NOT_FOUND","type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Messages per field. Keys look like tasks.<name>.<field>","type":"object","x-pattern":"^(.*)$"},"message":{"type":"string"}},"required":["message","code"],"type":"object"},"Estimate":{"additionalProperties":false,"properties":{"credits":{"additionalProperties":false,"properties":{"max":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"The most it can cost: one credit per started minute of the time limit","type":"integer"}],"description":"The most it can cost: one credit per started minute of the time limit"},"min":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Minimum credits for this pair of formats","type":"integer"}],"description":"Minimum credits for this pair of formats"}},"required":["min","max"],"type":"object"},"free":{"description":"Whether it still fits into today's free quota","type":"boolean"},"input_format":{"nullable":true,"type":"string"},"object":{"enum":["estimate"],"type":"string"},"price":{"additionalProperties":false,"description":"Price at the package price per credit","properties":{"currency":{"enum":["EUR"],"type":"string"},"max":{"type":"number"},"min":{"type":"number"}},"required":["currency","min","max"],"type":"object"},"to":{"type":"string"}},"required":["object","input_format","to","credits","price","free"],"type":"object"},"ExportUrlTask":{"additionalProperties":true,"properties":{"archive_multiple_files":{"type":"boolean"},"ignore_error":{"description":"If true, the job does not fail when this task fails","type":"boolean"},"inline":{"type":"boolean"},"input":{"anyOf":[{"minLength":1,"type":"string"},{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}],"description":"Name of the task that provides the input, or a list of names"},"operation":{"enum":["export/url"],"type":"string"}},"required":["operation","input"],"type":"object"},"FormatCatalog":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"format":{"type":"string"},"group":{"description":"One of video, audio, image, document, spreadsheet, presentation, markup, font, archive, ebook, comic, pdf","nullable":true,"type":"string"},"suggested":{"items":{"additionalProperties":false,"properties":{"format":{"type":"string"},"reason":{"type":"string"}},"required":["format","reason"],"type":"object"},"type":"array"},"targets":{"items":{"additionalProperties":false,"properties":{"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Minimum credits per file","type":"integer"}],"description":"Minimum credits per file"},"format":{"type":"string"}},"required":["format","credits"],"type":"object"},"type":"array"}},"required":["format","group","targets","suggested"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"FormatList":{"additionalProperties":false,"properties":{"data":{"items":{"properties":{"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Minimum credits per file","type":"integer"}],"description":"Minimum credits per file"},"engine":{"description":"Internal identifier, may change. Do not rely on its value","type":"string"},"input_format":{"type":"string"},"meta":{"properties":{"group":{"description":"Group of the output format as in CloudConvert: audio, video, image, document, spreadsheet, presentation, vector, ebook, archive, font or cad","type":"string"}},"required":["group"],"type":"object"},"operation":{"enum":["convert"],"type":"string"},"options":{"description":"Only with include=options","items":{"$ref":"#/components/schemas/FormatOption"},"type":"array"},"output_format":{"type":"string"}},"required":["operation","input_format","output_format","engine","credits","meta"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"FormatOption":{"properties":{"default":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"nullable":true},"description":{"type":"string"},"name":{"type":"string"},"possible_values":{"description":"Only for type enum","items":{"type":"string"},"type":"array"},"type":{"enum":["string","integer","float","boolean","enum"],"type":"string"}},"required":["name","type","default","description"],"type":"object"},"Health":{"additionalProperties":false,"properties":{"status":{"enum":["ok"],"type":"string"}},"required":["status"],"type":"object"},"ImportBase64Task":{"additionalProperties":true,"properties":{"file":{"description":"File content as base64, at most 10 MiB after decoding","maxLength":13981272,"minLength":1,"type":"string"},"filename":{"maxLength":255,"minLength":1,"type":"string"},"ignore_error":{"description":"If true, the job does not fail when this task fails","type":"boolean"},"operation":{"enum":["import/base64"],"type":"string"}},"required":["operation","file","filename"],"type":"object"},"ImportUploadTask":{"additionalProperties":true,"properties":{"filename":{"maxLength":255,"minLength":1,"type":"string"},"ignore_error":{"description":"If true, the job does not fail when this task fails","type":"boolean"},"operation":{"enum":["import/upload"],"type":"string"}},"required":["operation"],"type":"object"},"ImportUrlTask":{"additionalProperties":true,"properties":{"filename":{"maxLength":255,"minLength":1,"type":"string"},"headers":{"additionalProperties":{"type":"string"},"type":"object","x-pattern":"^(.*)$"},"ignore_error":{"description":"If true, the job does not fail when this task fails","type":"boolean"},"operation":{"enum":["import/url"],"type":"string"},"url":{"maxLength":4096,"pattern":"^https?://","type":"string"}},"required":["operation","url"],"type":"object"},"Job":{"properties":{"created_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"ended_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"links":{"properties":{"self":{"type":"string"}},"required":["self"],"type":"object"},"started_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"status":{"enum":["waiting","processing","finished","error"],"type":"string"},"tag":{"nullable":true,"type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/Task"},"type":"array"}},"required":["id","tag","status","created_at","started_at","ended_at","links"],"type":"object"},"JobList":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/Job"},"type":"array"},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","links","meta"],"type":"object"},"JobResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Job"}},"required":["data"],"type":"object"},"Me":{"additionalProperties":false,"properties":{"data":{"properties":{"can_convert":{"type":"boolean"},"created_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Paid credits left on the account","type":"integer"}],"description":"Paid credits left on the account"},"email":{"type":"string"},"free_quota":{"properties":{"available":{"type":"boolean"},"compute_minutes_per_day":{"type":"number"},"compute_minutes_used":{"type":"number"},"conversions_per_day":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"conversions_used":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]}},"required":["conversions_per_day","conversions_used","compute_minutes_per_day","compute_minutes_used","available"],"type":"object"},"id":{"type":"string"},"links":{"properties":{"self":{"type":"string"}},"required":["self"],"type":"object"},"sandbox":{"type":"boolean"}},"required":["id","email","credits","created_at","free_quota","can_convert","sandbox","links"],"type":"object"}},"required":["data"],"type":"object"},"PageLinks":{"properties":{"first":{"type":"string"},"last":{"nullable":true,"type":"string"},"next":{"nullable":true,"type":"string"},"prev":{"nullable":true,"type":"string"}},"required":["first","last","prev","next"],"type":"object"},"PageMeta":{"properties":{"current_page":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"current_page_url":{"type":"string"},"from":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}],"nullable":true},"path":{"type":"string"},"per_page":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"to":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}],"nullable":true}},"required":["current_page","current_page_url","from","path","per_page","to"],"type":"object"},"Problem":{"additionalProperties":true,"properties":{"code":{"description":"Stable error code to use in your code, for example INVALID_DATA, UNAUTHENTICATED, NOT_FOUND, FILE_TOO_LARGE, UNSUPPORTED_PAIR, INVALID_URL, QUOTA_EXCEEDED, CREDITS_EXCEEDED, RATE_LIMIT_EXCEEDED, IDEMPOTENCY_KEY_REUSED or CONVERSION_NOT_FINISHED","type":"string"},"detail":{"description":"A sentence for people. It can change, so do not match on it","type":"string"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Messages per field","type":"object","x-pattern":"^(.*)$"},"reset_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"status":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"title":{"type":"string"},"type":{"description":"URL of the description of this error in the docs","type":"string"}},"required":["type","title","status","code","detail"],"type":"object"},"ResultFile":{"properties":{"detected_input_format":{"description":"convert only: the format the input actually had, when it differs from the given format or the file extension (for example a PNG file named .jpg)","type":"string"},"filename":{"type":"string"},"notes":{"description":"convert only: notes when the output differs from the request, for example a frame rate the target format does not support that was set to the nearest allowed value","items":{"type":"string"},"type":"array"},"size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"url":{"type":"string"}},"required":["filename"],"type":"object"},"Task":{"properties":{"code":{"nullable":true,"type":"string"},"copy_of_task_id":{"format":"uuid","nullable":true,"type":"string"},"created_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}],"nullable":true},"depends_on_task_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"ended_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"engine":{"description":"Internal identifier, may change. Do not rely on its value","nullable":true,"type":"string"},"engine_version":{"description":"Internal identifier, may change. Do not rely on its value","nullable":true,"type":"string"},"host_name":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"job_id":{"format":"uuid","type":"string"},"links":{"properties":{"self":{"type":"string"}},"required":["self"],"type":"object"},"message":{"nullable":true,"type":"string"},"name":{"type":"string"},"operation":{"type":"string"},"percent":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Progress as in CloudConvert: 100 when finished, otherwise 0","maximum":100,"minimum":0,"type":"integer"}],"description":"Progress as in CloudConvert: 100 when finished, otherwise 0","maximum":100,"minimum":0},"priority":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"region":{"description":"Region the task runs in (eu-central)","type":"string"},"result":{"$ref":"#/components/schemas/TaskResult"},"retry_of_task_id":{"format":"uuid","nullable":true,"type":"string"},"started_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"status":{"enum":["waiting","processing","finished","error"],"type":"string"},"storage":{"nullable":true,"type":"string"},"user_id":{"description":"Account of the job (opaque ID, the same as data.id in /v2/users/me)","nullable":true,"type":"string"},"waiting_for":{"description":"What a waiting task waits for, one of \"upload\", \"inputs\", \"queued\". Only set while status is waiting","type":"string"}},"required":["id","job_id","name","operation","status","message","code","credits","created_at","started_at","ended_at","depends_on_task_ids","retry_of_task_id","copy_of_task_id","priority","host_name","storage","engine","engine_version","percent","region","user_id","result","links"],"type":"object"},"TaskDetail":{"properties":{"code":{"nullable":true,"type":"string"},"copy_of_task_id":{"format":"uuid","nullable":true,"type":"string"},"created_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","type":"string"},"credits":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}],"nullable":true},"depends_on_task_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"depends_on_tasks":{"additionalProperties":{"format":"uuid","type":"string"},"description":"Name and ID of each input task","type":"object","x-pattern":"^(.*)$"},"ended_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"engine":{"description":"Internal identifier, may change. Do not rely on its value","nullable":true,"type":"string"},"engine_version":{"description":"Internal identifier, may change. Do not rely on its value","nullable":true,"type":"string"},"host_name":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"job":{"$ref":"#/components/schemas/Job"},"job_id":{"format":"uuid","type":"string"},"links":{"properties":{"self":{"type":"string"}},"required":["self"],"type":"object"},"message":{"nullable":true,"type":"string"},"name":{"type":"string"},"operation":{"type":"string"},"payload":{"additionalProperties":{},"type":"object","x-pattern":"^(.*)$"},"percent":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"description":"Progress as in CloudConvert: 100 when finished, otherwise 0","maximum":100,"minimum":0,"type":"integer"}],"description":"Progress as in CloudConvert: 100 when finished, otherwise 0","maximum":100,"minimum":0},"priority":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"region":{"description":"Region the task runs in (eu-central)","type":"string"},"result":{"$ref":"#/components/schemas/TaskResult"},"retries":{"items":{"$ref":"#/components/schemas/Task"},"type":"array"},"retry_of_task_id":{"format":"uuid","nullable":true,"type":"string"},"started_at":{"description":"ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00","nullable":true,"type":"string"},"status":{"enum":["waiting","processing","finished","error"],"type":"string"},"storage":{"nullable":true,"type":"string"},"user_id":{"description":"Account of the job (opaque ID, the same as data.id in /v2/users/me)","nullable":true,"type":"string"},"waiting_for":{"description":"What a waiting task waits for, one of \"upload\", \"inputs\", \"queued\". Only set while status is waiting","type":"string"}},"required":["id","job_id","name","operation","status","message","code","credits","created_at","started_at","ended_at","depends_on_task_ids","retry_of_task_id","copy_of_task_id","priority","host_name","storage","engine","engine_version","percent","region","user_id","result","links"],"type":"object"},"TaskList":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/TaskDetail"},"type":"array"},"links":{"$ref":"#/components/schemas/PageLinks"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","links","meta"],"type":"object"},"TaskRequest":{"anyOf":[{"$ref":"#/components/schemas/ImportUrlTask"},{"$ref":"#/components/schemas/ImportUploadTask"},{"$ref":"#/components/schemas/ImportBase64Task"},{"$ref":"#/components/schemas/ConvertTask"},{"$ref":"#/components/schemas/ExportUrlTask"}]},"TaskResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/TaskDetail"}},"required":["data"],"type":"object"},"TaskResult":{"additionalProperties":true,"nullable":true,"properties":{"files":{"items":{"$ref":"#/components/schemas/ResultFile"},"type":"array"},"form":{"$ref":"#/components/schemas/UploadForm"},"upload":{"$ref":"#/components/schemas/DirectUpload"}},"type":"object"},"UpdateAccount":{"additionalProperties":false,"properties":{"webhook_url":{"maxLength":4096,"nullable":true,"pattern":"^https?://","type":"string"}},"required":["webhook_url"],"type":"object"},"Upload":{"additionalProperties":false,"properties":{"expires_at":{"description":"The upload_id works until this time","type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Headers the PUT request must send (usually none)","type":"object","x-pattern":"^(.*)$"},"max_file_size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"method":{"enum":["PUT"],"type":"string"},"upload_id":{"format":"uuid","type":"string"},"url":{"description":"Send the file as the body of a PUT request to this URL","type":"string"},"url_expires_at":{"description":"Start the PUT before this time","type":"string"}},"required":["upload_id","method","url","headers","max_file_size","url_expires_at","expires_at"],"type":"object"},"UploadComplete":{"additionalProperties":false,"properties":{"filename":{"description":"Name of the uploaded file. Defaults to the filename of the task","maxLength":255,"minLength":1,"type":"string"}},"type":"object"},"UploadForm":{"properties":{"parameters":{"properties":{"expires":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"max_file_count":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"max_file_size":{"anyOf":[{"default":0,"format":"integer","type":"string"},{"type":"integer"}]},"signature":{"type":"string"}},"required":["expires","max_file_count","max_file_size","signature"],"type":"object"},"url":{"type":"string"}},"required":["url","parameters"],"type":"object"}},"securitySchemes":{"bearer":{"description":"Your API key from the dashboard","scheme":"bearer","type":"http"}}},"info":{"description":"File conversion API. /v1 converts a file with one request. /v2 takes jobs and tasks in the format of the CloudConvert API v2. Blocking variants of /v2 use the same paths under the prefix /sync, for example /sync/v2/jobs. Guides and examples: https://switchfile.io/docs","title":"switchfile API","version":"0.1.0"},"openapi":"3.0.3","paths":{"/files/{fileId}/{filename}":{"get":{"description":"Signed URL from an export/url task. No API key needed. The answer is the file or a 302 to a short-lived URL of the file.","operationId":"getFilesByFileIdByFilename","parameters":[{"description":"ID of the file","example":"2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67","in":"path","name":"fileId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File name","example":"report.pdf","in":"path","name":"filename","required":true,"schema":{"type":"string"}},{"description":"Part of the signed URL","example":1762538401,"in":"query","name":"expires","required":true,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"type":"number"}]}},{"description":"Part of the signed URL","example":"3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","in":"query","name":"signature","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"1: show the file in the browser instead of downloading it","in":"query","name":"inline","required":false,"schema":{"enum":["1"],"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"302":{"description":"Redirect to a short-lived URL of the file","headers":{"Location":{"description":"URL to follow","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"example":{"message":"The download link has expired.","code":"EXPIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The signature is wrong or the link has expired"},"404":{"content":{"application/json":{"example":{"message":"File not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The file was deleted"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"}},"summary":"Download a file","tags":["Files"]}},"/health":{"get":{"description":"Answers 200 while the API and its database are reachable.","operationId":"getHealth","responses":{"200":{"content":{"application/json":{"example":{"status":"ok"},"schema":{"$ref":"#/components/schemas/Health"}}},"description":"OK"}},"summary":"Health check","tags":["Health"]}},"/upload/{taskId}":{"post":{"description":"The URL comes from result.form.url of the task and already holds the signed parameters. Send the file as multipart/form-data in the field file. No API key needed. Other form fields are ignored. At most 100 MB per request; send larger files with a PUT to result.upload.url.","operationId":"postUploadByTaskId","parameters":[{"description":"ID of the import/upload task","example":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","in":"path","name":"taskId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Part of the signed URL","example":1762538401,"in":"query","name":"expires","required":true,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"type":"number"}]}},{"description":"Part of the signed URL","example":1073741824,"in":"query","name":"max_file_size","required":true,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"type":"number"}]}},{"description":"Part of the signed URL","example":"8d2e4f6a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e2f4a6b8c0d1e","in":"query","name":"signature","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"Part of the signed URL","in":"query","name":"max_file_count","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"type":"number"}]}}],"requestBody":{"content":{"multipart/form-data":{"example":{"file":"report.docx"},"schema":{"properties":{"expires":{"type":"integer"},"file":{"format":"binary","type":"string"},"max_file_count":{"type":"integer"},"max_file_size":{"type":"integer"},"signature":{"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"data":{"id":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"upload-1","operation":"import/upload","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:01+00:00","depends_on_task_ids":[],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.docx","size":48213}]},"links":{"self":"https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"}}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Stored. The task is finished"},"403":{"content":{"application/json":{"example":{"message":"The upload form has expired.","code":"EXPIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The signature is wrong or the form has expired"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"413":{"content":{"application/json":{"example":{"message":"The file is larger than the allowed maximum.","code":"FILE_TOO_LARGE"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request or the file is too large"},"422":{"content":{"application/json":{"example":{"message":"file: A file was already uploaded for this task.","code":"INVALID_DATA","errors":{"file":["A file was already uploaded for this task."]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A file was already uploaded for this task"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"summary":"Upload a file for an import/upload task","tags":["Files"]}},"/v1/account":{"get":{"description":"Credits, today's free quota, the webhook settings and the largest allowed file. With a service key and X-End-User, end_user_quota adds the free quota of that visitor.","operationId":"getV1Account","parameters":[{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","email":"dev@example.com","credits":1200,"free_quota":{"conversions_per_day":50,"conversions_used":3,"compute_minutes_per_day":20,"compute_minutes_used":0.4,"reset_at":"2026-11-07T00:00:00+00:00"},"webhook_url":"https://example.com/hooks/switchfile","webhook_signing_secret":"whsec_6b1d2f3a4c5e6f708192a3b4c5d6e7f8","sandbox":false,"service":false,"max_file_size":1073741824},"schema":{"$ref":"#/components/schemas/Account"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"X-End-User-Ip":["A valid IPv4 or IPv6 address of the visitor is required with X-End-User."]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"X-End-User or X-End-User-Ip is not valid"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Show the account","tags":["Simple API"]},"patch":{"description":"Sets webhook_url for every conversion that does not send its own. null removes it.","operationId":"patchV1Account","requestBody":{"content":{"application/json":{"example":{"webhook_url":"https://example.com/hooks/switchfile"},"schema":{"$ref":"#/components/schemas/UpdateAccount"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","email":"dev@example.com","credits":1200,"free_quota":{"conversions_per_day":50,"conversions_used":3,"compute_minutes_per_day":20,"compute_minutes_used":0.4,"reset_at":"2026-11-07T00:00:00+00:00"},"webhook_url":"https://example.com/hooks/switchfile","webhook_signing_secret":"whsec_6b1d2f3a4c5e6f708192a3b4c5d6e7f8","sandbox":false,"service":false,"max_file_size":1073741824},"schema":{"$ref":"#/components/schemas/Account"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"411":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-length-required","title":"Length required","status":411,"code":"LENGTH_REQUIRED","detail":"A Content-Length header is required for this request."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-payload-too-large","title":"Payload too large","status":413,"code":"PAYLOAD_TOO_LARGE","detail":"The request body is larger than the allowed maximum."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request or the file is too large"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-url","title":"Invalid url","status":422,"code":"INVALID_URL","detail":"The URL must be a public http or https address."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The URL is not a public http or https address"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Update the account","tags":["Simple API"]}},"/v1/archives":{"post":{"description":"Puts the results of up to 50 finished conversions into one ZIP file. url is signed and works without an API key. A conversion that is still running or has failed returns 409 CONVERSION_NOT_FINISHED, an unknown one 404, both with index. Supports Idempotency-Key.","operationId":"postV1Archives","parameters":[{"description":"1 to 255 visible ASCII characters, for example a UUID. Send the request again with the same key after a timeout: nothing is created twice. Kept for 24 hours.","example":"6f1c2b8e-1d8e-4c55-9f0e-3f3f0b0a8f21","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"conversions":["0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","3e2d9a4b-7c61-4f0e-8b52-1a9c0d7e6f35"]},"schema":{"$ref":"#/components/schemas/CreateArchive"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"object":"archive","id":"9f0c4e2a-1b7d-4c3e-a5f6-2d8e7b6a1c90","url":"https://api.switchfile.io/v1/archives/9f0c4e2a-1b7d-4c3e-a5f6-2d8e7b6a1c90?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","expires_at":"2026-11-07T18:00:02+00:00","files":2},"schema":{"$ref":"#/components/schemas/Archive"}}},"description":"Created"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found.","index":1},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"An ID is unknown. index names it"},"409":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-conversion-not-finished","title":"Conversion not finished","status":409,"code":"CONVERSION_NOT_FINISHED","detail":"The conversion is not finished.","index":0},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"A conversion is still running or has failed. index names it"},"411":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-length-required","title":"Length required","status":411,"code":"LENGTH_REQUIRED","detail":"A Content-Length header is required for this request."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-file-too-large","title":"File too large","status":413,"code":"FILE_TOO_LARGE","detail":"The file is larger than the allowed maximum."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request or the file is too large"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Create a ZIP archive","tags":["Simple API"]}},"/v1/archives/{id}":{"get":{"description":"archive.url of a batch or url from POST /v1/archives. No API key needed. Conversions deleted in the meantime are left out; once none is left, the answer is 404.","operationId":"getV1ArchivesById","parameters":[{"description":"ID of the batch or archive","example":"9f0c4e2a-1b7d-4c3e-a5f6-2d8e7b6a1c90","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Part of the signed URL","example":1762538401,"in":"query","name":"expires","required":true,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"type":"number"}]}},{"description":"Part of the signed URL","example":"3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","in":"query","name":"signature","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"The ZIP file"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-expired","title":"Expired","status":403,"code":"EXPIRED","detail":"The link has expired."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The signature is wrong or the URL has expired"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Archive not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found, or every conversion in it was deleted"},"409":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-batch-not-finished","title":"Batch not finished","status":409,"code":"BATCH_NOT_FINISHED","detail":"The batch is not finished yet."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The batch is still running"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"summary":"Download a ZIP archive","tags":["Simple API"]}},"/v1/batches":{"post":{"description":"Creates up to 50 conversions with one request: all of them or none. With archive: \"zip\", archive.url offers all results as one ZIP file once every conversion is done. ?wait=N waits like POST /v1/convert. Supports Idempotency-Key.","operationId":"postV1Batches","parameters":[{"description":"Wait up to this many seconds until it is done (at most 30)","example":30,"in":"query","name":"wait","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Wait up to this many seconds until it is done (at most 30)","maximum":300,"minimum":0,"type":"number"}],"description":"Wait up to this many seconds until it is done (at most 30)","maximum":300,"minimum":0}},{"description":"1 to 255 visible ASCII characters, for example a UUID. Send the request again with the same key after a timeout: nothing is created twice. Kept for 24 hours.","example":"6f1c2b8e-1d8e-4c55-9f0e-3f3f0b0a8f21","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"archive":"zip","conversions":[{"url":"https://example.com/a.heic","to":"jpg"},{"url":"https://example.com/b.heic","to":"jpg"}]},"schema":{"$ref":"#/components/schemas/CreateBatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"id":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","object":"batch","status":"finished","counts":{"total":1,"finished":1,"failed":0},"conversions":[{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"finished","progress":100,"input":{"filename":"a.heic","format":"heic","size":1843200},"to":"jpg","options":{},"result":{"files":[{"filename":"a.jpg","size":402113,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/a.jpg?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"download_url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/a.jpg?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","error":null,"credits":1,"batch_id":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","created_at":"2026-11-06T18:00:00+00:00","finished_at":"2026-11-06T18:00:02+00:00","expires_at":"2026-11-07T18:00:02+00:00","links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}}],"archive":{"format":"zip","status":"ready","url":"https://api.switchfile.io/v1/archives/5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","expires_at":"2026-11-07T18:00:02+00:00"},"created_at":"2026-11-06T18:00:00+00:00","links":{"self":"https://api.switchfile.io/v1/batches/5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90"}},"schema":{"$ref":"#/components/schemas/Batch"}}},"description":"Done within wait"},"202":{"content":{"application/json":{"example":{"id":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","object":"batch","status":"processing","counts":{"total":1,"finished":0,"failed":0},"conversions":[{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"processing","progress":0,"input":{"filename":"a.heic","format":"heic","size":1843200},"to":"jpg","options":{},"result":null,"download_url":null,"error":null,"credits":null,"batch_id":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","created_at":"2026-11-06T18:00:00+00:00","finished_at":null,"expires_at":null,"links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}}],"archive":{"format":"zip","status":"pending","url":null,"expires_at":null},"created_at":"2026-11-06T18:00:00+00:00","links":{"self":"https://api.switchfile.io/v1/batches/5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90"}},"schema":{"$ref":"#/components/schemas/Batch"}}},"description":"Created, still running"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"402":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-credits-exceeded","title":"Credits exceeded","status":402,"code":"CREDITS_EXCEEDED","detail":"Today's free quota is used up and there are not enough credits left."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Today's free quota is used up and there are not enough credits"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Upload not found.","index":2},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"409":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-idempotency-key-in-use","title":"Idempotency key in use","status":409,"code":"IDEMPOTENCY_KEY_IN_USE","detail":"A request with this Idempotency-Key is still running."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict with the current state"},"411":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-length-required","title":"Length required","status":411,"code":"LENGTH_REQUIRED","detail":"A Content-Length header is required for this request."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-file-too-large","title":"File too large","status":413,"code":"FILE_TOO_LARGE","detail":"The file is larger than the allowed maximum."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request or the file is too large"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unsupported-pair","title":"Unsupported pair","status":422,"code":"UNSUPPORTED_PAIR","detail":"Converting txt to mp4 is not supported.","index":1},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. index names the failing entry"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Create a batch","tags":["Simple API"]}},"/v1/batches/{id}":{"delete":{"description":"Deletes the batch with all its conversions right away.","operationId":"deleteV1BatchesById","parameters":[{"description":"ID of the batch","example":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted with all its conversions"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Batch not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Delete a batch","tags":["Simple API"]},"get":{"description":"The batch with all its conversions. ?wait=N waits until all of them are done.","operationId":"getV1BatchesById","parameters":[{"description":"ID of the batch","example":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wait up to this many seconds until it is done (at most 30)","example":30,"in":"query","name":"wait","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Wait up to this many seconds until it is done (at most 30)","maximum":300,"minimum":0,"type":"number"}],"description":"Wait up to this many seconds until it is done (at most 30)","maximum":300,"minimum":0}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","object":"batch","status":"finished","counts":{"total":1,"finished":1,"failed":0},"conversions":[{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"finished","progress":100,"input":{"filename":"a.heic","format":"heic","size":1843200},"to":"jpg","options":{},"result":{"files":[{"filename":"a.jpg","size":402113,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/a.jpg?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"download_url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/a.jpg?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","error":null,"credits":1,"batch_id":"5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90","created_at":"2026-11-06T18:00:00+00:00","finished_at":"2026-11-06T18:00:02+00:00","expires_at":"2026-11-07T18:00:02+00:00","links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}}],"archive":{"format":"zip","status":"ready","url":"https://api.switchfile.io/v1/archives/5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","expires_at":"2026-11-07T18:00:02+00:00"},"created_at":"2026-11-06T18:00:00+00:00","links":{"self":"https://api.switchfile.io/v1/batches/5c0f1d7a-6a54-4a49-b3c5-0c7d6a1e2f90"}},"schema":{"$ref":"#/components/schemas/Batch"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Batch not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Show a batch","tags":["Simple API"]}},"/v1/conversions":{"get":{"description":"?ids=a,b,c (up to 50) returns several conversions with one request, in the order of ids. IDs that do not exist for your account are left out instead of failing with 404. Or send ?idempotency_key=K to look up the conversion that POST /v1/convert created with this Idempotency-Key, without creating anything. data is empty if none was created. While the first request is still running, the answer is 409 IDEMPOTENCY_KEY_IN_USE with Retry-After.","operationId":"getV1Conversions","parameters":[{"description":"Comma-separated conversion IDs, at most 50","example":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10,3e2d9a4b-7c61-4f0e-8b52-1a9c0d7e6f35","in":"query","name":"ids","required":false,"schema":{"description":"Comma-separated conversion IDs, at most 50","maxLength":4096,"minLength":1,"type":"string"}},{"description":"Instead of ids: the Idempotency-Key of a POST /v1/convert. Returns the conversion it created, if any","in":"query","name":"idempotency_key","required":false,"schema":{"description":"Instead of ids: the Idempotency-Key of a POST /v1/convert. Returns the conversion it created, if any","maxLength":255,"minLength":1,"type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"finished","progress":100,"input":{"filename":"report.docx","format":"docx","size":48213},"to":"pdf","options":{},"result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"download_url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","error":null,"credits":2,"batch_id":null,"created_at":"2026-11-06T18:00:00+00:00","finished_at":"2026-11-06T18:00:02+00:00","expires_at":"2026-11-07T18:00:02+00:00","links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}},{"id":"3e2d9a4b-7c61-4f0e-8b52-1a9c0d7e6f35","object":"conversion","status":"processing","progress":40,"input":{"filename":"talk.mov","format":"mov","size":18874368},"to":"mp4","options":{},"result":null,"download_url":null,"error":null,"credits":null,"batch_id":null,"created_at":"2026-11-06T18:00:00+00:00","finished_at":null,"expires_at":null,"links":{"self":"https://api.switchfile.io/v1/conversions/3e2d9a4b-7c61-4f0e-8b52-1a9c0d7e6f35"}}]},"schema":{"$ref":"#/components/schemas/ConversionList"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"409":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-idempotency-key-in-use","title":"Idempotency key in use","status":409,"code":"IDEMPOTENCY_KEY_IN_USE","detail":"A request with this Idempotency-Key is still running."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request with this Idempotency-Key is still running"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"ids":["At most 50 IDs per request."]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"More than 50 IDs, or an ID that is not a UUID"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"List conversions","tags":["Simple API"]}},"/v1/conversions/{id}":{"delete":{"description":"Deletes the input and the result right away. A running conversion stops.","operationId":"deleteV1ConversionsById","parameters":[{"description":"ID of the conversion","example":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Delete a conversion","tags":["Simple API"]},"get":{"description":"Status, progress, result, credits and expires_at. ?wait=N waits up to N seconds (at most 30) until the conversion is done.","operationId":"getV1ConversionsById","parameters":[{"description":"ID of the conversion","example":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wait up to this many seconds until it is done (at most 30)","example":30,"in":"query","name":"wait","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Wait up to this many seconds until it is done (at most 30)","maximum":300,"minimum":0,"type":"number"}],"description":"Wait up to this many seconds until it is done (at most 30)","maximum":300,"minimum":0}},{"description":"application/octet-stream together with wait: a finished conversion returns the file itself instead of JSON.","example":"application/octet-stream","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"finished","progress":100,"input":{"filename":"report.docx","format":"docx","size":48213},"to":"pdf","options":{},"result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"download_url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","error":null,"credits":2,"batch_id":null,"created_at":"2026-11-06T18:00:00+00:00","finished_at":"2026-11-06T18:00:02+00:00","expires_at":"2026-11-07T18:00:02+00:00","links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}},"schema":{"$ref":"#/components/schemas/Conversion"}},"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"303":{"description":"With Accept: application/octet-stream, done, larger than 50 MB. Location holds the download URL","headers":{"Location":{"description":"URL to follow","schema":{"type":"string"}}}},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Show a conversion","tags":["Simple API"]}},"/v1/convert":{"post":{"description":"Send the file as multipart/form-data in the field file, or JSON with exactly one of url, upload_id and from. Answers with 202 right away. With ?wait=N (up to 30) the request waits up to N seconds and answers 200 if the conversion is done by then. With Accept: application/octet-stream and wait, a finished conversion returns the file itself (up to 50 MB, otherwise 303 to the download URL). ?dry_run=1 only returns the credits and the price. Supports Idempotency-Key.","operationId":"postV1Convert","parameters":[{"description":"Wait up to this many seconds for the result (at most 30)","example":30,"in":"query","name":"wait","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Wait up to this many seconds for the result (at most 30)","maximum":300,"minimum":0,"type":"number"}],"description":"Wait up to this many seconds for the result (at most 30)","maximum":300,"minimum":0}},{"description":"1 or true: only return the credits and the price. Nothing is created or charged","in":"query","name":"dry_run","required":false,"schema":{"enum":["1","true","0","false"],"type":"string"}},{"description":"1 to 255 visible ASCII characters, for example a UUID. Send the request again with the same key after a timeout: nothing is created twice. Kept for 24 hours.","example":"6f1c2b8e-1d8e-4c55-9f0e-3f3f0b0a8f21","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"description":"application/octet-stream together with wait: a finished conversion returns the file itself instead of JSON.","example":"application/octet-stream","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"url":"https://example.com/report.docx","to":"pdf"},"schema":{"$ref":"#/components/schemas/ConvertRequest"}},"multipart/form-data":{"example":{"file":"report.docx","to":"pdf"},"schema":{"properties":{"file":{"description":"The file to convert, up to 100 MB","format":"binary","type":"string"},"filename":{"description":"File name of the input","type":"string"},"input_format":{"description":"Input format, if the file name does not show it","type":"string"},"options":{"description":"Settings as a JSON object in text form, for example {\"quality\":80}","type":"string"},"preset":{"description":"ID or name of a preset","type":"string"},"to":{"description":"Target format, for example pdf. Required without preset","type":"string"},"webhook_url":{"description":"Send conversion.finished or conversion.failed to this URL","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"finished","progress":100,"input":{"filename":"report.docx","format":"docx","size":48213},"to":"pdf","options":{},"result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"download_url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","error":null,"credits":2,"batch_id":null,"created_at":"2026-11-06T18:00:00+00:00","finished_at":"2026-11-06T18:00:02+00:00","expires_at":"2026-11-07T18:00:02+00:00","links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}},"schema":{"anyOf":[{"$ref":"#/components/schemas/Conversion"},{"$ref":"#/components/schemas/Estimate"}]}},"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Done within wait, or the estimate for dry_run"},"202":{"content":{"application/json":{"example":{"id":"0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10","object":"conversion","status":"queued","progress":0,"input":{"filename":"report.docx","format":"docx","size":48213},"to":"pdf","options":{},"result":null,"download_url":null,"error":null,"credits":null,"batch_id":null,"created_at":"2026-11-06T18:00:00+00:00","finished_at":null,"expires_at":null,"links":{"self":"https://api.switchfile.io/v1/conversions/0b8a7c1e-5d0f-4a51-9f39-2f7f4c1d9a10"}},"schema":{"$ref":"#/components/schemas/Conversion"}}},"description":"Created, still running. Poll links.self or wait for the webhook"},"303":{"description":"Done, the file is larger than 50 MB. The Location header holds the download URL","headers":{"Location":{"description":"URL to follow","schema":{"type":"string"}}}},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"402":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-credits-exceeded","title":"Credits exceeded","status":402,"code":"CREDITS_EXCEEDED","detail":"Today's free quota is used up and there are not enough credits left."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Today's free quota is used up and there are not enough credits"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"X-End-User was sent with a key that is not a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Upload not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"upload_id, from or preset was not found"},"409":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-upload-incomplete","title":"Upload incomplete","status":409,"code":"UPLOAD_INCOMPLETE","detail":"Nothing has been uploaded for this upload_id yet."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"UPLOAD_INCOMPLETE, INPUT_NOT_AVAILABLE or IDEMPOTENCY_KEY_IN_USE"},"411":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-length-required","title":"Length required","status":411,"code":"LENGTH_REQUIRED","detail":"A Content-Length header is required for this request."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-file-too-large","title":"File too large","status":413,"code":"FILE_TOO_LARGE","detail":"The file is larger than the allowed maximum."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request or the file is too large"},"415":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unsupported-media-type","title":"Unsupported media type","status":415,"code":"UNSUPPORTED_MEDIA_TYPE","detail":"Send JSON or multipart/form-data."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Send JSON or multipart/form-data"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unsupported-pair","title":"Unsupported pair","status":422,"code":"UNSUPPORTED_PAIR","detail":"Converting txt to mp4 is not supported."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data, an unsupported pair, a bad URL or an unknown preset"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Convert a file","tags":["Simple API"]}},"/v1/formats":{"get":{"description":"Every input format with its targets and their minimum credits, plus up to three suggested targets with a short reason. No API key needed.","operationId":"getV1Formats","parameters":[{"description":"Return only this input format","example":"heic","in":"query","name":"input","required":false,"schema":{"description":"Return only this input format","maxLength":20,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"format":"heic","group":"image","targets":[{"format":"jpg","credits":1},{"format":"pdf","credits":1},{"format":"png","credits":1},{"format":"webp","credits":1}],"suggested":[{"format":"jpg","reason":"Opens on every device and in every app."},{"format":"png","reason":"Keeps every detail, larger files."}]}]},"schema":{"$ref":"#/components/schemas/FormatCatalog"}}},"description":"OK"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"summary":"List formats","tags":["Simple API"]}},"/v1/uploads":{"post":{"description":"Returns a signed URL for files larger than 100 MB. Send the file as the body of a PUT to url, then call POST /v1/convert with upload_id. Supports Idempotency-Key.","operationId":"postV1Uploads","parameters":[{"description":"1 to 255 visible ASCII characters, for example a UUID. Send the request again with the same key after a timeout: nothing is created twice. Kept for 24 hours.","example":"6f1c2b8e-1d8e-4c55-9f0e-3f3f0b0a8f21","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"filename":"lecture.mov","size":734003200},"schema":{"$ref":"#/components/schemas/CreateUpload"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"upload_id":"7d1f0f7e-0b55-4a8e-8c5b-9d8e3f1a2b3c","method":"PUT","url":"https://api.switchfile.io/v1/uploads/7d1f0f7e-0b55-4a8e-8c5b-9d8e3f1a2b3c/content?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","headers":{},"max_file_size":1073741824,"url_expires_at":"2026-11-06T18:15:00+00:00","expires_at":"2026-11-07T18:00:00+00:00"},"schema":{"$ref":"#/components/schemas/Upload"}}},"description":"Created"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Conversion not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"409":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-idempotency-key-in-use","title":"Idempotency key in use","status":409,"code":"IDEMPOTENCY_KEY_IN_USE","detail":"A request with this Idempotency-Key is still running."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict with the current state"},"411":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-length-required","title":"Length required","status":411,"code":"LENGTH_REQUIRED","detail":"A Content-Length header is required for this request."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-file-too-large","title":"File too large","status":413,"code":"FILE_TOO_LARGE","detail":"The file is larger than the allowed maximum."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"size is over max_file_size"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Create an upload","tags":["Simple API"]}},"/v1/uploads/{id}":{"delete":{"description":"Deletes the uploaded file right away. Conversions already created from it are not affected.","operationId":"deleteV1UploadsById","parameters":[{"description":"upload_id from POST /v1/uploads","example":"7d1f0f7e-0b55-4a8e-8c5b-9d8e3f1a2b3c","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service keys only: an ID for the visitor you act for (1 to 128 characters: letters, digits and . _ : @ -). Quotas and rate limits then count per visitor.","in":"header","name":"X-End-User","required":false,"schema":{"type":"string"}},{"description":"Required with X-End-User: the IP address of the visitor.","in":"header","name":"X-End-User-Ip","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-unauthenticated","title":"Unauthenticated","status":401,"code":"UNAUTHENTICATED","detail":"Missing or invalid API key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-end-user-not-allowed","title":"End user not allowed","status":403,"code":"END_USER_NOT_ALLOWED","detail":"The X-End-User header is only allowed with a service key."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed: a signed URL is wrong or expired, or X-End-User was sent without a service key"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Upload not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Delete an upload","tags":["Simple API"]}},"/v1/uploads/{id}/content":{"put":{"description":"One possible target of url from POST /v1/uploads. Always use the url from that response as it is. No API key needed.","operationId":"putV1UploadsByIdContent","parameters":[{"description":"upload_id","example":"7d1f0f7e-0b55-4a8e-8c5b-9d8e3f1a2b3c","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Part of the signed URL","example":1762538401,"in":"query","name":"expires","required":true,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"type":"number"}]}},{"description":"Part of the signed URL","example":"3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8","in":"query","name":"signature","required":true,"schema":{"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The file as the raw request body","required":true},"responses":{"204":{"description":"Stored. Use upload_id in POST /v1/convert"},"403":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-expired","title":"Expired","status":403,"code":"EXPIRED","detail":"The link has expired."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The signature is wrong or the URL has expired"},"404":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-not-found","title":"Not found","status":404,"code":"NOT_FOUND","detail":"Upload not found."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist for this account"},"413":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-file-too-large","title":"File too large","status":413,"code":"FILE_TOO_LARGE","detail":"The file is larger than the allowed maximum."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The request or the file is too large"},"422":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-invalid-data","title":"Invalid data","status":422,"code":"INVALID_DATA","detail":"The request contains invalid data.","errors":{"to":["Expected string"]}},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/problem+json":{"example":{"type":"https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded","title":"Rate limit exceeded","status":429,"code":"RATE_LIMIT_EXCEEDED","detail":"Too many requests. Try again in 12 seconds."},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"summary":"Send the file of an upload","tags":["Simple API"]}},"/v2/convert/formats":{"get":{"description":"Every supported pair of input and output format with its minimum credits. No API key needed.","operationId":"getV2ConvertFormats","parameters":[{"description":"Only pairs with this input format","example":"docx","in":"query","name":"filter[input_format]","required":false,"schema":{"type":"string"}},{"description":"Only pairs with this output format","in":"query","name":"filter[output_format]","required":false,"schema":{"type":"string"}},{"description":"Only pairs with this engine value (internal identifier, may change)","in":"query","name":"filter[engine]","required":false,"schema":{"type":"string"}},{"description":"options: add the options of each pair (name, type, default, description)","in":"query","name":"include","required":false,"schema":{"description":"options: add the options of each pair (name, type, default, description)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"operation":"convert","input_format":"docx","output_format":"pdf","engine":"office","credits":1,"meta":{"group":"document"}},{"operation":"convert","input_format":"docx","output_format":"png","engine":"chain","credits":1,"meta":{"group":"image"}}]},"schema":{"$ref":"#/components/schemas/FormatList"}}},"description":"OK"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"summary":"List supported conversions","tags":["Formats"]}},"/v2/jobs":{"get":{"description":"Your jobs, newest first, with optional filters for status and tag.","operationId":"getV2Jobs","parameters":[{"description":"Only jobs with this status","in":"query","name":"filter[status]","required":false,"schema":{"enum":["waiting","processing","finished","error"],"type":"string"}},{"description":"Only jobs with this tag","in":"query","name":"filter[tag]","required":false,"schema":{"type":"string"}},{"description":"Set to tasks to include the tasks of each job","in":"query","name":"include","required":false,"schema":{"description":"Set to tasks to include the tasks of each job","type":"string"}},{"description":"Page number, starting at 1","in":"query","name":"page","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Page number, starting at 1","minimum":1,"type":"number"}],"description":"Page number, starting at 1","minimum":1}},{"description":"Entries per page, 100 by default","in":"query","name":"per_page","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Entries per page, 100 by default","maximum":1000,"minimum":1,"type":"number"}],"description":"Entries per page, 100 by default","maximum":1000,"minimum":1}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","tag":"invoice-4711","status":"finished","created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:02+00:00","links":{"self":"https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10"}}],"links":{"first":"https://api.switchfile.io/v2/jobs?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https://api.switchfile.io/v2/jobs?page=1","from":1,"path":"https://api.switchfile.io/v2/jobs","per_page":100,"to":1}},"schema":{"$ref":"#/components/schemas/JobList"}}},"description":"OK"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Job not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"per_page: Expected number to be less or equal to 1000","code":"INVALID_DATA","errors":{"per_page":["Expected number to be less or equal to 1000"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"List jobs","tags":["Jobs"]},"post":{"description":"Creates a job from named tasks and answers with 201 right away. Tasks that need no input start at once, the others when their inputs are done. Under the /sync prefix (POST /sync/v2/jobs) the request waits for the job and answers with 200, or with 302 to the first exported file if redirect is true.","operationId":"postV2Jobs","requestBody":{"content":{"application/json":{"example":{"tag":"invoice-4711","tasks":{"import-1":{"operation":"import/url","url":"https://example.com/report.docx"},"convert-1":{"operation":"convert","input":"import-1","output_format":"pdf"},"export-1":{"operation":"export/url","input":"convert-1"}}},"schema":{"$ref":"#/components/schemas/CreateJob"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","tag":"invoice-4711","status":"finished","created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:02+00:00","tasks":[{"id":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"import-1","operation":"import/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:01+00:00","depends_on_task_ids":[],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.docx","size":48213}]},"links":{"self":"https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"}},{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"finished","message":null,"code":null,"credits":2,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:01+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544}]},"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"}},{"id":"e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"export-1","operation":"export/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:02+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"links":{"self":"https://api.switchfile.io/v2/tasks/e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93"}}],"links":{"self":"https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10"}}},"schema":{"$ref":"#/components/schemas/JobResponse"}}},"description":"Sync requests only: the finished job"},"201":{"content":{"application/json":{"example":{"data":{"id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","tag":"invoice-4711","status":"processing","created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":null,"tasks":[{"id":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"import-1","operation":"import/url","status":"processing","message":null,"code":null,"credits":null,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":null,"depends_on_task_ids":[],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":0,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":null,"links":{"self":"https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"}},{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"waiting","message":null,"code":null,"credits":null,"created_at":"2026-11-06T18:00:00+00:00","started_at":null,"ended_at":null,"depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":0,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":null,"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"},"waiting_for":"inputs"},{"id":"e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"export-1","operation":"export/url","status":"waiting","message":null,"code":null,"credits":null,"created_at":"2026-11-06T18:00:00+00:00","started_at":null,"ended_at":null,"depends_on_task_ids":["5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":0,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":null,"links":{"self":"https://api.switchfile.io/v2/tasks/e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93"},"waiting_for":"inputs"}],"links":{"self":"https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10"}}},"schema":{"$ref":"#/components/schemas/JobResponse"}}},"description":"Created. Tasks run in the background"},"302":{"description":"Sync requests with redirect: true. Location holds the URL of the first exported file","headers":{"Location":{"description":"URL to follow","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"402":{"content":{"application/json":{"example":{"message":"Not enough credits for this job.","code":"CREDITS_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Today's free quota is used up and there are not enough credits"},"404":{"content":{"application/json":{"example":{"message":"Job not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"411":{"content":{"application/json":{"example":{"message":"A Content-Length header is required for this request.","code":"LENGTH_REQUIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/json":{"example":{"message":"The request body is larger than the allowed maximum.","code":"PAYLOAD_TOO_LARGE"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request or the file is too large"},"422":{"content":{"application/json":{"example":{"message":"Task convert-1: The output format field is required.","code":"INVALID_DATA","errors":{"tasks.convert-1.output_format":["The output format field is required."]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Create a job","tags":["Jobs"]}},"/v2/jobs/{id}":{"delete":{"description":"Deletes the job with all its tasks and files right away.","operationId":"deleteV2JobsById","parameters":[{"description":"ID of the job","example":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Job not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"411":{"content":{"application/json":{"example":{"message":"A Content-Length header is required for this request.","code":"LENGTH_REQUIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/json":{"example":{"message":"The request body is larger than the allowed maximum.","code":"PAYLOAD_TOO_LARGE"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request or the file is too large"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Delete a job","tags":["Jobs"]},"get":{"description":"The job with all its tasks and their results.","operationId":"getV2JobsById","parameters":[{"description":"ID of the job","example":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sync requests only: answer with 302 to the URL of the first exported file","in":"query","name":"redirect","required":false,"schema":{"anyOf":[{"description":"Sync requests only: answer with 302 to the URL of the first exported file","type":"boolean"},{"default":false,"format":"boolean","type":"string"}],"description":"Sync requests only: answer with 302 to the URL of the first exported file"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","tag":"invoice-4711","status":"finished","created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:02+00:00","tasks":[{"id":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"import-1","operation":"import/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:01+00:00","depends_on_task_ids":[],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.docx","size":48213}]},"links":{"self":"https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"}},{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"finished","message":null,"code":null,"credits":2,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:01+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544}]},"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"}},{"id":"e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"export-1","operation":"export/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:02+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"links":{"self":"https://api.switchfile.io/v2/tasks/e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93"}}],"links":{"self":"https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10"}}},"schema":{"$ref":"#/components/schemas/JobResponse"}}},"description":"OK"},"302":{"description":"Sync requests with redirect=true. Location holds the URL of the first exported file","headers":{"Location":{"description":"URL to follow","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Job not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Show a job","tags":["Jobs"]}},"/v2/jobs/{id}/wait":{"get":{"description":"Answers when the job is finished or has failed, or after 5 minutes with its current state.","operationId":"getV2JobsByIdWait","parameters":[{"description":"ID of the job","example":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sync requests only: answer with 302 to the URL of the first exported file","in":"query","name":"redirect","required":false,"schema":{"anyOf":[{"description":"Sync requests only: answer with 302 to the URL of the first exported file","type":"boolean"},{"default":false,"format":"boolean","type":"string"}],"description":"Sync requests only: answer with 302 to the URL of the first exported file"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","tag":"invoice-4711","status":"finished","created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:02+00:00","tasks":[{"id":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"import-1","operation":"import/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:01+00:00","depends_on_task_ids":[],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.docx","size":48213}]},"links":{"self":"https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"}},{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"finished","message":null,"code":null,"credits":2,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:01+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544}]},"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"}},{"id":"e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"export-1","operation":"export/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:02+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"links":{"self":"https://api.switchfile.io/v2/tasks/e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93"}}],"links":{"self":"https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10"}}},"schema":{"$ref":"#/components/schemas/JobResponse"}}},"description":"The job, finished, failed or still running after 5 minutes"},"302":{"description":"With redirect=true. Location holds the URL of the first exported file","headers":{"Location":{"description":"URL to follow","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Job not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Wait for a job","tags":["Jobs"]}},"/v2/tasks":{"get":{"description":"Your tasks, newest first. The filter parameters narrow the list.","operationId":"getV2Tasks","parameters":[{"description":"Only tasks of this job","in":"query","name":"filter[job_id]","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only tasks with this status","in":"query","name":"filter[status]","required":false,"schema":{"enum":["waiting","processing","finished","error"],"type":"string"}},{"description":"Only tasks with this operation, for example convert","in":"query","name":"filter[operation]","required":false,"schema":{"type":"string"}},{"description":"Extra data to include, comma-separated: retries, depends_on_tasks","in":"query","name":"include","required":false,"schema":{"description":"Extra data to include, comma-separated: retries, depends_on_tasks","type":"string"}},{"description":"Page number, starting at 1","in":"query","name":"page","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Page number, starting at 1","minimum":1,"type":"number"}],"description":"Page number, starting at 1","minimum":1}},{"description":"Entries per page, 100 by default","in":"query","name":"per_page","required":false,"schema":{"anyOf":[{"default":0,"format":"numeric","type":"string"},{"description":"Entries per page, 100 by default","maximum":1000,"minimum":1,"type":"number"}],"description":"Entries per page, 100 by default","maximum":1000,"minimum":1}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"finished","message":null,"code":null,"credits":2,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:01+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544}]},"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"}}],"links":{"first":"https://api.switchfile.io/v2/tasks?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https://api.switchfile.io/v2/tasks?page=1","from":1,"path":"https://api.switchfile.io/v2/tasks","per_page":100,"to":1}},"schema":{"$ref":"#/components/schemas/TaskList"}}},"description":"OK"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"List tasks","tags":["Tasks"]}},"/v2/tasks/{id}":{"get":{"description":"One task with its result. include adds the payload, input tasks, retries or the job.","operationId":"getV2TasksById","parameters":[{"description":"ID of the task","example":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Extra data to include, comma-separated: payload, depends_on_tasks, retries, job","in":"query","name":"include","required":false,"schema":{"description":"Extra data to include, comma-separated: payload, depends_on_tasks, retries, job","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"finished","message":null,"code":null,"credits":2,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:01+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544}]},"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"}}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Show a task","tags":["Tasks"]}},"/v2/tasks/{id}/cancel":{"post":{"description":"Stops a waiting or running task. It ends with status error and code CANCELLED.","operationId":"postV2TasksByIdCancel","parameters":[{"description":"ID of the task","example":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"error","message":"The task was cancelled.","code":"CANCELLED","credits":null,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:01+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":0,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":null,"links":{"self":"https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"}}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"411":{"content":{"application/json":{"example":{"message":"A Content-Length header is required for this request.","code":"LENGTH_REQUIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/json":{"example":{"message":"The request body is larger than the allowed maximum.","code":"PAYLOAD_TOO_LARGE"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request or the file is too large"},"422":{"content":{"application/json":{"example":{"message":"status: Only waiting or processing tasks can be cancelled.","code":"INVALID_DATA","errors":{"status":["Only waiting or processing tasks can be cancelled."]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The task is already finished or failed"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Cancel a task","tags":["Tasks"]}},"/v2/tasks/{id}/retry":{"post":{"description":"Runs a finished or failed task again as a new task with the same settings. Tasks that use its output are not retried with it; retry them afterwards.","operationId":"postV2TasksByIdRetry","parameters":[{"description":"ID of the task","example":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"content":{"application/json":{"example":{"data":{"id":"8c3e5a7b-9d1f-4b2a-8e6c-0f4a2d6b8e13","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"convert-1","operation":"convert","status":"waiting","message":null,"code":null,"credits":null,"created_at":"2026-11-06T18:00:00+00:00","started_at":null,"ended_at":null,"depends_on_task_ids":["c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"],"retry_of_task_id":"5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52","copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":0,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":null,"links":{"self":"https://api.switchfile.io/v2/tasks/8c3e5a7b-9d1f-4b2a-8e6c-0f4a2d6b8e13"},"waiting_for":"queued"}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"The new task"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The task cannot be retried here. For the simple API, create a new conversion with from instead"},"411":{"content":{"application/json":{"example":{"message":"A Content-Length header is required for this request.","code":"LENGTH_REQUIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/json":{"example":{"message":"The request body is larger than the allowed maximum.","code":"PAYLOAD_TOO_LARGE"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request or the file is too large"},"422":{"content":{"application/json":{"example":{"message":"status: Only finished or failed tasks can be retried.","code":"INVALID_DATA","errors":{"status":["Only finished or failed tasks can be retried."]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The task is still running, was already retried, or an input task failed"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Retry a task","tags":["Tasks"]}},"/v2/tasks/{id}/upload-complete":{"post":{"description":"Optional, after the PUT to result.upload.url: the task finishes right away instead of a few seconds later. If the file is larger than result.upload.max_file_size, the task fails with FILE_TOO_LARGE and the file is deleted. Calling it again for a finished or failed task returns its current state. filename still sets the file name when the task has already finished without one.","operationId":"postV2TasksByIdUpload-complete","parameters":[{"description":"ID of the import/upload task","example":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"filename":"lecture.mov"},"schema":{"$ref":"#/components/schemas/UploadComplete"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UploadComplete"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadComplete"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"upload-1","operation":"import/upload","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:00+00:00","ended_at":"2026-11-06T18:00:01+00:00","depends_on_task_ids":[],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"lecture.mov","size":734003200}]},"links":{"self":"https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"}}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"411":{"content":{"application/json":{"example":{"message":"A Content-Length header is required for this request.","code":"LENGTH_REQUIRED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request has a body but no Content-Length header"},"413":{"content":{"application/json":{"example":{"message":"The request body is larger than the allowed maximum.","code":"PAYLOAD_TOO_LARGE"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request or the file is too large"},"422":{"content":{"application/json":{"example":{"message":"file: No file has been uploaded to result.upload.url yet.","code":"INVALID_DATA","errors":{"file":["No file has been uploaded to result.upload.url yet."]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not an import/upload task with a direct upload, or nothing was uploaded yet"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Finish a direct upload","tags":["Tasks"]}},"/v2/tasks/{id}/wait":{"get":{"description":"Answers when the task is finished or has failed, or after 5 minutes with its current state.","operationId":"getV2TasksByIdWait","parameters":[{"description":"ID of the task","example":"e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Extra data to include, comma-separated: payload, depends_on_tasks, retries, job","in":"query","name":"include","required":false,"schema":{"description":"Extra data to include, comma-separated: payload, depends_on_tasks, retries, job","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93","job_id":"6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10","name":"export-1","operation":"export/url","status":"finished","message":null,"code":null,"credits":0,"created_at":"2026-11-06T18:00:00+00:00","started_at":"2026-11-06T18:00:02+00:00","ended_at":"2026-11-06T18:00:02+00:00","depends_on_task_ids":["5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"],"retry_of_task_id":null,"copy_of_task_id":null,"priority":0,"host_name":null,"storage":null,"engine":null,"engine_version":null,"percent":100,"region":"eu-central","user_id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","result":{"files":[{"filename":"report.pdf","size":61544,"url":"https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"}]},"links":{"self":"https://api.switchfile.io/v2/tasks/e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93"}}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"The task, finished, failed or still running after 5 minutes"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Task not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Wait for a task","tags":["Tasks"]}},"/v2/users/me":{"get":{"description":"Credits, today's free quota and whether the key is a sandbox key.","operationId":"getV2UsersMe","responses":{"200":{"content":{"application/json":{"example":{"data":{"id":"4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18","email":"dev@example.com","credits":1200,"created_at":"2026-10-01T09:30:00+00:00","free_quota":{"conversions_per_day":50,"conversions_used":3,"compute_minutes_per_day":20,"compute_minutes_used":0.4,"available":true},"can_convert":true,"sandbox":false,"links":{"self":"https://api.switchfile.io/v2/users/me"}}},"schema":{"$ref":"#/components/schemas/Me"}}},"description":"OK"},"401":{"content":{"application/json":{"example":{"message":"Missing or invalid API key.","code":"UNAUTHENTICATED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing or not valid"},"404":{"content":{"application/json":{"example":{"message":"Job not found.","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Does not exist for this account"},"422":{"content":{"application/json":{"example":{"message":"id: Expected string to match 'uuid' format","code":"INVALID_DATA","errors":{"id":["Expected string to match 'uuid' format"]}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid data. errors names the fields"},"429":{"content":{"application/json":{"example":{"message":"Too many requests. Try again in 12 seconds.","code":"RATE_LIMIT_EXCEEDED"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests or a daily quota is used up. See Retry-After"}},"security":[{"bearer":[]}],"summary":"Show the current user","tags":["Account"]}}},"tags":[{"description":"One request per conversion: send a file, get the converted file back.","name":"Simple API"},{"description":"Jobs group tasks in the format of the CloudConvert API v2.","name":"Jobs"},{"description":"Single steps of a job, such as an import or a conversion.","name":"Tasks"},{"description":"Supported pairs of input and output formats.","name":"Formats"},{"description":"The account of the API key.","name":"Account"},{"description":"Signed upload and download URLs. They work without an API key.","name":"Files"},{"description":"Status of the API.","name":"Health"}]}