OpenAdapterOpenAdapter
Tools

Text to Document

Convert text into a downloadable document. Supports PDF, DOCX, HTML, Markdown, and TXT formats.

Base URL & authentication

Base URL: https://api.openadapter.in

All requests need an Authorization: Bearer sk-cv-... header. Generate or copy your API key from the Dashboard → API Keys page.

Endpoint: POST /v1/edge/text2doc Cost per call: 0.15 credits Minimum plan: free

Convert text into a downloadable document. Supports PDF, DOCX, HTML, Markdown, and TXT formats.

Request

curl https://api.openadapter.in/v1/edge/text2doc \
  -H "Authorization: Bearer $OPENADAPTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"# Hello\n\nWorld","format":"pdf"}' \
  --output document.pdf
import requests

resp = requests.post(
    "https://api.openadapter.in/v1/edge/text2doc",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
    "text": "# Hello\n\nWorld",
    "format": "pdf",
},
)
with open("document.pdf", "wb") as f:
    f.write(resp.content)
const res = await fetch('https://api.openadapter.in/v1/edge/text2doc', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.OPENADAPTER_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "text": "# Hello\n\nWorld",
  "format": "pdf"
}),
});
const blob = await res.blob();
// Save blob to document.pdf

Pricing

Each call costs 0.15 credits. Available on the free plan and above.

On this page