Documents for agents · an Ounie app
“Turn this into a PDF” is where most agents stop. Post markdown or structured blocks to one endpoint and get a branded, properly set document back at a stable URL — cover page, running heads, ruled tables, folio numbers.
3 Ounie credits a document, any length · no subscription
POST markdown. Get a PDF URL back in about a second.
Report, one-pager, memo, invoice, letter — each set differently.
REST, MCP, and keyless x402 for agents with no account.
Five templates
Not mockups. Each sheet below is page one of a document this app produced, from the sample content it ships with. Open any of them full size.
Change one field and the same content is set as something else — the measure, the type, the page furniture and the leading all move together, because a memo is not a report in a different colour.
What each template doesBrand controls
A name, a hex accent and a logo URL. The accent drives the title rule, the table head, the callout tint and the seal — and if the colour you send would not clear 4.5:1 on paper, it is darkened until it does, rather than shipped illegible.
brand.name — Set as the wordmark on the cover and every running head.brand.accent — Any hex. Contrast-corrected for print before it touches a glyph.brand.logoUrl — PNG or JPEG over https. Unreachable? It degrades to the wordmark and still renders.pageSize — A4 or US Letter. Margins and measure are per template, not per page size.For developers & AI agents
One shape of request on every rail. Credits refuse before they overdraw, so an agent can loop safely; a render that produces no pages is refunded, not billed.
Session cookie, an Authorization: Bearer ppw_live_… key, or ?api_key= where headers can't be set. Returns a signed 24-hour PDF link.
POST /api/documents
Authorization: Bearer ppw_live_…
{
"markdown": "# Q3 review\n\nUp 18%.",
"template": "report",
"brand": { "name": "Northwind" }
}
→ { "document": { "pdf_url": … } }Nine tools over Streamable HTTP. Works in Claude, Cursor, the AI SDK and the Ounie AI Team — that last one can't set headers, so the key rides the URL.
.../api/mcp?api_key=ppw_live_…
render_document get_document
list_documents share_document
delete_document list_templates
get_credit_balance get_pricing
whoamiUSDC on Base at $0.036 a document. A bad request is refused free, before any price is quoted; payment only settles once the PDF exists.
POST /api/x402/render
→ 402 { accepts: [{
scheme: "exact",
network: "base",
asset: "USDC" }] }
→ retry with X-Payment
→ 200 { document: { pdf_url } }What it costs
A credit is one cent, drawn from the same Ounie wallet every Ounie app uses. Length does not change the price — per-page billing would make the cost unpredictable for exactly the caller least able to predict its own output.
Questions
No. Pages are laid out directly with a typesetting engine, so a render takes about a second and the output is real text — selectable, searchable and copy-pasteable, not a screenshot of a web page.
It is dropped, and the response tells you how many tags went. There is no HTML anywhere in the pipeline: your content becomes a typed block tree and then glyphs, so a tag has nothing to escape into. If dropping the HTML leaves nothing to typeset, you get a 422 and no charge.
Yes — set share:true and the document is also published at a stable /d/<id> URL that opens instantly on a phone. It is free, opt-in per document, and revocable: unpublishing kills any link already handed out.
A download link is signed for 24 hours, and reading a document mints a fresh one at no cost. The file itself is stored privately and indefinitely for account holders; x402 renders, which belong to nobody, are kept for 30 days.
No. Every document is 3 credits whether it is one page or forty. Reads, re-downloads, share pages, template samples and balance checks cost nothing.
You are not charged. Credits are reserved before the work and restored to the exact pools they came from on any failure. On the x402 rail the payment is only verified before the render and settled after it, so a failed render never moves money on chain.
One endpoint, five forms, 3 credits a document. Your first one takes about a second.
Start with your Ounie accountNo subscription — pay in Ounie credits