Skip to main content
POST
Generate images

Authorizations

Authorization
string
header
required

Nscale bearer token supplied in the Authorization header.

Headers

X-Organization-Id
string

Selects the caller's public-cloud organization. Required when the caller belongs to multiple public-cloud organizations and the URL does not select an organization; omission then returns 400. With one public-cloud organization, omission selects it automatically. An explicitly supplied value, including an empty value, that is not one of the caller's public-cloud organizations returns 403. On /organizations/{organization_id}/endpoints, the path organization_id takes precedence over this header.

Minimum string length: 1
X-Request-Id
string

Optional correlation identifier. Use the X-Request-Id returned in the response when contacting support. The response ID may differ from this value. Supplying this header does not make a request idempotent.

Body

application/json
model
string
required

Model ID from GET /v1/models. Capabilities depend on the selected model.

Minimum string length: 1
prompt
string
required
background
enum<string> | null
default:auto
Available options:
transparent,
opaque,
auto
complexity
enum<string> | null
Available options:
low,
medium,
high,
null
frame_count
integer | null
Required range: 2 <= x <= 16
frame_duration_ms
integer | null
Required range: x >= 20
moderation
enum<string> | null
default:auto
Available options:
low,
auto
n
integer | null
default:1
Required range: 1 <= x <= 10
output_compression
integer | null
default:100
output_format
enum<string> | null
default:png
Available options:
png,
webp,
jpeg,
gif,
svg
partial_images
integer | null
default:0
Required range: 0 <= x <= 3
quality
enum<string> | null
default:auto
Available options:
low,
medium,
high,
xhigh,
max,
auto,
standard,
hd
response_format
enum<string> | null
deprecated
Available options:
url,
b64_json,
null
safety_identifier
string | null
Maximum string length: 128
size
default:auto
stream
boolean | null
default:false
style
enum<string> | null
deprecated
Available options:
vivid,
natural,
null
svg
object | null
user
string
deprecated

Response

Successful response as JSON, or server-sent events when streaming is supported and requested.

created
integer<unixtime>
required
background
enum<string>
Available options:
transparent,
opaque
data
object[]
output_format
enum<string>
Available options:
png,
webp,
jpeg,
gif,
svg
quality
enum<string>
Available options:
low,
medium,
high,
xhigh,
max
safety_identifier
string | null
size
svg_usage
object
usage
Image generation usage · object