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.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
202 and status: "queued". Persist its id. A replay can already be complete, so always inspect the returned status.
3. Wait for completion
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
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
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.