# Animica Audio Generation API

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

Asynchronously generates, isolates, enhances, masters, or stems-separates audio from a text prompt or uploaded audio file via x402 pay-per-call

## Facts

- Endpoint: POST https://animica.dev/x402/media/audio
- Price: $0.002512/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-audio-generation-api-30c6b9a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aJAWQlUt-OeZ96JV_oOyw

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-audio-generation-api-30c6b9a9 -d '<json body>'
```

Example prompt: Generate a relaxing lo-fi hip-hop background track — submit it as an 'audio' kind with the prompt 'chill lo-fi hip-hop beats, soft piano, rain ambiance' and poll for the result when it's ready.

## When to prefer this

Choose this endpoint when you need AI-generated audio, music, or audio processing (enhancement, mastering, stem separation, vocal isolation) via a pay-per-call model without requiring a separate API key. Prefer it for agentic workflows that need programmatic audio creation or transformation at low cost ($0.007632/call) using the x402 micropayment protocol on the Base/USDC stack.

## Known failure modes

- Invalid 'kind' value returns an error — must be one of audio, audio_stems, audio_isolate, audio_enhance, audio_master
- Missing 'prompt' for generation kinds (audio) causes a validation error
- Invalid or expired upload_ids for upload-driven kinds (audio_isolate, audio_enhance, audio_master, audio_stems) causes failure
- Payment not included or insufficient USDC (0.007632) via x402 protocol results in 402 Payment Required
- No miners online may cause indefinite queue delay
- Poll URL may eventually expire if artifact is not fetched promptly

## How this service works

Animica Python Cloud: deploy a Python function to animica.dev, get a public endpoint, and earn ANM every time someone runs it. Free AI (OpenAI-compatible, no key), free scheduled Workers, and an 80/20 developer split.

## Output

A JSON job handle containing job_id, kind, status, queue position, miners_online count, a poll_url for checking progress, and a message. The job is asynchronous — the agent must GET the poll_url repeatedly until status is 'done', then retrieve the rendered audio artifact.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "kind": {
   "type": "string",
   "description": "one of: audio, audio_stems, audio_isolate, audio_enhance, audio_master (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-audio-generation-api-30c6b9a9/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)
