WeryAI Image Generator
Generate 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.
Example Prompts
- - INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6
- INLINECODE7
Quick Summary
- - Main jobs:
text-to-image, image-to-image, image from prompt, restyle this image, task status, final image delivery - Default model: WeryAI Image 2.0 (
WERYAI_IMAGE_2_0) - Default parameters:
image_number=1, INLINECODE15 - Main trust signals: dry-run support, model capability lookup, paid-run warning, media-source validation with auto upload for local references
Authentication and first-time setup
Before the first real generation run:
- 1. Create a WeryAI account.
- Open the API key page at
https://www.weryai.com/api/keys. - Create a new API key and copy the secret value.
- Add it to the required environment variable
WERYAI_API_KEY. - Make sure the WeryAI account has available balance or credits before paid generation.
OpenClaw-friendly setup
- - This skill already declares
WERYAI_API_KEY in metadata.openclaw.requires.env and primaryEnv. - After installation, if the installer or runtime asks for required environment variables, paste the key into
WERYAI_API_KEY. - If you are configuring the runtime manually, export it before running commands:
CODEBLOCK0
Quick verification
Use one safe check before the first paid run:
CODEBLOCK1
- -
models-image.js confirms that the key is configured and the models endpoint is reachable. - INLINECODE23 confirms the request shape locally without spending credits.
- Real
wait or submit-* commands still require available WeryAI balance.
Prerequisites
- -
WERYAI_API_KEY must be set before paid runs. - Node.js
>=18 is required because the runtime uses built-in fetch. - For image-to-image, reference images may be
http/https URLs or local/file sources. Local/non-http(s) sources are uploaded first via /v1/generation/upload-file. - Real
submit and wait runs consume WeryAI credits.
Security And API Hosts
- - Keep
WERYAI_API_KEY secret and never write it into the repository. - This skill supports directly passing local file paths. If a local file path is provided, the runtime will automatically upload the local file to the WeryAI server for processing.
- Optional overrides
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. - Review
scripts/ before production use if you need higher assurance.
Supported Intents
- - Text brief -> generate one or more images from scratch.
- One reference image -> restyle or transform that image.
- Existing task -> check image generation status instead of creating a new paid job.
- Parameter or model question -> inspect
models first, then submit.
Default Configuration
Unless the user explicitly changes them, prefer:
- -
model: WERYAI_IMAGE_2_0 (WERYAI_IMAGE_2_0) - INLINECODE43 : INLINECODE44
- INLINECODE45 : INLINECODE46
Always 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.
Model Switching And Parameter Guidance
Guide the user progressively instead of explaining every parameter up front.
- - If the user only wants an image, proceed with the default WeryAI Image 2.0 (
WERYAI_IMAGE_2_0) configuration. - If the user asks for a different model, better quality, more images, another aspect ratio, or a specific resolution, switch into parameter-confirmation mode.
- If the user already knows the exact parameter they want, apply it directly and only validate model support when needed.
- If the user sounds unsure, translate their creative request into the closest supported parameters rather than asking them to choose raw API fields.
Recommended guidance pattern
Use short operator-style guidance like this:
- - General help: When the user asks "how to use this skill", DO NOT paste raw shell commands. Instead, explain the capabilities in natural language and give 2-3 prompt examples.
- Default run:
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.
- - Safety before paid runs:
INLINECODE56
When to ask follow-up questions
Ask only for the smallest missing detail needed to submit safely.
- - Ask about
aspect_ratio when the user implies platform intent such as poster, cover image, wallpaper, square post, or vertical social card. - Ask about
image_number when the user wants multiple options or variations. - Ask about
resolution only when the user explicitly asks for higher quality or the target model supports multiple resolution tiers. - Ask about model choice only when the user explicitly wants a different model or when capability support is uncertain.
- Do not ask every parameter question if the default configuration already fits the request.
Map user language to parameters
Use these common mappings:
- -
vertical, poster, cover image, mobile cover, social card -> INLINECODE65 - INLINECODE66 ,
avatar, icon, social post -> INLINECODE70 - INLINECODE71 ,
wide banner, wallpaper, hero image -> choose a supported wide aspect ratio such as INLINECODE75 - INLINECODE76 ,
multiple versions, more variations -> increase INLINECODE79 - INLINECODE80 ,
higher quality, higher resolution -> use the highest supported resolution for the chosen model - INLINECODE84 ,
check supported models, switch model -> run models-image.js before submission
Model lookup workflow
When the user asks to change the model or requests parameters that may be unsupported:
- 1. Identify the intended mode:
text_to_image or image_to_image. - Run the matching
models-image.js command first. - Keep only supported values for
image_number, aspect_ratio, and resolution. - If multiple models fit, recommend one concise default instead of dumping raw metadata unless the user asked for a comparison.
- If support is unclear, say so explicitly and use
--dry-run or a safe model query before the paid call.
Confirmation block before submission
Before a paid run, show a concise confirmation block with the final payload choices.
CODEBLOCK2
Wait for confirmation or requested edits before running a paid submission.
Intent Routing
Use image-first submit plus bounded status polling as the default path in agent environments.
- - If the user provides only
prompt, route to text-to-image. - If the user provides
image or images, route to image-to-image. - If the user already has
taskId or batchId, use status-image.js instead of creating a new task. - If the user asks about supported models or parameters, run
models-image.js before any paid submission. - After
submit-*, run status-image.js polling by default until final images are ready or the 5-minute timeout is reached. - Use
wait-image.js only when the user explicitly asks for a blocking one-shot result. - Do not perform unbounded status polling; enforce the 5-minute timeout ceiling for default polling.
- If the task is still processing, keep the user informed, but do not treat the task ID as the final deliverable.
Preferred Commands
CODEBLOCK3
Workflow
- 1. Identify the user's intent: text-to-image, image-to-image, status lookup, or model lookup.
- Collect the
prompt and, if needed, one or more public https reference image URLs. - Apply defaults: WeryAI Image 2.0 (
WERYAI_IMAGE_2_0), image_number=1, aspect_ratio=9:16, unless the user asks otherwise. - If the user wants a custom model or non-default parameters, run
models-image.js first when support is uncertain. - Use
--dry-run when you need to preview the final payload before a paid submission. - Default to image-first execution:
- Stage 1:
submit-*.
- Stage 2: run
status-image.js polling until images are ready or the 5-minute timeout is reached.
- Stage 3: if timeout is reached, return
taskId/
batchId with a timeout note and a follow-up status command.
- 7. Do not treat status lookup as an unbounded loop; always enforce timeout ceilings.
- Use
status-image.js to re-check an existing task or batch safely.
Input Rules
- -
prompt is required for both text-to-image and image-to-image requests. - For image-to-image, either
image or images is accepted; both are normalized to the API images array. - Every reference image source can be
http/https URL or local/file source (local/file sources are uploaded first). - Prefer model-supported values for
aspect_ratio, image_number, and resolution. - Do not invent undocumented request fields.
Output
All commands print JSON to stdout. Successful result objects can include:
- -
taskId, taskIds, INLINECODE127 - INLINECODE128
- INLINECODE129
- INLINECODE130
- INLINECODE131 , INLINECODE132
User-facing delivery requirement:
- - If image URLs are available, return at least one user-visible image link (for example
[Image](https://...)) or inline image rendering when supported. If multiple images are generated, render all of them using markdown image syntax consecutively. - Alongside image output, include key generation parameters when available:
model, aspect_ratio, image_number, and resolution. - Do not use
taskId / batchId as the sole deliverable unless the user explicitly requested IDs first. - If timeout is reached before completion, return the
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.
Definition Of Done
The task is done when:
- - local validation passes without CLI-side errors,
- the user can see at least one generated image or a usable download URL,
- or
wait-image.js reaches a terminal result with at least one image URL, - or
status-image.js polling reaches timeout and returns a clear in-progress status with task tracking data, - and the output makes it explicit whether image URLs are present.
- When only task tracking data is available due to timeout, the reply must include the timeout reason and an explicit follow-up status command.
Constraints
- - Do not assume every image model supports every optional field.
- Do not use local file paths for reference images.
- Do not re-run
submit or wait casually because each run can create a new paid task. - Do not default to
wait-image.js in agent environments for generation tasks that may block the session. - Do not broaden this skill into general image editing outside the documented WeryAI API surface.
Re-run Behavior
- -
submit-text-image.js and submit-image-to-image.js are not idempotent; re-running them can create new paid tasks. - INLINECODE148 is not idempotent for the same reason: it submits first, then polls until a terminal result or timeout.
- INLINECODE149 ,
models-image.js, and balance-image.js are safe to re-run.
References
WeryAI 图像生成器
使用官方基础技能进行文本到图像和图像到图像工作流,生成WeryAI图像。在代理环境中,默认采用图像优先流程:提交任务,然后轮询状态,直到最终图像准备就绪或达到最长5分钟(300秒)超时。不要运行无限制的轮询循环。将taskId或batchId视为跟踪数据,而非端点,仅当用户明确要求优先获取ID或在完成前达到超时时,才将其作为主要输出。仅当用户明确要求一次性提交并等待行为时,才使用wait-image.js。
示例提示
- - 生成这张图片并持续检查,直到你能向我展示最终图片,或在达到5分钟超时时停止。
- 将这张参考图片转换为电影海报,仅在我询问状态时才检查结果。
- 使用WeryAI图像到图像功能重新设计这张图片,并在准备就绪时向我展示最终图片。
- 在生成前检查哪些WeryAI图像模型支持9:16和4张输出图片。
- 检查我的WeryAI图像生成任务状态,并告知我图片是否已准备就绪。
快速摘要
- - 主要任务:文本到图像、图像到图像、根据提示生成图像、重新设计此图像、任务状态、最终图像交付
- 默认模型:WeryAI Image 2.0(WERYAIIMAGE20)
- 默认参数:imagenumber=1、aspect_ratio=9:16
- 主要信任信号:支持试运行、模型能力查询、付费运行警告、媒体源验证及本地参考文件的自动上传
身份验证和首次设置
在首次实际生成运行前:
- 1. 创建WeryAI账户。
- 打开API密钥页面:https://www.weryai.com/api/keys。
- 创建新的API密钥并复制密钥值。
- 将其添加到所需的环境变量WERYAIAPIKEY中。
- 确保WeryAI账户在付费生成前有可用余额或积分。
OpenClaw友好设置
- - 此技能已在metadata.openclaw.requires.env和primaryEnv中声明了WERYAIAPIKEY。
- 安装后,如果安装程序或运行时要求提供必需的环境变量,请将密钥粘贴到WERYAIAPIKEY中。
- 如果您手动配置运行时,请在运行命令前导出它:
sh
export WERYAIAPIKEY=yourapikey_here
快速验证
在首次付费运行前使用一次安全检查:
sh
node scripts/models-image.js --mode texttoimage
node scripts/wait-image.js --json {prompt:A glowing paper lantern in mist,aspect_ratio:9:16} --dry-run
- - models-image.js确认密钥已配置且模型端点可访问。
- --dry-run在本地确认请求格式,不消耗积分。
- 实际的wait或submit-*命令仍需可用的WeryAI余额。
先决条件
- - 付费运行前必须设置WERYAIAPIKEY。
- 需要Node.js >=18,因为运行时使用内置的fetch。
- 对于图像到图像,参考图像可以是http/https URL或本地/文件源。本地/非http(s)源首先通过/v1/generation/upload-file上传。
- 实际的submit和wait运行会消耗WeryAI积分。
安全性和API主机
- - 保持WERYAIAPIKEY机密,切勿将其写入存储库。
- 此技能支持直接传递本地文件路径。如果提供了本地文件路径,运行时将自动将本地文件上传到WeryAI服务器进行处理。
- 可选的覆盖项WERYAIBASEURL和WERYAIMODELSBASE_URL默认为https://api.weryai.com和https://api-growth-agent.weryai.com。仅使用受信任的主机覆盖它们。
- 如果您需要更高的保证,请在投入生产前审查scripts/。
支持的意图
- - 文本简报 -> 从头开始生成一张或多张图像。
- 一张参考图像 -> 重新设计或转换该图像。
- 现有任务 -> 检查图像生成状态,而不是创建新的付费任务。
- 参数或模型问题 -> 先检查models,然后提交。
默认配置
除非用户明确更改,否则优先使用:
- - model:WERYAIIMAGE20(WERYAIIMAGE20)
- imagenumber:1
- aspectratio:9:16
始终允许用户覆盖model、imagenumber、aspectratio和resolution。当用户要求不支持的设置时,运行models-image.js并仅保留所选模型支持的值。
模型切换和参数指导
逐步引导用户,而不是预先解释每个参数。
- - 如果用户只想要一张图像,使用默认的WeryAI Image 2.0(WERYAIIMAGE2_0)配置继续。
- 如果用户要求不同的模型、更好的质量、更多的图像、其他宽高比或特定分辨率,切换到参数确认模式。
- 如果用户已经知道他们想要的确切参数,直接应用它,仅在需要时验证模型支持。
- 如果用户听起来不确定,将他们的创意请求转换为最接近的支持参数,而不是要求他们选择原始的API字段。
推荐的指导模式
使用如下简短的运算符式指导:
- - 一般帮助:当用户询问如何使用此技能时,不要粘贴原始的shell命令。相反,用自然语言解释功能,并提供2-3个提示示例。
- 默认运行:
我可以使用默认设置开始:WeryAI Image 2.0,1张图像,9:16。如果您愿意,我也可以在提交前切换模型或调整图像数量、宽高比或分辨率。
如果您想要其他模型,请告诉我您更关心真实感、风格化、参考图像保真度、更高分辨率还是输出数量,我会先检查支持的模型。
我可以将您的请求映射到图像设置。例如:垂直封面 -> 9:16,方形帖子 -> 1:1,更多选项 -> image_number 4,更清晰的输出 -> 该模型支持的最高分辨率。
在提交付费任务前,我将显示最终的模型、参数和提示,以便您确认。
何时提出后续问题
仅询问安全提交所需的最小缺失细节。
- - 当用户暗示平台意图(如海报、封面图像、壁纸、方形帖子或垂直社交卡片)时,询问aspectratio。
- 当用户想要多个选项或变体时,询问imagenumber。
- 仅当用户明确要求更高质量或目标模型支持多个分辨率层级时,询问resolution。
- 仅当用户明确想要不同的模型或能力支持不确定时,询问模型选择。
- 如果默认配置已符合请求,不要询问每个参数问题。
将用户语言映射到参数
使用这些常见映射:
- - 垂直、海报、封面图像、手机封面、社交卡片 -> aspectratio: 9:16
- 方形、头像、图标、社交帖子 -> aspectratio: 1:1
- 横向、宽横幅、壁纸、主图 -> 选择支持的宽宽高比,如16:9
- 给我几个选项、多个版本、更多变体 -> 增加image_number
- 让它更清晰、更高质量、更高分辨率 -> 使用所选模型支持的最高resolution
- 使用另一个模型、检查支持的模型、切换模型 -> 在提交前运行models-image.js
模型查询工作流
当用户要求更改模型或请求可能不支持的参数时:
- 1. 确定意图模式:texttoimage或imagetoimage。
- 首先运行匹配的models-image.js命令。
- 仅保留imagenumber、aspectratio和resolution的支持值。
- 如果多个模型适合,推荐一个简洁的默认值,而不是转储原始元数据,除非用户要求比较。
- 如果支持情况不明确,明确说明,并在付费调用前使用--dry-run或安全的模型查询。
提交前的确认块
在付费运行前,显示一个简洁的确认块,包含最终的有效负载选择。
md
准备生成
- - 模式:image-to-image
- 模型:WERYAIIMAGE2_0
- 图像数量:1
- 宽高比:9:16
- 分辨率:default
- 图像:https://example.com/input.png
- 提示:将此肖像重新设计为电影级编辑图像,保留面部特征