Image → Generate
AI-generatedSummary
Generate images using a selected provider, model, message prompt, and optional settings.
Inputs
- provider (required) — Select an AI provider that supports image generation.
- model (required) — Select a model from the chosen provider that can generate images.
- messages (required) — Provide an array of message objects (role and content) that form the prompt.
- options — Configure generation parameters such as temperature, max tokens, and enable built‑in tools.
- builtInTools — Enable or disable built‑in tools like web search, file search, or code interpreter.
Output shape
an array of objects representing the generated image response
Each array element contains a
jsonfield with the API response; errors are thrown unless continueOnFail is enabled.
Examples
Example 1: Create an image of a futuristic cityscape
provider: 'midjourney', model: 'midjourney-v5', messages: [{role:'user',content:'A futuristic cityscape at sunset'}], options: {temperature:0.7, maxTokens:1200}
Example 2: Generate an image with web search enabled
provider: 'gpt4-image', model: 'gpt4-image', messages: [{role:'user',content:'Current stock price of TSLA'}], options: {webSearch:true, temperature:0.5}