Skip to content
Back to skills

Aimlapi Media Gen

ASecurity

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.

  • 33 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agentspythongobashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill aimlapi-media-gen --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aimlapi Media Gen?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aimlapi Media Gen
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-aimlapi-media-gen/badge)](https://www.skillsdirectory.com/skills/dvcrn-aimlapi-media-gen)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aimlapi-media-gen
description: "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."
---

# 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:

1. `POST /v2/video/generations` (create task)
2. `GET /v2/video/generations?generation_id=...` (poll status)
3. 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.

Files in this skill

  • README.md870 B
  • SKILL.md1.7 KB
  • references/IMAGE-TO-IMAGE.md388 B
  • references/IMAGE-TO-VIDEO.md384 B
  • references/aimlapi-media.md962 B
  • scripts/gen_image.py4.9 KB
  • scripts/gen_video.py7.1 KB
  • skill.json171 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…