Skip to main content
POST
Generate Image

Authorizations

Authorization
string
header
required

Enter your MeshAPI key (rsk_...) — sent as Authorization: Bearer <key>.

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

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

Response

Successful Response