Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion SKILLS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

## Current active skills

As of 2026-07-13, the active skill directories are:
As of 2026-07-25, the active skill directories are:

- `SKILLS/df-meta-mcp/`
- `SKILLS/media-generation/`
- `SKILLS/new-api-manage/`
- `SKILLS/qwen3-asr-tts-hf2api/`
- `SKILLS/vits-tts-hf2api/`
Expand Down
4 changes: 4 additions & 0 deletions SKILLS/media-generation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
*.log
.env
.DS_Store
69 changes: 69 additions & 0 deletions SKILLS/media-generation/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
name: media-generation
description: Generate or edit images and generate videos through an OpenAI-compatible new-api endpoint. Use for gpt-image-2, gpt-5-image, nanobanana variants, Grok image, or Grok video; also use doctor to verify endpoint credentials and model routes.
homepage: https://github.com/QuantumNous/new-api
metadata: {"clawdbot":{"requires":{"bins":["node"]}}}
---

# Media Generation

Use the bundled CLI from this skill directory. It needs no runtime package installation.

```bash
./media-generation <doctor|models|image|video> [options]
```

Set the exact environment variables before network commands:

```bash
export OPENAI_COMPATIBLE_BASE_URL="https://new-api.example.com/v1"
export OPENAI_COMPATIBLE_API_KEY="..."
```

## Choose A Command

- `doctor`: authenticate `GET /v1/models` and compare provider routes with the registry.
- `models`: inspect aliases and capabilities locally; no credentials or network required.
- `image`: generate an image or edit one or more local images.
- `video`: submit a new-api video task, poll it, and stream the result to disk.

## Common Calls

```bash
./media-generation doctor
./media-generation models

./media-generation image \
--prompt "A quiet harbor at dawn" \
--model gpt-image-2 \
--aspectRatio 3:2 \
--outputDir ./media

./media-generation image \
--prompt "Replace the sky with morning light" \
--model gpt-5-image \
--inputImages ./base.png,./reference.png \
--maskImage ./mask.png \
--outputDir ./media

./media-generation video \
--prompt "A slow cinematic camera move" \
--model grok-imagine-video \
--inputImage ./frame.png \
--seconds 5 \
--size 1280x720 \
--path ./media/clip.mp4
```

Options accept both `--field value` and `--field=value`. Repeat `--inputImages` or use a
comma-separated value. There is no provider fallback and image retries are disabled.

Success is one JSON object on stdout. Failure is one JSON object on stderr with exit code 1.
Success payloads contain output metadata, never prompts or credentials.

## Detailed References

- [CLI_REFERENCE.md](references/CLI_REFERENCE.md): every argument, JSON envelopes, file behavior,
timeout and download limits.
- [MODEL_REGISTRY.md](references/MODEL_REGISTRY.md): alias routes and per-model capability rules.
- [PROTOCOLS.md](references/PROTOCOLS.md): doctor, AI SDK image, and new-api video HTTP flows.
59 changes: 59 additions & 0 deletions SKILLS/media-generation/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading