AIML Generate images and videos
VerifiedGenerate images or videos via AIMLAPI from prompts. Use when Codex needs reliable AI/ML API media generation with retries, explicit User-Agent headers, and a...
$ Add to .claude/skills/ About This Skill
# 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
```bash 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`.
```bash 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:
- `POST /v2/video/generations` (create task)
- `GET /v2/video/generations?generation_id=...` (poll status)
- download `video.url` when status is completed
```bash 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
- `references/aimlapi-media.md`: endpoint notes, async polling statuses, and troubleshooting.
- `README.md`: changelog-style summary of new instructions.
Use Cases
- Generate images from text prompts using 50+ models via the AIMLAPI platform
- Create AI-generated videos from text descriptions for marketing or social content
- Produce multiple image variations using different models to compare output quality
- Integrate AI media generation into automated content pipelines via Python scripts
- Generate visual assets for prototypes, presentations, and design mockups
Pros & Cons
Pros
- +Access to 50+ image and video models through a single unified API
- +Built-in retry logic, verbose logging, and API key fallback for production reliability
- +Supports both image and video generation in one skill
Cons
- -Requires a paid AIMLAPI subscription with per-generation API costs
- -Python script-based interface is less user-friendly than GUI alternatives
- -Video generation is asynchronous with polling required — not instant results
FAQ
What does AIML Generate images and videos do?
What platforms support AIML Generate images and videos?
What are the use cases for AIML Generate images and videos?
100+ free AI tools
Writing, PDF, image, and developer tools — all in your browser.
Next Step
Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.