{"components":{"headers":{"RequestId":{"description":"Opaque identifier for support and operational correlation.","schema":{"pattern":"^[a-f0-9]{32}$","type":"string"}}},"schemas":{"ApiError":{"properties":{"code":{"enum":["authentication_required","invalid_api_key","insufficient_tokens","file_required","target_required","unsupported_source","unsupported_conversion","invalid_file","file_too_large","rate_limit_exceeded","conversion_failed","service_disabled","service_unavailable"],"type":"string"},"error":{"type":"string"},"max_file_size_bytes":{"type":"integer"},"purchase_url":{"type":"string"},"request_id":{"type":"string"},"tokens_remaining":{"minimum":0,"type":"integer"}},"required":["error","code","request_id"],"type":"object"},"Balance":{"properties":{"api_key_label":{"type":"string"},"tokens_remaining":{"minimum":0,"type":"integer"}},"required":["tokens_remaining","api_key_label"],"type":"object"},"Formats":{"properties":{"api_version":{"const":"v1"},"conversions":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"propertyNames":{"enum":["aac","avi","bmp","csv","docx","epub","flac","gif","html","ico","jpg","json","md","mov","mp3","mp4","ogg","otf","pdf","png","tar","ttf","txt","wav","webm","webp","woff","woff2","xlsx","xml","yaml","zip"]},"type":"object"},"enabled":{"type":"boolean"},"max_file_size_bytes":{"const":524288000},"normalizations":{"additionalProperties":{"type":"string"},"type":"object"},"token_cost_per_file":{"const":1}},"required":["api_version","enabled","token_cost_per_file","max_file_size_bytes","normalizations","conversions"],"type":"object"}},"securitySchemes":{"ApiKey":{"bearerFormat":"fc_ API key","scheme":"bearer","type":"http"}}},"info":{"description":"Token-metered hosted file conversion. Files sent to this API are uploaded to Loconva for server-side processing; this differs from the browser converter's local processing.","title":"Loconva Conversion API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/balance":{"get":{"operationId":"getBalance","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}},"description":"Current account token balance.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The API key is missing or invalid.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKey":[]}],"summary":"Get the account token balance for an API key","tags":["Conversion API"]}},"/api/v1/convert":{"post":{"description":"Uploads one file and consumes 1 token only after a successful conversion. Conversion requests are not idempotent and should not be retried automatically.","operationId":"convertFile","requestBody":{"content":{"multipart/form-data":{"encoding":{"file":{"contentType":"application/octet-stream"}},"schema":{"properties":{"file":{"format":"binary","type":"string"},"target":{"example":"jpg","type":"string"}},"required":["file","target"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Converted file. The filename is supplied by Content-Disposition.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The request, file, source format, or target format is invalid.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The API key is missing or invalid.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The account has insufficient conversion tokens.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The uploaded file exceeds the server limit.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The request rate limit was exceeded.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The conversion failed without consuming a token.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Server-side conversion is not enabled or available.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKey":[]}],"summary":"Convert one file","tags":["Conversion API"]}},"/api/v1/formats":{"get":{"operationId":"listFormats","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Formats"}}},"description":"Authoritative server conversion capabilities.","headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}}},"security":[],"summary":"List supported server conversions and limits","tags":["Conversion API"]}}},"servers":[{"url":"https://www.loconva.com"}],"tags":[{"description":"Version 1 hosted conversion endpoints.","name":"Conversion API"}],"x-loconva-rate-limit-per-minute":30}
