---
title: "Convert plain text into a PDF"
method: POST
path: "/text-to-pdf"
---

# Convert plain text into a PDF

`POST /text-to-pdf`

## Request

- Base URL: `https://x402-preflight.tinyopsstudio.com`
- URL: `https://x402-preflight.tinyopsstudio.com/text-to-pdf`
- Auth: API key in header `PAYMENT-SIGNATURE`
- TypeScript: <https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight/docs/text-to-pdf/post.ts> (a function with typed inputs; its response is checked against the schema)

Convert plain text into a standards-compliant PDF document and return the file as base64-encoded application/pdf data. Input is processed in memory and is not retained.

## Request body

- object
  - `title` string: Optional title printed at the top of the document.
  - `text` string, required: Plain text to convert.

## Response `200`

Structured automation preflight result.

- object

## Other responses

- `402`: x402 payment is required before the request is run.

---

[API](https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight.md) - [All operations](https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight/llms.txt) - [OpenAPI document](https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight/revisions/ec10cf36035d?raw)
