Media Generation Expert Knowledge
Tool Reference
image_generate
Generate images from text prompts via OpenAI or MiniMax.
Parameters:
| Parameter |
Type |
Required |
Default |
Description |
prompt |
string |
yes |
— |
Text description of the desired image |
provider |
string |
no |
auto |
openai or minimax |
model |
string |
no |
provider default |
gpt-image-1, dall-e-3, image-01 |
width |
int |
no |
1024 |
Image width in pixels |
height |
int |
no |
1024 |
Image height in pixels |
count |
int |
no |
1 |
Number of images (1-4) |
quality |
string |
no |
auto |
low, medium, high, auto |
seed |
int |
no |
random |
Reproducibility seed |
Provider-specific notes:
- OpenAI gpt-image-1: Best for photorealistic and creative images. Supports inpainting hints in prompt. Sizes: 1024x1024, 1792x1024, 1024x1792.
- OpenAI dall-e-3: Good quality, may revise your prompt (check
revised_prompt in response). Only generates 1 image per call.
- MiniMax image-01: Fast generation, good for illustrations and concept art. Supports arbitrary aspect ratios.
Result: Returns images array with url fields pointing to /api/uploads/{id}.
text_to_speech
Convert text to spoken audio.
Parameters:
| Parameter |
Type |
Required |
Default |
Description |
text |
string |
yes |
— |
Text to speak (max ~4096 chars per call) |
provider |
string |
no |
auto |
openai or minimax |
model |
string |
no |
provider default |
tts-1, tts-1-hd, speech-2.8-hd |
voice |
string |
no |
alloy |
Voice selection (see table below) |
speed |
float |
no |
1.0 |
Playback speed (0.25 - 4.0) |
format |
string |
no |
mp3 |
mp3, wav, flac, opus, aac |
OpenAI voices:
| Voice |
Character |
alloy |
Neutral, balanced |
echo |
Male, warm |
fable |
Storytelling, expressive |
nova |
Female, friendly |
onyx |
Deep male, authoritative |
shimmer |
Warm female, gentle |
MiniMax voices:
| Voice |
Character |
English_Graceful_Lady |
Female, elegant |
English_Calm_Man |
Male, composed |
English_Energetic_Girl |
Female, upbeat |
Tips:
- For long content, split at paragraph boundaries to keep natural pacing
tts-1-hd is higher quality but slower; use tts-1 for drafts
- Speed 0.8-0.9 works well for narration; 1.1-1.2 for summaries
Result: Returns url to the audio file, format, duration_ms, sample_rate.
video_generate
Submit an asynchronous video generation task. Video generation takes 1-3 minutes.
Parameters:
| Parameter |
Type |
Required |
Default |
Description |
prompt |
string |
yes |
— |
Scene description |
provider |
string |
no |
auto |
Currently only minimax |
model |
string |
no |
T2V-01 |
Video model |
duration_secs |
int |
no |
5 |
Video duration (5-10 seconds) |
resolution |
string |
no |
1080p |
720p, 1080p |
Prompt writing for video:
- Be specific about the scene, subject, and action
- Describe camera movement explicitly: "slow pan left", "zoom in", "static shot"
- Keep it focused — one scene per generation works best
- Include lighting and atmosphere: "golden hour lighting", "neon-lit street at night"
- Avoid complex multi-character interactions (current models handle single subjects best)
Good prompts:
- "A golden retriever running through a wheat field at sunset, slow motion, cinematic"
- "Close-up of coffee being poured into a ceramic cup, steam rising, warm morning light"
- "Aerial drone shot flying over a tropical coastline, turquoise water, white sand beach"
Bad prompts:
- "A video" (too vague)
- "Two people having a conversation at a cafe while a dog runs by and a car crashes outside" (too complex)
Result: Returns task_id and provider. You MUST poll with video_status.
video_status
Poll the status of a video generation task.
Parameters:
| Parameter |
Type |
Required |
Description |
task_id |
string |
yes |
From video_generate response |
provider |
string |
yes |
Must match the provider from video_generate |
Statuses:
| Status |
Meaning |
Action |
pending |
Queued, not started |
Wait 10-15s, poll again |
processing |
Actively generating |
Wait 15-20s, poll again |
completed |
Done |
Result includes file_url |
failed |
Generation failed |
Check error message, may retry with different prompt |
Polling pattern:
- Call video_generate → get task_id
- Wait 10 seconds
- Call video_status with task_id + provider
- If not completed, wait 15-20 seconds and poll again
- Maximum ~10 polls (about 3 minutes total)
- Always inform the user of current status
Result (completed): Returns file_url, width, height, duration_secs, provider, model.
music_generate
Generate music from a text prompt and/or lyrics.
Parameters:
| Parameter |
Type |
Required |
Default |
Description |
prompt |
string |
no* |
— |
Style/mood description |
lyrics |
string |
no* |
— |
Song lyrics with structure |
provider |
string |
no |
auto |
Currently only minimax |
model |
string |
no |
music-2.5 |
Music model |
instrumental |
bool |
no |
false |
Generate without vocals |
format |
string |
no |
mp3 |
mp3, wav, flac |
*At least one of prompt or lyrics is required.
Prompt writing for music:
For instrumentals, describe:
- Genre: electronic, jazz, classical, hip-hop, rock, ambient, lo-fi
- Tempo: slow (60-80 BPM), medium (100-120 BPM), fast (130-160 BPM)
- Mood: uplifting, melancholic, energetic, relaxing, dramatic, mysterious
- Instruments: piano, synth, acoustic guitar, strings, drums, bass
For songs with vocals, provide lyrics with structure markers:
[Verse 1]
Walking down the empty street
Moonlight dancing at my feet
[Chorus]
This is where the night begins
Let the music pull us in
[Verse 2]
...
Good prompts:
prompt: "Chill lo-fi hip-hop beat, vinyl crackle, mellow piano chords, 85 BPM, rainy day vibe"
prompt: "Epic orchestral trailer music, building tension, brass and strings, 140 BPM"
prompt + lyrics: "Indie folk acoustic ballad, fingerpicking guitar, gentle male vocals" with lyrics
Result: Returns url to audio file, format, duration_ms, sample_rate.
Combined Workflow Recipes
Podcast Intro
music_generate — instrumental jingle, 10-15 seconds, upbeat
text_to_speech — "Welcome to [show name]..." with energetic voice
- Report both URLs to user
Social Media Post
image_generate — eye-catching visual for the post
- Suggest caption text based on the image
- Optionally
text_to_speech for accessibility audio version
Video with Narration
text_to_speech — generate narration audio
video_generate — generate matching video clip
video_status — poll until complete
- Report both URLs (user can combine with ffmpeg or editing tools)
Album Art + Preview
image_generate — album cover artwork
music_generate — short preview track matching the artwork mood
- Present together
Audiobook Chapter
- Split text into sections (~500 words each)
text_to_speech for each section with consistent voice
- Report all audio URLs in order
Error Handling
| Error |
Cause |
Fix |
missing_key |
API key not configured |
Ask user to set OPENAI_API_KEY or MINIMAX_API_KEY |
not_supported |
Provider doesn't support this modality |
Switch to a provider that does |
content_filtered |
Safety filter rejected the prompt |
Rephrase without prohibited content |
rate_limited |
Too many requests |
Wait 30-60 seconds and retry |
invalid_request |
Bad parameters |
Check parameter ranges (e.g., count 1-4, speed 0.25-4.0) |
Provider Capability Matrix
| Capability |
OpenAI |
MiniMax |
| Image generation |
gpt-image-1, dall-e-3 |
image-01 |
| Text-to-speech |
tts-1, tts-1-hd |
speech-2.8-hd |
| Video generation |
— |
T2V-01, video-01 |
| Music generation |
— |
music-2.5 |
Auto-detection priority: OpenAI > MiniMax (for capabilities both support).
If only MiniMax key is set, all 4 modalities are available through MiniMax.
1---2name: media-generation-skill3description: Expert knowledge for AI media generation — image prompting, video workflows, music composition, and TTS best practices4---56# Media Generation Expert Knowledge78## Tool Reference910### image_generate1112Generate images from text prompts via OpenAI or MiniMax.1314**Parameters:**1516| Parameter | Type | Required | Default | Description |17|-----------|------|----------|---------|-------------|18| `prompt` | string | yes | — | Text description of the desired image |19| `provider` | string | no | auto | `openai` or `minimax` |20| `model` | string | no | provider default | `gpt-image-1`, `dall-e-3`, `image-01` |21| `width` | int | no | 1024 | Image width in pixels |22| `height` | int | no | 1024 | Image height in pixels |23| `count` | int | no | 1 | Number of images (1-4) |24| `quality` | string | no | `auto` | `low`, `medium`, `high`, `auto` |25| `seed` | int | no | random | Reproducibility seed |2627**Provider-specific notes:**2829- **OpenAI gpt-image-1**: Best for photorealistic and creative images. Supports inpainting hints in prompt. Sizes: 1024x1024, 1792x1024, 1024x1792.30- **OpenAI dall-e-3**: Good quality, may revise your prompt (check `revised_prompt` in response). Only generates 1 image per call.31- **MiniMax image-01**: Fast generation, good for illustrations and concept art. Supports arbitrary aspect ratios.3233**Result:** Returns `images` array with `url` fields pointing to `/api/uploads/{id}`.3435---3637### text_to_speech3839Convert text to spoken audio.4041**Parameters:**4243| Parameter | Type | Required | Default | Description |44|-----------|------|----------|---------|-------------|45| `text` | string | yes | — | Text to speak (max ~4096 chars per call) |46| `provider` | string | no | auto | `openai` or `minimax` |47| `model` | string | no | provider default | `tts-1`, `tts-1-hd`, `speech-2.8-hd` |48| `voice` | string | no | `alloy` | Voice selection (see table below) |49| `speed` | float | no | 1.0 | Playback speed (0.25 - 4.0) |50| `format` | string | no | `mp3` | `mp3`, `wav`, `flac`, `opus`, `aac` |5152**OpenAI voices:**5354| Voice | Character |55|-------|-----------|56| `alloy` | Neutral, balanced |57| `echo` | Male, warm |58| `fable` | Storytelling, expressive |59| `nova` | Female, friendly |60| `onyx` | Deep male, authoritative |61| `shimmer` | Warm female, gentle |6263**MiniMax voices:**6465| Voice | Character |66|-------|-----------|67| `English_Graceful_Lady` | Female, elegant |68| `English_Calm_Man` | Male, composed |69| `English_Energetic_Girl` | Female, upbeat |7071**Tips:**72- For long content, split at paragraph boundaries to keep natural pacing73- `tts-1-hd` is higher quality but slower; use `tts-1` for drafts74- Speed 0.8-0.9 works well for narration; 1.1-1.2 for summaries7576**Result:** Returns `url` to the audio file, `format`, `duration_ms`, `sample_rate`.7778---7980### video_generate8182Submit an asynchronous video generation task. Video generation takes 1-3 minutes.8384**Parameters:**8586| Parameter | Type | Required | Default | Description |87|-----------|------|----------|---------|-------------|88| `prompt` | string | yes | — | Scene description |89| `provider` | string | no | auto | Currently only `minimax` |90| `model` | string | no | `T2V-01` | Video model |91| `duration_secs` | int | no | 5 | Video duration (5-10 seconds) |92| `resolution` | string | no | `1080p` | `720p`, `1080p` |9394**Prompt writing for video:**95- Be specific about the scene, subject, and action96- Describe camera movement explicitly: "slow pan left", "zoom in", "static shot"97- Keep it focused — one scene per generation works best98- Include lighting and atmosphere: "golden hour lighting", "neon-lit street at night"99- Avoid complex multi-character interactions (current models handle single subjects best)100101**Good prompts:**102- "A golden retriever running through a wheat field at sunset, slow motion, cinematic"103- "Close-up of coffee being poured into a ceramic cup, steam rising, warm morning light"104- "Aerial drone shot flying over a tropical coastline, turquoise water, white sand beach"105106**Bad prompts:**107- "A video" (too vague)108- "Two people having a conversation at a cafe while a dog runs by and a car crashes outside" (too complex)109110**Result:** Returns `task_id` and `provider`. You MUST poll with `video_status`.111112---113114### video_status115116Poll the status of a video generation task.117118**Parameters:**119120| Parameter | Type | Required | Description |121|-----------|------|----------|-------------|122| `task_id` | string | yes | From video_generate response |123| `provider` | string | yes | Must match the provider from video_generate |124125**Statuses:**126127| Status | Meaning | Action |128|--------|---------|--------|129| `pending` | Queued, not started | Wait 10-15s, poll again |130| `processing` | Actively generating | Wait 15-20s, poll again |131| `completed` | Done | Result includes `file_url` |132| `failed` | Generation failed | Check error message, may retry with different prompt |133134**Polling pattern:**1351. Call video_generate → get task_id1362. Wait 10 seconds1373. Call video_status with task_id + provider1384. If not completed, wait 15-20 seconds and poll again1395. Maximum ~10 polls (about 3 minutes total)1406. Always inform the user of current status141142**Result (completed):** Returns `file_url`, `width`, `height`, `duration_secs`, `provider`, `model`.143144---145146### music_generate147148Generate music from a text prompt and/or lyrics.149150**Parameters:**151152| Parameter | Type | Required | Default | Description |153|-----------|------|----------|---------|-------------|154| `prompt` | string | no* | — | Style/mood description |155| `lyrics` | string | no* | — | Song lyrics with structure |156| `provider` | string | no | auto | Currently only `minimax` |157| `model` | string | no | `music-2.5` | Music model |158| `instrumental` | bool | no | false | Generate without vocals |159| `format` | string | no | `mp3` | `mp3`, `wav`, `flac` |160161*At least one of `prompt` or `lyrics` is required.162163**Prompt writing for music:**164165For instrumentals, describe:166- Genre: electronic, jazz, classical, hip-hop, rock, ambient, lo-fi167- Tempo: slow (60-80 BPM), medium (100-120 BPM), fast (130-160 BPM)168- Mood: uplifting, melancholic, energetic, relaxing, dramatic, mysterious169- Instruments: piano, synth, acoustic guitar, strings, drums, bass170171For songs with vocals, provide lyrics with structure markers:172173```174[Verse 1]175Walking down the empty street176Moonlight dancing at my feet177178[Chorus]179This is where the night begins180Let the music pull us in181182[Verse 2]183...184```185186**Good prompts:**187- `prompt`: "Chill lo-fi hip-hop beat, vinyl crackle, mellow piano chords, 85 BPM, rainy day vibe"188- `prompt`: "Epic orchestral trailer music, building tension, brass and strings, 140 BPM"189- `prompt` + `lyrics`: "Indie folk acoustic ballad, fingerpicking guitar, gentle male vocals" with lyrics190191**Result:** Returns `url` to audio file, `format`, `duration_ms`, `sample_rate`.192193---194195## Combined Workflow Recipes196197### Podcast Intro1981. `music_generate` — instrumental jingle, 10-15 seconds, upbeat1992. `text_to_speech` — "Welcome to [show name]..." with energetic voice2003. Report both URLs to user201202### Social Media Post2031. `image_generate` — eye-catching visual for the post2042. Suggest caption text based on the image2053. Optionally `text_to_speech` for accessibility audio version206207### Video with Narration2081. `text_to_speech` — generate narration audio2092. `video_generate` — generate matching video clip2103. `video_status` — poll until complete2114. Report both URLs (user can combine with ffmpeg or editing tools)212213### Album Art + Preview2141. `image_generate` — album cover artwork2152. `music_generate` — short preview track matching the artwork mood2163. Present together217218### Audiobook Chapter2191. Split text into sections (~500 words each)2202. `text_to_speech` for each section with consistent voice2213. Report all audio URLs in order222223---224225## Error Handling226227| Error | Cause | Fix |228|-------|-------|-----|229| `missing_key` | API key not configured | Ask user to set OPENAI_API_KEY or MINIMAX_API_KEY |230| `not_supported` | Provider doesn't support this modality | Switch to a provider that does |231| `content_filtered` | Safety filter rejected the prompt | Rephrase without prohibited content |232| `rate_limited` | Too many requests | Wait 30-60 seconds and retry |233| `invalid_request` | Bad parameters | Check parameter ranges (e.g., count 1-4, speed 0.25-4.0) |234235---236237## Provider Capability Matrix238239| Capability | OpenAI | MiniMax |240|------------|--------|---------|241| Image generation | gpt-image-1, dall-e-3 | image-01 |242| Text-to-speech | tts-1, tts-1-hd | speech-2.8-hd |243| Video generation | — | T2V-01, video-01 |244| Music generation | — | music-2.5 |245246**Auto-detection priority:** OpenAI > MiniMax (for capabilities both support).247If only MiniMax key is set, all 4 modalities are available through MiniMax.