media

Generate image(s) with an explicitly selected registry model (metered).

post/media/generate-image

Request

  • Base URL
    https://api.moda.app/v1
  • URL
    https://api.moda.app/v1/media/generate-image
  • Auth
    HTTP bearer

Headers

Moda-Version'2026-04-12' | '2026-05-01'
Example:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Request body

promptstring required

Sent to the selected model VERBATIM.

modelstring required

Concrete registry model id (no 'auto'); see GET /v1/media/models.

aspect_ratiostring nullable
num_imagesinteger
resolutionstring nullable
widthinteger nullable
heightinteger nullable
source_imagesstring[] nullable

Images the prompt modifies/preserves: file_ ids or http(s) URLs.

reference_imagesstring[] nullable

Style/subject/composition references: file_ ids or http(s) URLs.

model_paramsobject nullable
idempotency_keystring nullable

A retried call with the same key replays the stored response (replayed:true) instead of paying for a second provider render.

Response

Successful Response

object required

Changes