---
title: "Create Document from Content"
method: POST
path: "/document_generation/create-from-content"
tags: ["Document AI — DMS"]
---

# Create Document from Content

`POST /document_generation/create-from-content`

## Request

- Base URL: `https://api.paperoffice.ai/latest`
- URL: `https://api.paperoffice.ai/latest/document_generation/create-from-content`
- Auth: HTTP bearer

Generate a PDF in the DMS from Markdown or HTML.

## Request body

- object
  - `content` string, required: Markdown or HTML source (required). Not html_content.
  - `content_type` 'markdown' | 'html', required: Format of the content field.
  - `output_format` 'pdf': Output format of the created document
  - `title` string: Document title (also used as the filename)
  - `workspace_id` integer, required: Target workspace ID (required). Use po_workspaces_list to find valid workspace IDs.
  - `metadata` object: Metadata as key-value pairs (stored as IDP fields).
  - `language` string: Language for formatting (de/en)
  - `auto_classify` boolean: Automatic classification after creation.
  - `custom_css` string: Additionals CSS for the PDF-Layout
  - `header_html` string: HTML for page header
  - `footer_html` string: HTML for footer
  - `priority` integer: LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.
  - `processing_lane` 'no_sla' | 'sla_24h' | 'sla_12h' | 'sla_6h' | 'sla_1h' | 'instant': Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.

## Response `200`

Success

- SuccessEnvelope: Success envelope. Payload fields are endpoint-specific (top-level fields, `result`/`job_result` for jobs, `data` on some account endpoints).
  - `status` 'success', required
  - `processing_time` union
    - string
    - number
  - `_billing` object

## Other responses

- `201`: Created
- `4XX`: Error
- `5XX`: Error

---

[API](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api.md) · [All operations](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/revisions/c6a6228a4509?raw)
