AI Features Overview
Chat, image, and video generation powered by Volcano Engine.
Overview
Sistine Starter integrates with Volcano Engine (ByteDance's Doubao API) for AI capabilities:
| Feature | Model | Endpoint |
|---|---|---|
| Chat | doubao-1-5-thinking-pro-250415 | /api/chat/stream |
| Image Generation | doubao-seededit-3-0-i2i-250628 | /api/image/generate |
| Video Generation | doubao-seedance-1-0-pro-250528 | /api/video/generate |
Configuration
All AI integrations require a Volcano Engine API key:
VOLCANO_ENGINE_API_KEY="your-api-key"
VOLCANO_ENGINE_API_URL="https://ark.cn-beijing.volces.com/api/v3"Architecture
AI wrappers live in lib/volcano-engine/:
lib/volcano-engine/
├── config.ts # API configuration
├── chat.ts # Chat completion + streaming
├── image.ts # Image generation
├── video.ts # Video generation (async)
└── types.ts # TypeScript interfacesCredit Integration
Every AI operation follows the deduct-first, refund-on-failure pattern:
- Check if user has enough credits
- Deduct credits from balance
- Call AI API
- If API fails, refund credits automatically
Replacing the AI Provider
To switch from Volcano Engine to OpenAI, Anthropic, or another provider:
- Replace the API calls in
lib/volcano-engine/ - Update environment variables
- Adjust model configuration
- Keep the same credit deduction pattern