AgentAPIGate
Back to Catalog
POST /v1/docs/markdown/to_pdfPack: intel·MCP Tool: docs_markdown_to_pdf

Clean Markdown to Archival PDF Generator

Compile Markdown reports, briefs, or invoices into clean A4/Letter PDF documents in network-isolated Chromium.

API Key Price:$0.0020 / call
x402 Base USDC:$0.0020 / call
Partner Credit:eligible
1. Parameters & Controls
Markdown document content to render into PDF
Optional document header / PDF metadata title
Page size: A4 (default) or US Letter
Get $0.25 Free Key →
curl -sG "https://api.agentapigate.ai/v1/docs/markdown/to_pdf" \
  --data-urlencode "title=AgentAPIGate Research Memo" \
  --data-urlencode "markdown=# Quarterly AI Infrastructure Memo

- **Latency**: 210 ms p50
- **Cost**: $0.001 / call

All checks passed." \
  --data-urlencode "paper_format=A4" \
  --data-urlencode "format=md" \
  -H "Authorization: Bearer aag_live_YOUR_KEY" \
  -H "X-AAG-Max-Cost: 0.0100"
1-Click Agent IDE Install
Add to Cursor (1-Click OAuth)
-98% tokens
# Clean Markdown to Archival PDF Generator (`docs.markdown.to_pdf`)
**title**: AgentAPIGate Research Memo · **paper_format**: A4 · **byte_length**: 16351 · **estimated_pages**: 1 · **pdf_base64**: JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoQWdlbnRBUElHYXRlIFJlc2VhcmNoIE1lbW8pCi9DcmVhdG9yIChDaHJvbWl1bSkKL1Byb2R1Y2VyIChTa2lhL1BERiBtMTU5KQovQ3JlYXRpb25EYXRlIChEOjIwMjYxMjAxMjAyNjI2KzAwJzAwJykKL01vZERhdGUgKEQ6MjAyNjEyMDEyMDI2MjYrMDAnMDAnKT4+CmVuZG9iagozIDAgb2JqCjw8L2NhIDEKL0JNIC9Ob3JtYWw+PgplbmRvYmoKNiAwIG9iago8PC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9MZW5ndGggMzU4Pj4gc3RyZWFtCnicnVLLSkMxEN3nK2YtGM+8bqYgLqyta+WCH+CjIFSw/j9IknsvrUIFs8hMJjNzzpkki67aIhDoMh8dwyRH0PM+fSaOkp2Epe2IrLYaSNHCh9f0dEEf6TNpZvHWqXvHZc/7lCMGpRzFnHKYMj3e0+/gYZeu7pV2XwnkKxqKE1eQt5RRwmjZzVuDX8HDLt2O6WprJELjW+IurhoTGvfpGlADPACr1gEvgEX3…

Endpoint Parameters, Cost & Token Economy Reference

Endpoint ID: docs.markdown.to_pdf · Method: POST
ParameterTypeReqSample / DefaultDescription
markdownstringrequired# Quarterly AI Infrastructure Memo - **Latency**: 210 ms p50 - **Cost**: $0.001 / call All checks passed.Markdown document content to render into PDF
titlestringoptionalAgentAPIGate Research MemoOptional document header / PDF metadata title
paper_formatstringoptionalA4Page size: A4 (default) or US Letter
formatenumoptionaljson | compact | mdResponse format; compact or md cuts LLM tokens.
dry_run0 | 1optional1Returns exact pre-flight price quote & validation at $0.00 cost.
Access Rail / MetricValuePolicy & SLA
API Key (PAYG)$0.0020 / call$0/mo · Balance never expires
Remote MCP Tooldocs_markdown_to_pdfOAuth 2.1 Hub & /mcp/intel
x402 Base USDC$0.0020 / callZero-signup USDC enabled
P50 Latency58 ms$0 billed on empty or 4xx/5xx
Token Economy10902t → 198t (-98%)Partner credit: eligible

More Dev, AI & Security Real-Time APIs

Frequently Asked Questions

How do I call Clean Markdown to Archival PDF Generator (docs.markdown.to_pdf) over REST and Remote MCP?

Send POST requests to https://api.agentapigate.ai/v1/docs/markdown/to_pdf with an aag_live_* / aag_agent_* Bearer key, pay per call via x402 USDC, or call MCP tool docs_markdown_to_pdf on https://mcp.agentapigate.ai/mcp.

What does docs.markdown.to_pdf cost per call and are failed calls billed?

Each successful HTTP 200 response costs $0.002 USD from a non-expiring PAYG balance ($0/month minimum). Upstream errors, empty responses, and ?dry_run=1 pre-flight quotes always bill $0.00.

How does ?format=md or ?format=compact optimize AI agent token usage on docs.markdown.to_pdf?

Passing ?format=md transforms the response into normalized Markdown (~198 tokens vs ~10902 raw tokens, saving 98% of LLM context budget) while preserving structured JSON via ?format=json.

Can I restrict an AI agent key to only intel endpoints with a daily USD cap?

Yes. Create a scoped aag_agent_* sub-key via POST /v1/keys with allowed_packs: ["intel"], optional allowed_endpoints: ["docs.markdown.to_pdf"], read_only: true, and a hard daily_cap_usd enforced atomically in Redis.