Install
openclaw skills install weryai-image-generatorGenerate WeryAI images from text prompts or reference images through the WeryAI image APIs. Use when the user needs text-to-image, image-to-image, async image task submission with bounded polling to final output, status checks, image from prompt, restyle this image, reference-image generation, model switching, dry-run payload previews, or one-shot wait only when explicitly requested.
openclaw skills install weryai-image-generatorGenerate WeryAI images with the official base skill for text-to-image and image-to-image workflows. In agent environments, default to an image-first flow: submit the task, then poll status until final images are ready or the maximum timeout of 5 minutes (300 seconds) is reached. Do not run unbounded polling loops. Treat taskId or batchId as tracking data, not the endpoint, and only surface them as the primary output when the user explicitly wants IDs first or timeout is reached before completion. Use wait-image.js only when the user explicitly asks for one-shot submit-and-wait behavior.
Generate this image and keep checking until you can show me the final image, or stop when the 5-minute timeout is reached.Turn this reference image into a cinematic poster, and check the result only if I ask for status.Restyle this image with WeryAI image-to-image and show me the final image when it is ready.Check which WeryAI image models support 9:16 and 4 output images before generating.Check my WeryAI image generation task status and tell me whether the images are ready yet.text-to-image, image-to-image, image from prompt, restyle this image, task status, final image deliveryWERYAI_IMAGE_2_0)image_number=1, aspect_ratio=9:16Before the first real generation run:
https://www.weryai.com/api/keys.WERYAI_API_KEY.WERYAI_API_KEY in metadata.openclaw.requires.env and primaryEnv.WERYAI_API_KEY.export WERYAI_API_KEY="your_api_key_here"
Use one safe check before the first paid run:
node scripts/models-image.js --mode text_to_image
node scripts/wait-image.js --json '{"prompt":"A glowing paper lantern in mist","aspect_ratio":"9:16"}' --dry-run
models-image.js confirms that the key is configured and the models endpoint is reachable.--dry-run confirms the request shape locally without spending credits.wait or submit-* commands still require available WeryAI balance.WERYAI_API_KEY must be set before paid runs.>=18 is required because the runtime uses built-in fetch.http/https URLs or local/file sources. Local/non-http(s) sources are uploaded first via /v1/generation/upload-file.submit and wait runs consume WeryAI credits.WERYAI_API_KEY secret and never write it into the repository.WERYAI_BASE_URL and WERYAI_MODELS_BASE_URL default to https://api.weryai.com and https://api-growth-agent.weryai.com. Only override them with trusted hosts.scripts/ before production use if you need higher assurance.models first, then submit.Unless the user explicitly changes them, prefer:
model: WERYAI_IMAGE_2_0 (WERYAI_IMAGE_2_0)image_number: 1aspect_ratio: 9:16Always allow the user to override model, image_number, aspect_ratio, and resolution. When the user asks for unsupported settings, run models-image.js and keep only values supported by the chosen model.
Guide the user progressively instead of explaining every parameter up front.
WERYAI_IMAGE_2_0) configuration.Use short operator-style guidance like this:
I can start with the default setup: WeryAI Image 2.0, 1 image, 9:16. If you want, I can also switch the model or adjust the image count, aspect ratio, or resolution before submission.If you want another model, tell me whether you care more about realism, stylization, reference-image fidelity, higher resolution, or output count, and I will check the supported models first.I can map your request into image settings. For example: vertical cover -> 9:16, square post -> 1:1, more options -> image_number 4, clearer output -> the highest supported resolution for that model.Before I submit a paid task, I will show the final model, parameters, and prompt so you can confirm them.Ask only for the smallest missing detail needed to submit safely.
aspect_ratio when the user implies platform intent such as poster, cover image, wallpaper, square post, or vertical social card.image_number when the user wants multiple options or variations.resolution only when the user explicitly asks for higher quality or the target model supports multiple resolution tiers.Use these common mappings:
vertical, poster, cover image, mobile cover, social card -> aspect_ratio: 9:16square, avatar, icon, social post -> aspect_ratio: 1:1landscape, wide banner, wallpaper, hero image -> choose a supported wide aspect ratio such as 16:9give me a few options, multiple versions, more variations -> increase image_numbermake it clearer, higher quality, higher resolution -> use the highest supported resolution for the chosen modeluse another model, check supported models, switch model -> run models-image.js before submissionWhen the user asks to change the model or requests parameters that may be unsupported:
text_to_image or image_to_image.models-image.js command first.image_number, aspect_ratio, and resolution.--dry-run or a safe model query before the paid call.Before a paid run, show a concise confirmation block with the final payload choices.
Ready to generate
- mode: `image-to-image`
- model: `WERYAI_IMAGE_2_0`
- image_number: `1`
- aspect_ratio: `9:16`
- resolution: `default`
- image: `https://example.com/input.png`
- prompt: `Restyle this portrait into a cinematic editorial image, preserve facial identity, refined lighting, clean composition, premium color grading, polished final output.`
Wait for confirmation or requested edits before running a paid submission.
Use image-first submit plus bounded status polling as the default path in agent environments.
prompt, route to text-to-image.image or images, route to image-to-image.taskId or batchId, use status-image.js instead of creating a new task.models-image.js before any paid submission.submit-*, run status-image.js polling by default until final images are ready or the 5-minute timeout is reached.wait-image.js only when the user explicitly asks for a blocking one-shot result.# Default async submit
node scripts/submit-text-image.js --json '{"prompt":"A refined editorial portrait"}'
# Poll an existing task
node scripts/status-image.js --task-id <task-id>
prompt and, if needed, one or more public https reference image URLs.WERYAI_IMAGE_2_0), image_number=1, aspect_ratio=9:16, unless the user asks otherwise.models-image.js first when support is uncertain.--dry-run when you need to preview the final payload before a paid submission.submit-*.status-image.js polling until images are ready or the 5-minute timeout is reached.taskId/batchId with a timeout note and a follow-up status command.status-image.js to re-check an existing task or batch safely.prompt is required for both text-to-image and image-to-image requests.image or images is accepted; both are normalized to the API images array.http/https URL or local/file source (local/file sources are uploaded first).aspect_ratio, image_number, and resolution.All commands print JSON to stdout. Successful result objects can include:
taskId, taskIds, batchIdtaskStatusimagesbalanceerrorCode, errorMessageUser-facing delivery requirement:
[Image](https://...)) or inline image rendering when supported. If multiple images are generated, render all of them using markdown image syntax consecutively.model, aspect_ratio, image_number, and resolution.taskId / batchId as the sole deliverable unless the user explicitly requested IDs first.taskId to the user and ask if they want you to check the status again. Do NOT show the raw node status command to the user; use it internally.See references/error-codes.md for common failure classes and recovery hints.
The task is done when:
wait-image.js reaches a terminal result with at least one image URL,status-image.js polling reaches timeout and returns a clear in-progress status with task tracking data,submit or wait casually because each run can create a new paid task.wait-image.js in agent environments for generation tasks that may block the session.submit-text-image.js and submit-image-to-image.js are not idempotent; re-running them can create new paid tasks.wait-image.js is not idempotent for the same reason: it submits first, then polls until a terminal result or timeout.status-image.js, models-image.js, and balance-image.js are safe to re-run.