# VAP Media - AI Media Generation & Editing
> **Integration Note:** VAP Media is an API aggregator that provides unified access to multiple AI providers:
> - **Images:** Generated via Black Forest Labs Flux.2 Pro
> - **Videos:** Generated via Google Veo 3.1
> - **Music:** Generated via Suno V5
>
> All generation requests go through VAP's API (`api.vapagent.com`), which routes to the appropriate backend provider.
Generate images, videos, and music. Edit with inpaint, ai_edit, upscale, background removal, video trim/merge.
## Mode Selection
Check if `VAP_API_KEY` is set:
- **VAP_API_KEY not set** → Use Free Mode (images only, 3/day)
- **VAP_API_KEY set** → Use Full Mode (all features, unlimited)
---
## Free Mode (No API Key)
Generate images for free. No signup required. 3 per day.
### Generate Image
```bash
curl -s -X POST https://api.vapagent.com/v3/trial/generate \
-H "Content-Type: application/json" \
-d '{"prompt":"PROMPT"}'
```
Returns `{"task_id":"UUID","status":"pending","remaining":2}`.
### Poll Result
```bash
curl -s https://api.vapagent.com/v3/trial/status/TASK_ID
```
Returns `{"status":"completed","image_url":"https://..."}` when done.
### Free Mode Errors
- `429` → Daily limit reached. Suggest upgrading: `export VAP_API_KEY=vap_xxx`
- `503` → Trial service temporarily unavailable.
---
## Full Mode (With API Key)
Unlimited images, video, music, and editing operations.
### Create Task
```bash
curl -s -X POST https://api.vapagent.com/v3/tasks \
-H "Authorization: Bearer $VAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"TYPE","params":{"description":"PROMPT"}}'
```
Returns `{"task_id":"UUID","status":"pending"}`.
### Poll Result
```bash
curl -s https://api.vapagent.com/v3/tasks/TASK_ID \
-H "Authorization: Bearer $VAP_API_KEY"
```
Returns `{"status":"completed","result":{"output_url":"https://..."}}` when done.
### Task Types & Parameters
#### Image (`image` or `image_generation`)
| Param | Type | Defau...