V2 Cloud AI
Platform-hosted AI inference inside your generated apps — chat, images, and embeddings.
V2 Cloud AI lets your published app call AI models through OpenV2's infrastructure — billed to the project owner, no separate OpenRouter API key required in the app.
Capabilities
| API | Purpose |
|---|---|
| Chat | Conversational AI inside your app |
| Image | Generate images from prompts |
| Embeddings | Vector embeddings for search / RAG |
Default models
| Task | Default model |
|---|---|
| Chat | Gemini 2.5 Flash Lite |
| Image | FLUX.2 Klein 4B |
Models are configured platform-side and may change for cost or quality.
Billing & balance
- Monthly free USD allowance per account
- Additional usage draws from a funded balance
- Top up via Stripe (
ai_topupcheckout) from Settings → Billing or the V2 Cloud AI dashboard
The AI section in V2 Cloud shows:
- Chat / image / embedding call counts
- Estimated USD cost
- Current balance and rate limits
- Recent events
Integration patterns
Recommended: PocketBase hooks
Call V2 Cloud AI from server hooks so API routing and billing stay server-side:
Client helper (development)
Generated apps include ~/lib/v2ai.ts:
Direct client calls work in preview but hooks are preferred for production.
RAG with embeddings
Use embeddings + cosine similarity in app code for semantic search — no separate vector database required for basic RAG patterns.
