▤DocShot · API reference

DocShot

Markdown to a clean, paginated PDF.

base: https://docshot.agentictray.comauth: optionalJSON version

Quick start

curl -X POST https://docshot.agentictray.com/api/convert \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Hola\n\nTexto.","title":"Mi doc"}' \
  -o salida.pdf

Authentication

Ninguna. DocShot no pide registro: la cuota es por llamante (IP hasheada) y se repone cada dia.

La IP se guarda solo hasheada con una sal; nunca en claro.

Limits

Endpoints

POST/api/convert

Renders markdown to a paginated A4 PDF.

Request

Content-Type: application/json
  • markdownREQUIREDstring
    El markdown a convertir. Encabezados, listas y negritas funcionan.
  • titlestring
    Titulo del documento. Si falta, se usa el primer encabezado.

Responses

  • 200
    application/pdf
    El PDF paginado.
    • X-RateLimit-Remaining — conversiones que te quedan hoy
    • Content-Disposition — attachment; filename="<titulo>.pdf"
  • 400
    application/json
    {"error": "Empty request body."}
  • 400
    application/json
    {"error": "Body must be JSON {markdown: str, title?: str}"}
  • 400
    application/json
    {"error": "Field 'markdown' is required and non-empty."}
  • 413
    application/json
    {"error": "Request too large."}
  • 429
    application/json
    {"error": "Daily limit reached (20). Come back tomorrow."}
    • X-RateLimit-Remaining: 0
    • Retry-After: 86400
  • 500
    application/json
    {"error": "Could not render PDF. Check your markdown."}
  • 504
    application/json
    {"error": "Render took too long (limit 90 s)."}
GET/healthz

Service status and meter counters.

Responses

  • 200
    application/json
    {"ok": true, "service": "docshot", "port": 7732, "log_written": 0, "log_failures": 0, "log_queued": 0}
GET/api/docs

This same reference, as JSON.

Responses

  • 200
    application/json
    { ... } (this document)
GET/docs

This same reference, as HTML.

Responses

  • 200
    text/html
    (this page)

Notes