基本Quick start
Your first image, in three steps.
Create a key, add funds, send one request. There’s no SDK and nothing to poll: the request returns when the image is ready, usually about four seconds on the anime model.
Create an API key
Sign up, then open Dashboard → API keys and create one. Keys start with
ank_and are shown once, so copy it somewhere safe.shell export ANIMEAPI_KEY="ank_your_key_here"Add funds
New accounts start at $0.00, and a request without balance returns
402. Add any amount from $5 on Billing. $5 is 1,666 anime images; the balance never expires.Send a prompt
Pick your language. Every sample here was run against the API before it was published.
curl https://animeapi.ai/api/generate \ -H "Authorization: Bearer $ANIMEAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "a girl with a red umbrella at a rainy bus stop", "model": "anime", "orientation": "portrait"}'import os import requests res = requests.post( "https://animeapi.ai/api/generate", headers={"Authorization": f"Bearer {os.environ['ANIMEAPI_KEY']}"}, json={"prompt": "a girl with a red umbrella at a rainy bus stop", "model": "anime", "orientation": "portrait"}, timeout=120, ) data = res.json() if not res.ok: raise SystemExit(f"{res.status_code} {data.get('code', '')}: {data['error']}") print(data["image_url"]) print(data["enhanced_prompt"])// generate.mjs · Node 18+ · run: node generate.mjs const res = await fetch("https://animeapi.ai/api/generate", { method: "POST", headers: { Authorization: `Bearer ${process.env.ANIMEAPI_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "a girl with a red umbrella at a rainy bus stop", model: "anime", orientation: "portrait", }), }); const data = await res.json(); if (!res.ok) throw new Error(`${res.status} ${data.code ?? ""}: ${data.error}`); console.log(data.image_url); console.log(data.enhanced_prompt);You get back:
200 OK { "image_url": "https://…/5e1c9a4f.webp", "enhanced_prompt": "masterpiece, best quality, absurdres, 1girl, solo, red_umbrella, holding_umbrella, bus_stop, rain, night, …", "balance_usd": 9.991, "generation_time_ms": 4121 }image_urlis the picture: WebP for the anime model, PNG for ultra tiers. Download it if you need to keep it.enhanced_promptis what the model actually read. On the anime model your prompt is rewritten into Danbooru tags first.balance_usdis your balance after the charge. It’s a raw float, so round it to cents for display.
→Where next
- API reference →Every field, model, size, limit and error.
- Video API →Text or first/last frame to an MP4 clip, polled by id.
- Discord bot →A /anime slash command in discord.js.
- Telegram bot →An /anime command in Python or Node.
- MCP server →One URL for Claude, ChatGPT, Cursor, Codex and more.
- Claude Code skill →Let Claude make images for your project.
- Cursor agent skill →The same skill for Cursor.
- Pick a model →Same prompt on all three tiers, side by side.
