# Animica Credits Voucher Purchase

> Animica Credits Voucher Purchase is a paid API for AI agents from animica.dev, paid per call via x402, $0.5/call, status unknown (last checked 2026-09-13).

Purchase a prepaid USDC credit voucher for use with Animica's pay-per-call x402 API endpoints

## Facts

- Endpoint: POST https://animica.dev/x402/credits/buy
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-credits-voucher-purchase-d3ab31c7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4HWGCDprTtS4IszuA0BkV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability animica-credits-voucher-purchase-d3ab31c7 -d '<json body>'
```

Example prompt: Buy me an Animica credits voucher — label it 'my-agent-budget' — so I have prepaid USDC balance ready to call Animica Python Cloud endpoints.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-credits-voucher-purchase-d3ab31c7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from animica.dev](https://www.zero.xyz/host/animica.dev/llms.txt)
