# VIOSTUDIO API — Quick Reference

## Auth
```
Authorization: Bearer vio_sk_vA8llIYm51J3oyXtfevrM92yUBJ8-3IS1sIn6xydF8o
```

## Generate Image
```bash
curl -X POST https://api.viostudio.id/v1/images/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Instagram 9:16 vertical image...",
    "model": "gpt-image-2.0",
    "aspect_ratio": "9:16",
    "count": 1
  }'
```

## Generate Video (i2v — from image)
```bash
# 1. Upload image as asset
curl -X POST https://api.viostudio.id/v1/assets \
  -H "Authorization: Bearer $API_KEY" \
  -F "file=@image.jpg"

# 2. Generate video from asset
curl -X POST https://api.viostudio.id/v1/videos/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Animation description...",
    "mode": "i2v",
    "model": "veo-3.1-lite",
    "aspect_ratio": "portrait",
    "start_frame_asset_id": ASSET_ID
  }'
```

## Generate Video (t2v — text only)
```bash
curl -X POST https://api.viostudio.id/v1/videos/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Video description...",
    "mode": "t2v",
    "model": "omni-flash",
    "aspect_ratio": "portrait",
    "duration_sec": 6
  }'
```

## Check Status
```bash
curl https://api.viostudio.id/v1/generations/GEN_ID \
  -H "Authorization: Bearer $API_KEY"
```

## Download
```bash
curl -sL "VIDEO_URL" -o output.mp4
```

## Models & Credits
| Model | Type | Credits |
|-------|------|---------|
| `gpt-image-2.0` | Image | 5 |
| `veo-3.1-lite` | Video | 5 |
| `veo-3.1-fast` | Video | 50 |
| `veo-3.1-quality` | Video | 100 |
| `omni-flash` | Video (t2v only, 6s) | 1 |

## Notes
- **i2v** = image to video (from uploaded asset)
- **t2v** = text to video (prompt only)
- **omni-flash** = fast & cheap, max 6 seconds
- Use Indonesian prompts for @balimentari content
