generate
Creates an image or video from a text prompt and model ID, waiting for the result and returning the output URL.
Instructions
Generate an image or video with a Magicly model. Creates a prediction and (by default) waits for the result, returning the output URL(s). Use list_models to discover model ids and their inputs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible output. | |
| size | No | Output size as 'WxH' (models that price/size by resolution). | |
| wait | No | Wait for the result (default true). If false, returns immediately with a prediction id to poll. | |
| image | No | Source image for img2img / edit models: a public https URL or a data:image/...;base64,... URI. | |
| model | Yes | Model id, e.g. 'neuro-art'. | |
| prompt | Yes | The text prompt. | |
| seconds | No | Video length in seconds (video models). | |
| aspect_ratio | No | e.g. '1:1', '16:9' (if the model supports it). |