# Animica Media Image Generation API

> Animica Media Image Generation API is a paid API for AI agents from animica.dev, paid per call via x402, $0.002152/call, status unknown (last checked 2026-09-14).

Asynchronously generates an image (or triggers other media rendering like video, music, or upscale) from a text prompt via a pay-per-call x402 endpoint, returning a job handle to poll for the result.

## Facts

- Endpoint: POST https://animica.dev/x402/media/image
- Price: $0.002152/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-media-image-generation-api-97eb117e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TKSJ3jgFsG23DusqAJq6I

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-media-image-generation-api-97eb117e -d '<json body>'
```

Example prompt: Generate an image of a sunlit Japanese tea garden with cherry blossoms reflected in a koi pond — submit it as an image kind and poll until it's ready.

## When to prefer this

Choose this endpoint when you need to generate images (or other media) via a pay-per-call micropayment model using x402/USDC without needing a separate OpenAI or Stability AI API key. It is especially suited for AI agents with built-in x402 payment capabilities, or when you want to avoid subscription costs and pay only per generation at ~$0.0065 per call.

## Known failure modes

- Missing required 'prompt' field returns an error (prompt is required for image kind)
- Invalid 'kind' value may be rejected or silently aliased
- Payment failure via x402 protocol results in 402 response and no job is created
- Queue congestion may result in high position values and long wait times
- Polling the poll_url after job expiry may return a 404 or expired status
- Upload IDs that don't exist or belong to another user may cause rendering failure

## How this service works

Text-to-image, rendered by an online GPU miner. Rendered by the Animica GPU-miner queue. Sold only while a miner for the requested kind is online — the catalog reports available:false and the endpoint answers 503 otherwise. Returns a job handle immediately (rendering is asynchronous); polling the returned poll_url is free. Kinds: image.

## Output

A JSON job handle containing job_id, kind, status, position in queue, miners_online count, a poll_url to check progress, and a message. Since rendering is asynchronous, the agent must GET the poll_url (free, no payment required) repeatedly until status is 'done', at which point the rendered image artifact URL becomes available.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "kind": {
   "type": "string",
   "description": "one of: image (aliases accepted, e.g. \"video\", \"music\", \"upscale\")"
  },
  "params": {
   "type": "object",
   "description": "optional per-kind parameters, clamped by the renderer"
  },
  "prompt": {
   "type": "string",
   "description": "what to render; required except for upload-driven kinds"
  },
  "upload_ids": {
   "type": "array",
   "description": "ids from /api/mkt/v1/media/uploads, for image-to-video and the edit kinds"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-media-image-generation-api-97eb117e/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)
