Content Types & Conventions

How requests are encoded and how responses are shaped.

Request encoding

JSON bodies use application/json. File uploads use multipart/form-data with a single file field plus optional option fields. File downloads are returned as raw binary with a Content-Type matching the output format.

Success envelope

Successful responsejson
{
  "success": true,
  "message": "Conversion completed",
  "data": { ... }
}

Paginated endpoints add a meta object with page, limit, total, and totalPages.

Error envelope

Error responsejson
{
  "success": false,
  "message": "Insufficient credits. This conversion costs 2 credit(s).",
  "error": "PAYMENT_REQUIRED",
  "details": { ... }
}

Every error returns a machine-readable error code. See the Response Codes reference for the full list. When a request is rate-limited, the response includes a Retry-After header (in seconds).