Design & media

AI Full media generation automation flow Skill

Generate and edit images, videos, and music through VAP Media API, then return the completed media URL.

What it does

Generate images, videos, and music or run inpaint, AI edit, upscale, background removal, video trim, and video merge operations through VAP Media API. The workflow refines prompts, selects the matching generation or operation endpoint, polls the task to completion, and returns the resulting media URL. Access requires a product-scoped VAP_API_KEY.

When to use it

  • Create portrait or widescreen social videos
  • Generate instrumental music in MP3 or WAV
  • Remove backgrounds or upscale images
  • Trim or merge existing video clips

The skill document

VAP Media API Skill

Generate images, video, and music through VAP Media API. Edit and enhance media with inpaint, AI edit, upscale, background removal, video trim, and video merge.

This skill is a Media API distribution surface for agent ecosystems such as ClawHub. Keep the agent workflow direct and useful: improve prompts, choose the matching VAP Media API endpoint, poll the task or operation, and return the final media URL.

Product Boundary

Use this skill for VAP Media API work only:

  • image generation
  • video generation
  • music generation
  • media editing and enhancement

Do not route coding-model requests through this skill. Coding agents and IDE model workflows use the separate VAP Coding Plan API with model ID vap-code.

Access

Use VAP_API_KEY as a Bearer token. This key is product-scoped to VAP Media API access.

If VAP_API_KEY is not set, ask the user to get a Media API key from Developer Hub: https://vapagent.com/developer/?key=media#keys

View Room and Media plans: https://vapagent.com/new-dashboard/?billing=monthly#plans


Generation

Use POST /api/v1/generations for image, video, and music generation.

Create Generation

curl -s -X POST https://api.vapagent.com/api/v1/generations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"image","prompt":"PROMPT","params":{"aspect_ratio":"1:1"}}'

Returns a task id:

{"generation_id":"UUID","task_id":"UUID","status":"pending","kind":"image"}

Poll Generation

curl -s https://api.vapagent.com/api/v1/generations/GENERATION_ID \
  -H "Authorization: Bearer $VAP_API_KEY"

When complete, return the media URL from result_url, image_url, video_url, audio_url, or the primary URL inside result.

Generation Types And Params

Image

{
  "kind": "image",
  "prompt": "A clean product photo of a violet-white AI media emblem on a studio desk",
  "params": {
    "aspect_ratio": "1:1"
  }
}
ParamTypeDefaultDescription
aspect_ratioenum1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21
widthintoptionalTarget width when supported
heightintoptionalTarget height when supported
negative_promptstringoptionalWhat to avoid
output_formatstringoptionalRequested output format when supported
quantityintoptionalNumber of images when supported

Video

{
  "kind": "video",
  "prompt": "Drone shot over misty mountains at sunrise",
  "params": {
    "duration": 8,
    "aspect_ratio": "9:16",
    "resolution": "1080p"
  }
}
ParamTypeDefaultDescription
durationint84, 6, or 8 seconds
aspect_ratioenum16:916:9 landscape or 9:16 portrait
generate_audiobooltrueInclude audio track
resolutionenum720p720p or 1080p
negative_promptstringoptionalWhat to avoid
source_imagestringoptionalInput image URL for image-to-video when supported

Music

{
  "kind": "music",
  "prompt": "Upbeat lo-fi hip hop beat, warm vinyl crackle, chill atmosphere",
  "params": {
    "duration": 120,
    "instrumental": true,
    "audio_format": "mp3"
  }
}
ParamTypeDefaultDescription
durationint12030-480 seconds
instrumentalboolfalseNo vocals
audio_formatenummp3mp3 or wav
loudness_presetenumstreamingstreaming, apple, or broadcast
stylestringoptionalGenre/style
titlestringoptionalSong title
custom_modeboolfalseEnable custom lyrics and style mode

Operations

Use POST /api/v1/operations for edit and enhancement operations.

Create Operation

curl -s -X POST https://api.vapagent.com/api/v1/operations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operation":"background_remove","media_url":"https://example.com/photo.png"}'

Poll Operation

curl -s https://api.vapagent.com/api/v1/operations/OPERATION_ID \
  -H "Authorization: Bearer $VAP_API_KEY"

When complete, return the media URL from result_url, image_url, video_url, or the primary URL inside result.

Available Operations

OperationRequired ParamsDescription
inpaintmedia_url, promptAI editing with optional mask_url
ai_editmedia_url, promptAI-powered image editing with optional additional_images
background_removemedia_urlRemove background
upscalemedia_urlEnhance resolution with options.scale: 2 or 4
video_trimmedia_url, options.start_time, options.end_timeTrim video
video_mergemedia_urls array, min 2Merge video clips

Agent Instructions

When a user asks to create, generate, or make an image, video, or music:

  1. Improve the prompt with useful style, lighting, composition, mood, or production details.
  2. Require VAP_API_KEY; if it is missing, send the user to Developer Hub for a Media API key.
  3. Submit POST /api/v1/generations with top-level kind, top-level prompt, and optional params.
  4. Set aspect ratio based on the content need:
    • portrait/social -> 9:16
    • YouTube/web/widescreen -> 16:9
    • square feed asset -> 1:1
  5. Poll GET /api/v1/generations/{id} until completed or failed.
  6. Return the final media URL to the user with concise status.

When a user asks to edit, enhance, or modify an existing image or video:

  1. Identify the operation: inpaint, ai_edit, upscale, background_remove, video_trim, or video_merge.
  2. Get the media URL from a previous generation or user-provided URL.
  3. Submit POST /api/v1/operations.
  4. Poll GET /api/v1/operations/{id} until completed or failed.
  5. Return the output URL.

Do not expose internal provider details as the product identity. The visible product is VAP Media API.


Examples

Image

curl -s -X POST https://api.vapagent.com/api/v1/generations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"image","prompt":"A fluffy orange tabby cat on a sunlit windowsill, soft bokeh, golden hour light, photorealistic","params":{"aspect_ratio":"16:9"}}'

curl -s https://api.vapagent.com/api/v1/generations/GENERATION_ID \
  -H "Authorization: Bearer $VAP_API_KEY"

Video

curl -s -X POST https://api.vapagent.com/api/v1/generations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"video","prompt":"Drone shot over misty mountains at sunrise","params":{"duration":8,"aspect_ratio":"9:16","resolution":"1080p"}}'

Music

curl -s -X POST https://api.vapagent.com/api/v1/generations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"music","prompt":"Upbeat lo-fi hip hop beat, warm vinyl crackle, chill vibes","params":{"duration":120,"instrumental":true,"audio_format":"wav","loudness_preset":"streaming"}}'

AI Edit

curl -s -X POST https://api.vapagent.com/api/v1/operations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operation":"ai_edit","media_url":"https://example.com/photo.jpg","prompt":"Change the background to a sunset beach"}'

Upscale

curl -s -X POST https://api.vapagent.com/api/v1/operations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operation":"upscale","media_url":"https://example.com/photo.jpg","options":{"scale":4}}'

Background Remove

curl -s -X POST https://api.vapagent.com/api/v1/operations \
  -H "Authorization: Bearer $VAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operation":"background_remove","media_url":"https://example.com/photo.jpg"}'

Prompt Tips

  • Style: "oil painting", "3D render", "watercolor", "photograph", "flat illustration"
  • Lighting: "golden hour", "neon lights", "soft diffused light", "dramatic shadows"
  • Composition: "close-up", "aerial view", "wide angle", "rule of thirds"
  • Mood: "serene", "energetic", "mysterious", "premium", "playful"
  • Aspect ratio: mention "widescreen", "portrait", or "16:9" when relevant.

Setup

  1. Get a Media API key: https://vapagent.com/developer/?key=media#keys
  2. View Room and Media plans if access is needed: https://vapagent.com/new-dashboard/?billing=monthly#plans
  3. Set: export VAP_API_KEY=vap_xxxxxxxxxxxxxxxxxxxx

Questions people ask

What media can it generate?
It generates images, videos, and music through POST /api/v1/generations. Supported controls include image aspect ratio, video duration and resolution, and music duration, format, style, and instrumental mode.
Which editing operations are supported?
It supports inpaint, AI image editing, background removal, 2× or 4× upscaling, video trimming, and merging at least two video clips.
How does authentication and result delivery work?
Requests use VAP_API_KEY as a Bearer token. After submitting a generation or operation, the workflow polls its ID until completion or failure and returns the final media URL.

Related skills

Generate instrumental or vocal music from prompts, with durations from 5 seconds to 10 minutes.

167 installs4 stars

Generate narration, cloned voices, sound effects, and music from text prompts.

225 installs4 stars

Generate images, videos, audio, and music while keeping project and conversation context organized.

71 installs5 stars

Create and export videos from scripts, URLs, documents, visuals, ideas, or speech.

100 installs

Turn music briefs or lyrics into Suno-ready prompts, structured lyrics, and generated audio.

by Iván59 installs