About UMVA AI
API Documentation
Integrate UMVA AI Into Any Application
UMVA AI provides an Anthropic-compatible API for AI completions. The editor registers one native provider ("umva") and fetches available models on startup. The API uses Bearer token authentication and supports SSE streaming. This guide covers authentication, endpoints, models, and code examples.
Quick Start
Get API access in minutes
- Sign up for a free UMVA account at umva.net (no KYC required).
- Generate an AI API key from your dashboard or use the editor auth flow.
- Add funds to your wallet (minimum $0.10, card or crypto).
- Use the base URL
https://umva.netwith your Bearer token. - Call
GET /api/llm/modelsto list models orPOST /api/llm/completionfor AI completions.
Authentication
How to authenticate your API requests
All API requests require authentication via a Bearer token in the Authorization header. You can generate API keys from your UMVA dashboard.
Header Format
Authorization: Bearer umva_ai_YOUR_API_KEY_HERE
Content-Type: application/json
AI API Key vs Sanctum Token
AI API keys (prefix: umva_ai_) are used for LLM completions and usage stats only. Sanctum tokens provide full API access for account management. AI keys can be generated from the dashboard and revoked independently.
Editor Auth Flow (OAuth-like)
The IDE uses a browser-based token exchange. Opening https://umva.net/account?redirect=umva-editor://callback redirects the browser to authorize the editor with no manual copy-pasting.
API Endpoints
The core endpoints available
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/llm/models |
List available AI models with capabilities and pricing |
| POST | /api/llm/completion |
Create an AI completion (Anthropic-compatible, SSE streaming) |
| GET | /api/ai/keys |
List your API keys (requires Sanctum token) |
| POST | /api/ai/keys |
Create a new AI API key (requires Sanctum token) |
| DELETE | /api/ai/keys/{id} |
Revoke an API key (requires Sanctum token) |
| GET | /api/ai/keys/usage |
View usage stats (works with AI API key directly) |
Primary Base URL
https://umva.net
Fallback Base URL
https://umva.us
The editor retries the fallback URL on network errors or 5xx status.
Code Examples
Get started with your preferred language
Python (requests)
import requests
url = "https://umva.net/api/llm/completion"
headers = {
"Authorization": "Bearer umva_ai_YOUR_KEY",
"Content-Type": "application/json",
"User-Agent": "umva-ai-editor/1.0",
"X-Request-Id": "your-uuid-here",
}
data = {
"model": "umva-code-fast",
"max_tokens": 200,
"messages": [
{"role": "user",
"content": "Write a Python sort function"}
],
"stream": True
}
r = requests.post(url, json=data,
headers=headers, stream=True)
for line in r.iter_lines():
if line:
print(line.decode())
Node.js (fetch)
const response = await fetch(
"https://umva.net/api/llm/completion",
{
method: "POST",
headers: {
"Authorization":
"Bearer umva_ai_YOUR_KEY",
"Content-Type":
"application/json",
"User-Agent":
"umva-ai-editor/1.0",
"X-Request-Id":
crypto.randomUUID(),
},
body: JSON.stringify({
model: "umva-code-fast",
max_tokens: 200,
messages: [
{role: "user",
content: "Write a Python sort function"}
],
stream: true,
}),
}
);
const reader = response.body
.getReader();
// process SSE stream...
cURL (Streaming)
curl -N -X POST https://umva.net/api/llm/completion \
-H "Authorization: Bearer umva_ai_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: umva-ai-editor/1.0" \
-H "X-Request-Id: $(uuidgen)" \
-d '{
"model": "umva-code-fast",
"max_tokens": 200,
"messages": [
{"role": "user", "content": "Write a Python sort function"}
],
"stream": true
}'
List Models
curl https://umva.net/api/llm/models \
-H "Authorization: Bearer umva_ai_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Client-Version: 1.0" \
-H "User-Agent: umva-ai-editor/1.0"
Returns JSON with all available models, capabilities, context window, and max output tokens.
Available Models
Choose the right model for your needs
| Model ID | Input Price | Output Price | Context | Best For |
|---|---|---|---|---|
umva-code-fast |
$0.28/M | $1.12/M | 1,000,000 | Default • Fast, lightweight model for quick edits |
umva-code-agent |
$0.28/M | $1.12/M | 1,000,000 | Code Fast with extended thinking for complex reasoning |
umva-code-pro |
$0.50/M | $2.00/M | 1,000,000 | Advanced model for complex tasks with deeper reasoning |
umva-code-architect |
$0.50/M | $2.00/M | 1,000,000 | Code Pro with extended thinking for architecture & large-scale refactoring |
Ready to Build?
Get your API key and start integrating the cheapest AI inference into your applications.