Clean Markdown to Archival PDF Generator
Compile Markdown reports, briefs, or invoices into clean A4/Letter PDF documents in network-isolated Chromium.
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"
# 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| Parameter | Type | Req | Sample / Default | Description |
|---|---|---|---|---|
| markdown | string | required | # Quarterly AI Infrastructure Memo - **Latency**: 210 ms p50 - **Cost**: $0.001 / call All checks passed. | Markdown document content to render into PDF |
| title | string | optional | AgentAPIGate Research Memo | Optional document header / PDF metadata title |
| paper_format | string | optional | A4 | Page size: A4 (default) or US Letter |
| format | enum | optional | json | compact | md | Response format; compact or md cuts LLM tokens. |
| dry_run | 0 | 1 | optional | 1 | Returns exact pre-flight price quote & validation at $0.00 cost. |
| Access Rail / Metric | Value | Policy & SLA |
|---|---|---|
| API Key (PAYG) | $0.0020 / call | $0/mo · Balance never expires |
| Remote MCP Tool | docs_markdown_to_pdf | OAuth 2.1 Hub & /mcp/intel |
| x402 Base USDC | $0.0020 / call | Zero-signup USDC enabled |
| P50 Latency | 58 ms | $0 billed on empty or 4xx/5xx |
| Token Economy | 10902t → 198t (-98%) | Partner credit: eligible |
More Dev, AI & Security Real-Time APIs
All-in-one domain intelligence combining RDAP registrar/expiry data, Cloudflare DoH A/MX/TXT/NS records, and live TLS SAN certificate inspection.
Use when you need commercial-grade passive IP reconnaissance: RIR RDAP CIDR/organization/abuse contacts, Cloudflare DoH reverse PTR hostnames, and port-443 TLS SAN inspection.
Resolve country, city, coordinates, timezone, ASN, and ISP organization for any public IP address.
Use when you need Common Vulnerabilities and Exposures (CVEs) from NIST NVD 2.0 and OSV.dev enriched with FIRST.org EPSS 30-day exploitation probability.
Search 250M+ peer-reviewed and preprint research papers across OpenAlex and arXiv with citation counts, DOIs, and abstracts.
Query recruiting and completed clinical trials by condition, drug intervention, sponsor, and phase from ClinicalTrials.gov v2.
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.