Overview
Text/image-to-poster, multi-style, multi-size, supports poster editing, text modification, background replacement. Covers promotional posters, event promotional images, ad Banners, social media graphics, brand promotion images.
API Mapping
- Poster generation:
image_poster_generate - model value (first letter capitalized, different from the snake_case namespace of image-edit):
Praline_2(default) /GummyV4.5/PralineV2/Gummy/Nougat
Dependencies
- meitu-cli:
>=2.0.6 - credentials:CONFIG AKSK →
meitu tools update; EXEC AKSK → actual execution (see rootCONFIG.md) - environment variables:
MEITU_OPENAPI_TOOL_TASK_MODE=command
Path alias:
$VISUAL={OPENCLAW_HOME}/workspace/visual/
Core Workflow
Preflight → Execute → Deliver
Preflight
meitu --version≥ 2.0.6- Already ran with CONFIG AKSK
meitu tools update - Current AKSK = EXEC,
MEITU_OPENAPI_TOOL_TASK_MODE=command - output_dir:openclaw.yaml →
./output/|else →$VISUAL/output/image-poster-generate/;mkdir -p
Execute
Trigger signals / routing rules
Core dimensions:complete parameters + poster scenario match + model selection。
| Scenario | Determination keywords | Routing |
|---|---|---|
| Text-to-poster (no reference image) | poster, promotional image, Banner | image_poster_generate |
| Image-to-poster / poster editing (with image_list) | modify this poster, reference poster | image_poster_generate + image_list |
model selection (first letter capitalized, different from the snake_case namespace of image-edit): default Praline_2(general), realistic portrait → GummyV4.5, high creativity → PralineV2, general portrait → Gummy, special style → Nougat。
Parameter definitions
| Parameter | Type | Required | Range | Default | Description |
|---|---|---|---|---|---|
prompt |
STRING | Yes | -- | -- | Poster description. If missing → prompt "Please describe the poster content you want" |
model |
STRING | No | Gummy / Nougat / PralineV2 / GummyV4.5 / Praline_2 | Praline_2 | Model selection (note the first letter is capitalized, unlike image-edit) |
image_list |
ARRAY | No | -- | -- | Array of reference image URLs |
ratio |
STRING | No | auto / 1:1 / 1:3 / 3:1 / 2:1 / 1:2 / 3:2 / 2:3 / 4:3 / 3:4 / 4:5 / 5:4 / 9:16 / 16:9 / 10:16 / 16:10 / 21:9 | auto | Aspect ratio |
size |
STRING | No | auto / 1K / 2K / 4K / 512 | auto | Resolution |
output_format |
STRING | No | jpeg / png / webp | png | Output format |
enhance_prompt |
BOOLEAN | No | true / false | false | Whether to optimize prompt (recommended to enable when the description is <15 characters) |
enhance_template |
STRING | No | -- | -- | Optimization template (only effective when enhance_prompt=true) |
Tool invocation
meitu image-poster-generate --prompt "<desc>" [--model Praline_2] [--ratio 9:16] [--size auto] [--image_list <url>] --json --download-dir {output_dir} --skill_name skill_image-poster-generate
Error fallback
| Scenario | Handling method |
|---|---|
prompt missing |
Prompt "Please describe the poster content you want" |
model invalid |
Fall back to default Praline_2 |
ratio out of range |
Select the closest available value, or fall back to auto |
size out of range |
Fall back to auto |
image_list invalid image URL in |
Do not retry, prompt "Please provide a valid image link" |
image_poster_generate call failed |
Retry once; if still failing, return error |
| Timeout (1200s) | Retry once; if still timing out, return error |
| Content compliance interception | Return the compliance prompt directly, do not retry |
| User description < 15 characters | Recommended to enable enhance_prompt=true |
Deliver
- Use the output_dir parsed by Preflight
- From
downloaded_files[0].saved_pathread the downloaded file path mv {downloaded_files[0].saved_path} {output_dir}/{YYYY-MM-DD}_{descriptive}_image-poster-generate.{ext}
Output
- Format: PNG (default) / JPEG / WebP
- Location: project →
./output/, one-time →$VISUAL/output/image-poster-generate/
Baseline Task ID
See references/task-id-baseline.md for the corresponding line.