Quickstart
Sign in, run one generation, read the receipt. Five minutes, and you will have seen every moving part: the price quote, the run, the charge.
1Sign in
Create an account and open the workspace. New accounts start with a small free allowance — a few images and a handful of chat replies — so you can try everything before buying credits.
2Make one image
Open Image, type a prompt, and press create. The credit price is shown before the run — that number is what you are charged, not an estimate.
3The same thing, as a call
From a signed-in tab, the session authenticates you and no header is needed:
const res = await fetch("/api/generate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
kind: "image",
prompt: "a small red paper crane on a plain grey table, soft light",
model: "flux",
}),
});
if (!res.ok) throw new Error((await res.json()).message ?? res.statusText);
const { generation } = await res.json();The reply carries the finished generation:
{
"generation": {
"id": "dabb8909-…",
"status": "succeeded",
"outputUrl": "https://…/PPhtLdquFOEu.jpg",
"creditsCharged": 3
}
}4Read the receipt
Ask for your balance and you can see exactly what happened — including what is still reserved for runs in flight:
GET /api/credits
{
"balance": 2787,
"holdsActive": 0,
"plan": "pro",
"trial": { "imagesCap": 5, "imagesUsed": 1, "imagesLeft": 4 }
}A run in progress holds its credits instead of spending them. If it fails, the hold is released and you are charged nothing.
5Do it from your own server
Create a key under Settings → Developer, give it only the scope it needs, and call the versioned API. Details in Authentication.
Where to go next
| You want to | Read |
|---|---|
| Generate images from code | Image generation |
| Generate video, and understand per-second pricing | Video generation |
| Know what a plan gives you | Plans & credits |
| Drive Katama from an agent | MCP |