Install
openclaw skills install @yoimiya66/ernie-image-visual-promptsmithGenerate ERNIE-Image-Turbo images through Baidu AI Studio and craft ERNIE-Image prompts for posters, comics, infographics, ecommerce images, UI-style visuals, bilingual text rendering, structured layouts, negative prompts, generation settings, and use_pe decisions. Requires a user-provided AI Studio API key and is not an official Baidu skill.
openclaw skills install @yoimiya66/ernie-image-visual-promptsmithUse this community skill to craft ERNIE-Image prompts and generate images through the AI Studio ERNIE-Image-Turbo endpoint. It is not official Baidu or ERNIE-Image software.
https://aistudio.baidu.com/llm/lmapi/v3POST /images/generationshttps://aistudio.baidu.com/llm/lmapi/v3/images/generationsAuthorization: bearer <BAIDU_AISTUDIO_API_KEY>X-Client-Platform: aistudioBAIDU_AISTUDIO_API_KEYhttps://aistudio.baidu.com/account/accessTokenBAIDU_AISTUDIO_API_KEY.ERNIE image: <prompt>, Wenxin image: <prompt>, generate image: <prompt>, or equivalent Chinese wording for image generation.ernie image: <prompt>, generate image: <prompt>, create image: <prompt>.auto, text-poster, infographic, comic, product, ui, photo, concept, or abstract.Final Prompt: <prompt>
Preset: <preset>
use_pe: <true or false>
Size: <size>
Reason: <why these settings fit ERNIE-Image>
Use the bundled Python script. Prefer python3; on Windows use python or py if needed.
python3 {baseDir}/scripts/generate.py --prompt "<FINAL_PROMPT>" --preset <preset>
For exact text, bilingual labels, UI, flowcharts, signs, comics, or already detailed prompts, pass --no-use-pe.
python3 {baseDir}/scripts/generate.py --prompt "<FINAL_PROMPT>" --preset text-poster --no-use-pe
The script prints IMAGE_URL:<url> for URL responses and MEDIA:<absolute_path> for each saved image. Return the saved media path to the user.
If BAIDU_AISTUDIO_API_KEY is missing, tell the user to get a key from https://aistudio.baidu.com/account/accessToken and set BAIDU_AISTUDIO_API_KEY.
{
"model": "ERNIE-Image-Turbo",
"prompt": "<FINAL_PROMPT>",
"n": 1,
"response_format": "url",
"size": "1024x1024",
"seed": 42,
"use_pe": true,
"num_inference_steps": 8,
"guidance_scale": 1.0
}
response_format=url returns image URLs in data[]; the script prints IMAGE_URL:<url>.MEDIA:<absolute_path> for OpenClaw/ClawHub auto-attach.ernie-image-<timestamp>-<index>.<ext>.ERNIE-Image-Turboauto1url42text-poster, infographic, comic, product, and ui presets default to use_pe=false.photo, concept, and abstract presets default to use_pe=true.text, letters, typography, Chinese text, or English text when the user wants readable writing.--no-use-pe.references/api.md for parameters, command examples, and endpoint mapping.references/prompt-architecture.md for ERNIE-Image prompt templates.references/examples.md for acceptance-style examples.