Workflow steps

media.generate

type: "media.generate"

Generates an image, a video, a voice or a music clip. The settings are checked against the real price grid when you save.

kind and prompt requiredvalidated on savethe expensive step
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

kindstringrequired

image · video · voice · music.

promptstringrequired

What to create. For a voice, the exact words.

modelstring

Which model. A sensible default per kind.

settingsobject

Resolution, duration, audio, voice, tempo…

imagestring

A starting picture. Only for video and image.

storage · pathstring

Save it rather than returning it.

The settings are checked against the grid

A setting a model cannot honour is refused on save

Audio on a model with no sound, or a resolution it does not produce, would otherwise fall back to the most expensive row of that model — generating one format while billing another. It is refused where you are still reading the message.

image on a voice or a music step is refused too: it would be accepted and then ignored, which is worse than failing — you would believe the picture counted.

{ id: "cover", type: "media.generate", config: {
    kind: "image", prompt: "A quiet harbour at dawn, flat illustration",
    settings: { resolution: "2K" },
    storage: "…", path: "covers/{{input.week}}.png" } }
{"id": "cover", "type": "media.generate", "config": {
    "kind": "image", "prompt": "A quiet harbour at dawn, flat illustration",
    "settings": {"resolution": "2K"},
    "storage": "…", "path": "covers/{{input.week}}.png"}}

Output

{{steps.cover.output.kind}}
{{steps.cover.output.mime}}
{{steps.cover.output.path}}       // when it was saved
{{steps.cover.output.content}}    // when it was not
"{{steps.cover.output.kind}}"
"{{steps.cover.output.mime}}"
"{{steps.cover.output.path}}"       # when it was saved
"{{steps.cover.output.content}}"    # when it was not

It is the expensive step

A video is priced per second and can run to hundreds of credits. On a scheduled trigger, that is paid every firing with nobody deciding each time.