Get started
How the API works
Models, jobs, files and the wallet, and how they connect.
The API has four parts you will touch: models, jobs, files and the wallet. This page explains how they connect. Each one has its own page with the details.
Models
A model is something you can run, like google/nano-banana-2 or bytedance/seedance-2.0. GET /v1/models lists them with a type (image or video) and a starting price. Each model has an input schema that says which fields it accepts. See Models.
Jobs
Running a model creates a job. Generation takes from a few seconds to several minutes, so the API doesn't hold the connection open. POST /v1/jobs answers 202 Accepted right away with the job, and you poll GET /v1/jobs/{id} until its status is succeeded, failed or canceled.
queued ──▶ running ──▶ succeeded or failed
queued ──▶ succeeded or failed (a fast job can finish between polls)
queued ──▶ canceled (canceled while still in your account queue)
queued ──▶ failed (queue_expired)
queued ──▶ failed (internal_error, if the provider never confirms it)
running ──▶ queued (recovery, after an interruption)
queued or running ──▶ cancel_requested ──▶ canceled, succeeded or failedSee Jobs and polling.
The wallet
Jobs are paid from a USD API wallet that you top up in the console. It is separate from Astorie app credits and subscriptions. When a job is accepted, its price is set aside from your available balance. If the job succeeds you are charged. If it fails you get the money back. You never pay for a failed generation. See Wallet and billing.
Spending limits
Every job needs a ceiling: max_charge_amount, the most that job may cost. If the model's price for your input is higher, the job is refused before anything is charged. This keeps a bad input or a price change from costing more than you expected. To see the exact price first, ask for a quote.
Files
Models that take an image, video or audio input accept either a public https URL or a file you uploaded with POST /v1/files. Results come back as URLs in the job's output. See Input files and Results.
Conventions
- JSON fields are
snake_case. IDs are opaque strings with a prefix, likejob_orfile_. - Money is a string with exactly six decimals, like
"0.080000". Never a float. - Times are UTC in RFC 3339, like
2026-11-24T18:02:11.318Z. - Every response has an
X-Request-Idheader. Include it when you contact support. - New fields and enum values can appear at any time. Ignore what you don't recognize.