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/jsonAI 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) |
| OpenAI-compatible standard paths | ||
| GET | /v1/models | List models (OpenAI-compatible format) |
| POST | /v1/chat/completions | Chat completions (OpenAI-compatible, SSE streaming) |
| POST | /v1/completions | Legacy completions (OpenAI-compatible) |
| Anthropic-compatible standard path | ||
| POST | /v1/messages | Messages (Anthropic-compatible, SSE streaming) |
Primary Base URL
https://umva.netFallback Base URL
https://umva.usThe 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.5000/M | $1.1200/M | 1,000,000 | Default Fast and versatile model for coding, general tasks, analysis, and creative work. Supports optional thinking effort: low, high, or max. |
umva-code-architect | $1.5000/M | $3.3000/M | 1,000,000 | Powerful model for complex coding, architecture, creative work, and deep analysis. Supports optional thinking effort: low, high, or max. |
Ready to Build?
Get your API key and start integrating the cheapest AI inference into your applications.