Skip to content

素材Use · Visual novels and games

Backgrounds and sprites for $0.003 each.

AnimeAPI turns a line of text into an anime background or character sprite in about 4 seconds, for $0.003 an image. $5 buys 1,666 images, so you can ask for several tries of every asset and keep the best. It is good for prototypes, placeholder art, backgrounds and minor characters. It does not give transparent sprites or keep one character identical across calls; both limits are spelled out below.
$0.003
per image, any shape
1,666
images for $5
~4s
per image
3
free images, no card

01What a game’s art costs

Backgrounds for a short visual novel

12 scenes, 4 tries each · 48 images

$0.14 in total

Sprites for its cast

6 characters, 5 expressions, 4 tries each · 120 images

$0.36 in total

Both together

168 images on the anime model

$0.50 in total

Title screen and key art

5 pieces, 4 tries each, on ultra-max · 20 images

$0.40 in total

Item or card art for a larger game

500 cards, 3 tries each · 1,500 images

$4.50 in total

02A batch script

No dependencies. List the assets, run it, and it saves two tries of each into assets/. As written it makes 8 images for $0.024.

assets.mjs
// assets.mjs · Node 18+ · run: ANIMEAPI_KEY=ank_... node assets.mjs
import { mkdir, writeFile } from "node:fs/promises";

const ASSETS = [
  { file: "bg-rooftop-sunset", orientation: "landscape",
    prompt: "visual novel background, empty school rooftop at sunset, chain-link fence, no people" },
  { file: "bg-cafe-night", orientation: "landscape",
    prompt: "visual novel background, small cafe interior at night, warm lamps, rain on the window, no people" },
  { file: "mika-neutral", orientation: "portrait",
    prompt: "visual novel sprite, full body, a girl with short brown hair and a green school blazer, calm smile, plain white background" },
  { file: "mika-surprised", orientation: "portrait",
    prompt: "visual novel sprite, full body, a girl with short brown hair and a green school blazer, surprised, plain white background" },
];
const TAKES = 2; // candidates per asset; keep the best one

await mkdir("assets", { recursive: true });
let spent = 0;
for (const asset of ASSETS) {
  for (let take = 1; take <= TAKES; take++) {
    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: asset.prompt, model: "anime", orientation: asset.orientation }),
    });
    const data = await res.json();
    if (!res.ok) throw new Error(`${asset.file}: ${data.error}`);
    const image = await fetch(data.image_url);
    await writeFile(`assets/${asset.file}-${take}.webp`, Buffer.from(await image.arrayBuffer()));
    spent += 0.003;
    console.log(`assets/${asset.file}-${take}.webp  ${(data.generation_time_ms / 1000).toFixed(1)}s`);
  }
}
console.log(`${ASSETS.length * TAKES} images, $${spent.toFixed(3)}`);

Lead a background prompt with visual novel background and end it with no people. Lead a sprite prompt with visual novel sprite, full body and end it with plain white background. Repeat the same character description word for word and change only the expression.

03What comes back

Three of the script’s prompts, made through the API for this page, unedited. The two sprites use the same description with a different expression: the blazer and hair hold, the tie and socks do not.

04Sizes

05Limits to know first

06Questions

How much does it cost to generate art for a visual novel with an API?
On AnimeAPI's anime model, $0.003 per image. First-pass art for a short visual novel, 12 backgrounds and 6 characters with 5 expressions each at 4 tries apiece, is 168 images or $0.50. $5 buys 1,666 images.
Can it make sprites with a transparent background?
No. Images come back opaque. Ask for a plain white background, which the anime model follows loosely (it is often off-white), and remove the background in your own tool.
Can it keep one character identical across many sprites?
No. There is no reference image or fixed seed, so the same description gives the same kind of character with small differences in face, tie or socks. It suits prototypes, placeholder art, backgrounds and minor characters better than a locked main cast.
What sizes do the images come in?
On the anime model: 1280×832 landscape for backgrounds, 832×1280 portrait for sprites, 1024×1024 square. Ultra and ultra-max are 1536×1024 and 1024×1536. Every size costs the same.