---
title: "Convert a document to markdown"
method: POST
path: "/v1/to-markdown"
tags: ["Public API"]
---

# Convert a document to markdown

`POST /v1/to-markdown`

## Request

- Base URL: `https://api.clichefactory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.clichefactory.com/v1/to-markdown`
- Auth: none declared

Single-call document-to-markdown conversion. Upload a file, get markdown back.

## Headers

- `Idempotency-Key` string, nullable
- `X-API-KEY` string, nullable

## Response `200`

Successful Response

- PublicToMarkdownResponse: Simplified to-markdown response for the public API.
  - `markdown` string, required: Document content as markdown
  - `plain_text` string, nullable: Document content as plain text
  - `meta` object: Parser metadata

## Other responses

- `400`: Bad request (empty file or unsupported type)
- `401`: Invalid or missing API key
- `422`: Validation Error
- `500`: Conversion failed
- `502`: Storage failure

---

[API](https://skmtc.dev/clichefactory/apis/aio-server.md) · [All operations](https://skmtc.dev/clichefactory/apis/aio-server/llms.txt) · [OpenAPI document](https://skmtc.dev/clichefactory/apis/aio-server/revisions/9bd59f9bbb31?raw)
