Skip to content

基本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.
  1. 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"
  2. 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.

  3. 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"}'

    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_url is the picture: WebP for the anime model, PNG for ultra tiers. Download it if you need to keep it.
    • enhanced_prompt is what the model actually read. On the anime model your prompt is rewritten into Danbooru tags first.
    • balance_usd is your balance after the charge. It’s a raw float, so round it to cents for display.

→Where next