Skip to main content
POST
Generate Image

Authorizations

Authorization
string
header
required

Enter your MeshAPI key (rsk_...) or, for the admin-keys endpoints, a dashboard session token — sent as Authorization: Bearer <token>.

Headers

X-Mesh-Version
enum<string>
default:2026-08

Dated version of the API contract to pin this request to. Omit it and the request is served under 2026-08 — the oldest supported version, so an existing integration is never moved by a release. A malformed or unsupported value is rejected with 400 invalid_api_version rather than falling back silently. The version actually served is echoed as X-Mesh-Version on every response, including errors.

Available options:
2026-08,
2026-09

Body

application/json
prompt
string
required
model
string | null
n
integer
default:1
Required range: 1 <= x <= 10
quality
string
default:auto
response_format
enum<string>
default:url
Available options:
url,
b64_json
size
string
default:auto
aspect_ratio
string | null
resolution
string | null
output_format
enum<string> | null
Available options:
png,
jpeg,
webp
output_compression
integer | null
Required range: 0 <= x <= 100
background
enum<string> | null
Available options:
transparent,
opaque,
auto
moderation
enum<string> | null
Available options:
low,
auto
partial_images
integer | null
Required range: 0 <= x <= 3
image
seed
integer | null
Required range: -1 <= x <= 2147483647
sequential_image_generation
enum<string> | null
Available options:
auto,
disabled
sequential_image_generation_options
Sequential Image Generation Options · object | null
guidance_scale
number | null
Required range: 1 <= x <= 10
watermark
boolean | null
optimize_prompt
boolean | null
optimize_prompt_options
Optimize Prompt Options · object | null
stream
boolean
default:false
tags
Tags · object | null

Your own labels for this request, echoed back on the usage row and available as a filter and a group-by dimension in the usage API. String keys to string values. Never put personal or sensitive data here — tags are stored with the usage record and are not redacted.

Example:
safety_identifier
string | null

A stable, anonymised identifier for the end user making this request, recorded on the usage row and available as a filter and a group-by dimension in the usage API. Supersedes the deprecated user field. Use an opaque id, not an email address or a name.

Maximum string length: 256

Response

Successful Response