Skip to main content
POST
Send a text prompt or image to generate a new image or video. See the Supported models page to find which models support these different modalities. This API is built on the Open Responses spec, a provider-agnostic API standard.

Authorizations

Authorization
string
header
required

Modular Cloud API key. Obtain from the API keys page.

Body

application/json
model
string
required

Model identifier. See the supported models page.

Example:

"black-forest-labs/FLUX.2-klein-4B"

input
required

Model input. Pass a plain string for text-to-image/video, or a structured content array for image-to-image/video.

seed
integer

Random seed for reproducible outputs.

provider_options
object

Response

200 - application/json

Response object containing generated content.

id
string
required

Unique identifier for the response.

object
enum<string>
required

The object type. Always response.

Available options:
response
created_at
integer
required

Unix timestamp (in seconds) of when the response was created.

status
enum<string>
required

The status of the response.

Available options:
completed,
failed
model
string
required

The model used to generate the response.

output
object[]
required

The messages generated by the model.

usage
object
required

Usage statistics for the response.