Skip to main content
This walkthrough uses cURL. Create an API key and set REVISE_API_KEY in your shell. Each response supplies the ID needed by the next request; replace the example IDs with your returned values.

1. Upload a document

Send the Markdown directly from standard input. The multipart filename tells Revise which format to parse.
Save the returned id, such as file_…. Uploads are ephemeral by default and can be claimed by one job. Use a new idempotency key for a different input document.

2. Request a PDF

This returns a conversion receipt, normally with HTTP 202 and status: "queued". Persist its id. A replay can already be complete, so always inspect the returned status.

3. Wait for completion

Repeat while status is queued or running, waiting at least one second between polls and honoring Retry-After when present. Stop on succeeded, failed, or cancelled. Inspect error on failure. On success, the downloadable metadata is in output.artifact.

4. Download the artifact

Verify the downloaded byte count and SHA-256 against output.artifact.bytes and output.artifact.sha256 before using the file. Downloads require the same account’s bearer key. See files and artifacts.

The same workflow in TypeScript

The helper uploads, submits, and polls. bytes() downloads lazily and verifies integrity. You can send these bytes in a response or save them to your own storage. See prompts to edit documents instead of converting them.