# VIOSTUDIO Thread

> Thread utilitas untuk semua kebutuhan generate gambar, video, dan TTS.

---

## 📌 API Info

| Detail | Info |
|--------|------|
| **Base URL** | https://api.viostudio.id/v1 |
| **Auth** | Bearer token: vio_sk_xxxx |
| **Credit check** | GET /v1/account/credits |

---

## 🔑 Capabilities

### Image Generation
```
POST /v1/images/generate
Models: nano-banana-2, nano-banana-pro, qwen-image, seedream, kling, gpt-image-2.0
Cost: 3-5 credits/image
```

### Video Generation
```
POST /v1/videos/generate
Modes: t2v, i2v, r2v, v2v
Models: Veo, PixVerse, omni-flash, Kling, Sora
Cost: 5-100 credits/video
```

### Text-to-Speech
```
POST /v1/audio/speech
Speaker IDs: Various Indonesian voices
Cost: 1 credit/generation
```

### Motion Control
```
POST /v1/videos/motion-control
Animate image with reference video
Cost: 15-63 credits
```

---

## 📝 Quick Reference

### Generate Image
```javascript
const response = await fetch('https://api.viostudio.id/v1/images/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer vio_sk_xxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'your prompt here',
    model: 'nano-banana-pro',
    aspect_ratio: '1:1',
    count: 1
  })
});
```

### Generate Video
```javascript
const response = await fetch('https://api.viostudio.id/v1/videos/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer vio_sk_xxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'your prompt here',
    model: 'veo-3.1-fast',
    aspect_ratio: 'portrait'
  })
});
```

### TTS
```javascript
const response = await fetch('https://api.viostudio.id/v1/audio/speech', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer vio_sk_xxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    text: 'Text to speak',
    speaker_id: 'id_female_anna',
    emotion: 'happy'
  })
});
```

### Poll Status
```javascript
// Check generation status
GET /v1/generations/:id
```

---

## 🎯 Use Cases

| Use Case | Service |
|----------|---------|
| Generate illustration/portrait | Image Gen |
| Animate static image | Video Gen (i2v) |
| Text-to-speech narration | TTS |
| Create promo video | Video Gen (t2v) |
| Animate character | Motion Control |

---

## ⚠️ Notes

- API key: **NEVER expose in client-side code**
- Credit check sebelum generate
- Poll status untuk async operations
- Asset expire: 30 days

---

## 📅 History

| Tanggal | Task | Status |
|---------|------|--------|
| 30 Mei 2026 | Setup thread | ✅ Done |
| 30 Mei 2026 | Check credits | ✅ 142 total |

### API Key Info
- **Prefix:** vio_sk_vA8llIYm51J3...
- **Plan Tier:** Starter
- **Total Credits:** 142
- **Last Checked:** 30 Mei 2026

