{"uid":"cap_4HWGCDprTtS4IszuA0BkV","slug":"animica-credits-voucher-purchase-d3ab31c7","name":"Animica Credits Voucher Purchase","description":"Buy a prepaid credit voucher in ONE on-chain settlement, then spend it across every paid product on this gateway with no further settlement and no gas. Send the returned token as \"X-Animica-Credits: anmc_...\" (or \"Authorization: Bearer anmc_...\") on any paid route and the call is served from the balance instead of a payment. Credit is granted at face value plus 10% — that bonus is the Base settlement gas we do not spend on your calls 2..N, returned to you. The voucher is a BEARER secret shown exactly once and stored only as its SHA-256 hash: anyone holding it can spend it, and we cannot recover it for you. Balance and full spend history are readable for free at GET /x402/credits/balance with the token. Unused credit expires 365 days after purchase. Send the token on THIS route to top up an existing voucher instead of minting a new one.","url":"https://animica.dev/x402/credits/buy","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"label":{"type":"string","description":"optional free-text label (<=64 chars) returned with your balance, so an agent can tell its own vouchers apart"}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.5","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.5/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.5","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.5","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pGzIYBH5wAOSvgE1at1dC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.5","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Purchase a prepaid USDC credit voucher for use with Animica's pay-per-call x402 API endpoints","exampleAgentPrompt":"Buy me an Animica credits voucher — label it 'my-agent-budget' — so I have prepaid USDC balance ready to call Animica Python Cloud endpoints.","exampleUseCases":[{"title":"Fund autonomous agent API budget","prompt":"Create an Animica credit voucher labeled 'research-agent' so my AI agent has a prepaid balance it can draw from whenever it needs to call Animica Python Cloud functions."},{"title":"Pre-purchase credits before batch tasks","prompt":"I'm about to run a bunch of Animica API calls tonight — can you buy me a credits voucher on animica.dev labeled 'batch-job-oct' so I don't have to pay per call each time manually?"},{"title":"Separate vouchers per project","prompt":"I need two separate Animica vouchers — one labeled 'project-alpha' and one labeled 'project-beta' — so I can track spend for each project independently."}],"resultDescription":"Returns a JSON object containing a one-time-shown voucher token, a voucher_id for future reference, the credited balance in both atomic units and USDC, any bonus credits earned, an expiry timestamp, instructions on how to use the voucher in subsequent API calls, and payment confirmation metadata.","failureModes":["Insufficient USDC payment — payment rejected if the 0.5 USDC x402 payment is not included or malformed","Label too long — label field exceeds 64 characters causes validation error","Token shown only once — if the response is lost, the token cannot be recovered (only voucher_id remains)","Payment network failure — blockchain transaction not confirmed, voucher not minted","Duplicate payment detection — replayed transactions may be rejected by the x402 facilitator"],"whenToPreferThis":"Use this endpoint when an AI agent needs to autonomously pre-fund its own API budget on Animica before making a series of pay-per-call requests, or when you want to isolate spend by labeling separate vouchers per project or agent. Prefer this over per-call payments when running workflows that will invoke multiple Animica-hosted Python functions and need a reusable balance rather than paying on each individual call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:56:04.900Z","isFirstParty":false}