Skip to main content
POST
Generate Document
Generate structured documents from a natural language prompt. Supports PDF, DOCX, PPTX, XLSX, and CSV formats.

Authentication

Requires a Bearer token. See Authentication.

Request Body

prompt
string
required
Description of the document to generate.
format
string
default:"pdf"
Output format. One of: pdf, docx, pptx, xlsx, csv.

Request Examples

Response

id
string
Unique document ID (prefixed doc_).
created
string
ISO 8601 timestamp.
format
string
The output format (e.g., "pdf").
title
string
Auto-generated document title.
download_url
string | null
Presigned URL to download the document file. May be null if file generation is still processing.
size_bytes
integer | null
File size in bytes.
content
string
Text content of the generated document.
usage
object

Example Response

Errors