Skip to main content
POST
Generate with Studio defaults

Authorizations

Authorization
string
header
required

An organization API key (sk_studio_…) from Studio → API. Only the owner and admins create keys.

Headers

Idempotency-Key
string
required

Any unique string of 1–255 printable ASCII characters, with no spaces, such as a UUID. A retry with the same key and body returns the original generation and is never charged twice; the same key with a different body is refused.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]{1,255}$
Quote-Id
string<uuid>

Binds the price of a quote from POST /quotes.

Body

application/json
type
string
required
Allowed value: "image"
prompt
string
required
Required string length: 1 - 4000
Pattern: \S
aspect_ratio
enum<string>
default:1:1
Available options:
auto,
1:1,
4:3,
3:4,
3:2,
2:3,
16:9,
9:16,
21:9,
9:21
resolution
enum<string>
default:1K
Available options:
1K,
2K

Response

A retry with the same Idempotency-Key whose generation already finished.

id
string<uuid>
required
status
enum<string>
required
Available options:
queued,
running,
succeeded,
failed
outputs
object[]
required
billing
object
required

Held at the maximum before dispatch; on success, charged the provider's receipt (never above the maximum); on failure, released in full.

object
any
type
enum<string>
Available options:
image,
video
model
string
route
string
created_at
string<date-time>
finished_at
string<date-time> | null
error
object | null