Gerar markdown
gerar_markdownBuys individual access to the document for US$ 0.02/page, through x402/credit.
Each buyer pays, even when the text is ready. Check GET or the 402, confirm pages/hash/total and send cotacao. The account session (cookie + browser CSRF) records the purchase in the global right of the account before the delivery, without a separate code; with the edm_… guest (Bearer), the right is the guest's and the code comes along; an agent uses X-Credito. Without an account, keep acesso.codigo to reopen or to link later. After the link, only the account opens it. A ready text reuses the OCR; a necessary generation is included. An unknown/changed quote does not charge. 152 pages = US$ 3.04. Body up to 4096 bytes. After a 202, follow up through GET. Paid and the recording of the right failed: 502 pago_nao_registrado with the recibo; keep it, and support delivers or refunds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Positive ID of the document returned by the procurement. | |
| cotacao | No | Object received in the GET/402: paginas, source_sha256 and preco_total_usd must match the current quote. Required when you send a payment authorization. | |
| agent_pass | No | Individual agent credential, required together with X-Editalmd-Avaliacao. | |
| idempotencia | No | Attempt key, up to 80 characters; keep it in credit retries of the same document. | |
| acesso_codigo | No | Private code in acesso.codigo after a payment by someone not signed in to the account; up to 4096 characters. It authorizes this document for whoever holds it. A purchase made with the account session issues no code: the global right of the account (HttpOnly cookie) applies, and the right of the edm_… guest applies with its token. A public receipt does not grant access. | |
| credito_token | No | cred_… token to deduct from the balance, as an alternative to x402. | |
| avaliacao_codigo | No | evaluation.access_code of the sponsored premium, only for this document and agent, with an expiry. Use it together with X-Agent-Pass; it is not a receipt or a purchase. |