RECIPE: Generate an Image with AI

Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
Copy

For an image the user does not have. An image they supplied — an attachment or a public URL — is uploaded instead: Upload Media to Wix.

API reference: About the Wix AI APIs, Generating images — endpoint, auth, and the full model table. Developer Preview, so confirm the contract there.


AI credits

Each call spends roughly one AI credit, billed to the site owner, or to the Wix user who installed the calling app. numberResults: n spends n. Importing is free.

Generate one image per entity that needs one, and say how many a run will generate before starting it. Regenerate only when the user asks.


Step 1: Generate

Copy
ParameterValue
taskUUIDA real UUIDv4. Anything else returns 400 invalidTaskUUID
width / height1024×1024 (square — products, services, menu items), 1376×768 (16
hero), 1200×896 (4
editorial). Free-form sizes return 400
modelSee below
numberResults1

Omit steps and CFGScale: Runware accepts them, other models return 400 unsupportedParameter.

Models

modelLatencyContent filter
runware:400@1~5sLoosest — the default
google:4@2~25sMedium, best fidelity
bfl:5@1Strictest; refuses trademark-ish prompts

Any Runware-supported model works — the reference's Suggested models table has the current AIR IDs.

Read the response

Copy

A refusal is a success response with no imageURL — test for the field, not the status. On a refusal, reword the prompt or switch model, and report the image as not created.


Step 2: Import

imageURL expires, so import it as it lands. Upload Media to Wix owns that endpoint and its PENDING / READY rules; pass the imageURL as url and image/png as mimeType.

The result is the returned file.id / file.url — permanent, and what an entity field takes.


Batches

runware:400@1 and bfl:5@1 take several tasks in one body. google:4@2 returns 504 at three or more, so fire parallel single-task requests for it.

Failure is per image: attach the ones that succeeded, create the rest of the entities text-only, and name which entities have no image and why. A failed image stays missing rather than being swapped for another.


For JavaScript callers there is an SDK path — generateImage() from the Vercel AI SDK with runware.image(...) from @wix/ai: Set up the Wix AI SDK.

Last updated: 3 September 2026

Did this help?