Skip to main content
POST
Generate images

Authorizations

Authorization
string
header
required

An API key from the Morse app. It starts with sk_morse_.

Body

application/json

Morse refuses any field not listed here, such as size, style, or user, with invalid_parameter.

model
string
required

An image model's id from GET /v1/models.

prompt
string
required
Minimum string length: 1
n
integer
default:1
Required range: 1 <= x <= 4
aspect_ratio
enum<string>

Defaults to 1:1. With reference images, it defaults to the ratio nearest the first reference image's.

Available options:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3
resolution
enum<string>
default:1k

Some models take 1k only.

Available options:
1k,
2k
quality
string

Applies only to models with a quality setting. Values include low, medium, and high.

response_format
any

Images always come back inline.

images
string[]

Reference images, as base64 data URLs of PNG, JPEG, or WebP images. Each model sets its own maximum, and some models take none. Each reference image adds to the price of every image.

Response

The images.

created
integer
required

Unix seconds.

data
object[]
required

The images. If the provider returned fewer than n, data holds fewer, and you pay only for the images delivered.