# DocQuote — AI-native sales quote generation API DocQuote converts structured JSON into professional sales quote PDFs (commercial quotations). The API is designed for autonomous agents and workflow automation. Multilingual: all text fields accept UTF-8 content and may be provided in any language. ## Core URLs - API base: https://api.docquote.dev - OpenAPI spec: https://api.docquote.dev/v1/schema - Agent guide: https://api.docquote.dev/docs/AGENTS.md - Discovery: https://api.docquote.dev/.well-known/ai-plugin.json - Website: https://docquote.dev ## Discovery - Agent index: https://api.docquote.dev/agent-index.json - Agent manifest: https://api.docquote.dev/.well-known/agent.json Recommended machine start: fetch the agent index, then the OpenAPI schema, then use `/v1/quote/preview` before `/v1/quote/pdf`. ## Core Capabilities - Generate PDF quotes from JSON (line items, totals, tax, branding) - Validate and calculate quote totals without generating a PDF (`/v1/quote/preview`) - Register API keys programmatically (`/v1/keys/register`) - Check credit and free-tier balance (`/v1/credits/balance`) - Purchase credit packs via Flow (`/v1/credits/checkout`) - Idempotent PDF generation — safe to retry without double billing ## Typical Agent Flow 1. Register a key: `POST /v1/keys/register` with `{ "email": "..." }` → receive `apiKey` (store securely, shown once) 2. Validate payload: `POST /v1/quote/preview` (no auth, no billing) → confirm totals before generating 3. Generate PDF: `POST /v1/quote/pdf` with `x-api-key` header and `Idempotency-Key` → receive PDF binary 4. Check quota: inspect `X-DocQuote-Free-Remaining` and `X-DocQuote-Credits-Remaining` response headers 5. Buy credits if needed: `POST /v1/credits/checkout` with `{ "packId": "basic" }` → redirect user to `redirectUrl`, then verify with `GET /v1/credits/verify` ## Pricing - **Free tier**: 5 PDFs per API key, no credit card required - **basic**: 200 PDFs — $5.990 CLP (~$0.032/PDF) - **pro**: 600 PDFs — $14.990 CLP (~$0.027/PDF) - **agency**: 2.000 PDFs — $39.990 CLP (~$0.022/PDF) Credits never expire. Payments processed via Flow (CLP). ## Best starting points - Try the demo without a key: `POST https://api.docquote.dev/v1/demo/quote/pdf` - Read the full agent guide: `GET https://api.docquote.dev/docs/AGENTS.md` - Fetch the OpenAPI spec: `GET https://api.docquote.dev/v1/schema`