Skip to main content
We expose two conversion endpoints:
  • POST /v1/runs/{run_id}/export — re-export a document that our API produced (via /word/generate, /excel/generate, /slides/generate, /projects/{id}/reports, etc.) in a different format.
  • POST /v1/files/{file_id}/convert — convert a file you uploaded via POST /v1/files. Works on any supported source format.
Both go through the same conversion pipeline, so output quality is identical. Results are cached by (run_id, format) and (file_id, format) respectively — repeat calls for the same conversion return a fresh signed URL instantly without re-running the converter.

Supported conversions

An unsupported pair returns 400 invalid_request with the set of valid targets for that source in the message.

Convert a file you uploaded

Useful when your users already have a .docx and you want a PDF to email or render in your product.
Response shape:
download_url is signed for 1 hour. The converted artifact itself is cached permanently — re-calling the endpoint re-signs the existing URL instead of re-running the conversion.

Request format

POST /v1/files/{file_id}/convert accepts a multipart form with a single field: Authentication is a standard sk_live_* API key via the X-API-Key header (or the legacy Authorization: Bearer header). Per-file scope gating is applied — you can only convert files you can see under your current key’s scope (personal or workspace).

Convert a run’s output

Every /*/generate call persists its primary artifact. To export that artifact in a different format, call /runs/{run_id}/export:
Response shape:
Unlike /files/{id}/convert which takes multipart form-data, this endpoint takes JSON (it matches the existing /runs/* family).

Errors

Performance notes

  • First conversion of a large .pptx → .pdf can take 5–20 seconds. Subsequent calls for the same (file_id, format) are ~100ms thanks to the cache.
  • png outputs for slide decks render only the first slide. Use pdf if you need every slide.
  • csv from multi-sheet workbooks exports only the active sheet. We’re considering a ?sheet=<n> parameter in a future release; please let us know if you need it.