Skip to main content
POST
Generate images

Authorizations

Authorization
string
header
required

User-bound credential carrying an identity: either a session JWT or a user access token (at:*) generated from the user settings UI. Send as Authorization: Bearer <token>. Org API keys (iak_*) are not accepted here - they carry no user identity. Use the x-prismeai-api-key header instead (see OrgApiKeyAuth).

Body

application/json
model
string

Image model id. Defaults to the org governance default, then the platform default.

Maximum string length: 256
prompt
string

Text description of the image to generate.

size
string

Explicit WxH pixel size. Kept as is when the model supports it, otherwise snapped (see aspect / tier).

Example:

"1024x1024"

aspect
enum<string>

Prisme.ai extension. Abstract orientation, snapped to a size the model supports.

Available options:
square,
portrait,
landscape
tier
enum<string>

Prisme.ai extension. Size tier within the orientation (default medium).

Available options:
small,
medium,
large
style
string

Provider style hint, forwarded to the provider when set.

n
number

Number of images to generate (default 1).

response_format
enum<string>

Format requested from the provider (default url). The response always carries URLs: base64 results are uploaded and replaced by a url.

Available options:
url,
b64_json
analytics_context
object

Prisme.ai extension. Caller-supplied analytics context (orgSlug, agent_id, user_id, context_id, agent_allowed_models).

Response

Generated images.

created
integer

Unix timestamp of the generation.

model
string

Model that produced the images (after governance resolution).

data
object[]
size
string

Prisme.ai extension. Size actually used after resolution.