Skip to main content

ChatIMG API panel

Sign in to get your token, check your credits balance and live pricing: https://chatimg.ai/user/api

1. Get your API token

ChatIMG and BibiGPT share one account system, so the API token is the same one. Sign in to ChatIMG and open chatimg.ai/user/api to get it (if you already use the BibiGPT open API, that token works here as-is). Every endpoint authenticates through the HTTP header:
API calls draw from the same credits balance as the web app — no separate plan or top-up needed. Check the balance at chatimg.ai/user/api and top up at chatimg.ai/pricing.

2. Call flow

Image generation is asynchronous: start the job, then poll by the source image URL.

Step 1 — Start generation POST /v1/generateImage

The response carries taskId for tracking, costCredits for what this call charged, and balanceRemaining for the balance after the charge.
Failed generations are refunded automatically — you don’t need to reconcile them yourself.

Step 2 — Poll the result GET /v1/imageStatus

Query with the same imageUrl you sent. Read-only and free of charge:
Once status becomes completed, generatedImageUrl holds the finished image. Latency varies a lot by model (lightweight models take seconds, GPT Image 2 about 1–2 minutes), so poll every 3–5 seconds with a sensible timeout.

Step 3 — Check pricing GET /v1/imagePricing

No authentication required. Returns the per-image credits price of each model plus top-up packs, so your script can enforce a budget:

3. Models and pricing

Credits charged per generated image (/v1/imagePricing is the live source of truth):

4. End-to-end example

Minimal script that starts a job and polls until it finishes:

FAQ

The token is missing or no longer valid. Check that the header reads Authorization: Bearer <token>, and confirm your current token at chatimg.ai/user/api. If you ever hit “reset”, the old token stops working immediately and your scripts need the new one.
imageUrl must be a publicly reachable http(s) address or base64 data. A browser-local preview address (starting with blob:) can’t be read by the server. These requests are not charged.
Top up a credits pack at chatimg.ai/pricing (credits never expire), or subscribe for a monthly allowance. You can also switch to a cheaper model — z-image-turbo costs 5 credits per image.
There’s no generation record for that imageUrl — usually the polling URL doesn’t exactly match the one you submitted. The two must be character-for-character identical, query string included.