Skills aimlapi-media-gen
Generate images or videos via AIMLAPI from prompts. Use when Codex needs reliable AI/ML API media generation with retries, explicit User-Agent headers, and async video polling.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/aimlapihello/aiml-image-video" ~/.claude/skills/clawdbot-skills-aimlapi-media-gen && rm -rf "$T"
manifest:
skills/aimlapihello/aiml-image-video/SKILL.mdsource content
AIMLAPI Media Generation
Overview
Generate images and videos via AIMLAPI with scripts that include retries, API key file fallback, verbose logs, and required
User-Agent headers on every request.
Quick start
export AIMLAPI_API_KEY="sk-aimlapi-..." python3 {baseDir}/scripts/gen_image.py --prompt "ultra-detailed studio photo of a lobster astronaut" python3 {baseDir}/scripts/gen_video.py --prompt "slow drone shot of a foggy forest"
Tasks
Generate images
Use
scripts/gen_image.py with /v1/images/generations.
python3 {baseDir}/scripts/gen_image.py \ --prompt "cozy cabin in a snowy forest" \ --model aimlapi/openai/gpt-image-1 \ --size 1024x1024 \ --count 2 \ --retry-max 4 \ --user-agent "openclaw-custom/1.0" \ --out-dir ./out/images
Generate videos (async AIMLAPI flow)
Use
scripts/gen_video.py with the real async flow:
(create task)POST /v2/video/generations
(poll status)GET /v2/video/generations?generation_id=...- download
when status is completedvideo.url
python3 {baseDir}/scripts/gen_video.py \ --model google/veo-3.1-t2v-fast \ --prompt "time-lapse of clouds over a mountain range" \ --poll-interval 10 \ --max-wait 1000 \ --user-agent "openclaw-custom/1.0" \ --out-dir ./out/videos
References
: endpoint notes, async polling statuses, and troubleshooting.references/aimlapi-media.md
: changelog-style summary of new instructions.README.md