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 /v1/modelsto list models orPOST /v1/chat/completionsfor 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 | /v1/models | List models (OpenAI-compatible format) |
| POST | /v1/chat/completions | Chat completions (OpenAI-compatible, SSE streaming) |
| POST | /v1/completions | Legacy completions (OpenAI-compatible) |
| 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/v1/chat/completions"
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": "", // e.g. umva-code-pro, umva-code-architect, 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/v1/chat/completions",
{
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: "", // e.g. umva-code-pro, umva-code-architect, 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 — Non-thinking (Default)
At UMVA, requests are non-thinking by default. No extra parameter needed.
curl -L -X POST https://umva.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${UMVA_API_KEY}" \
-d '{
"model": "", // use GET /v1/models to list
"messages": [
{
"content": "You are a helpful assistant",
"role": "system"
},
{
"content": "Hi",
"role": "user"
}
],
"max_tokens": 4096,
"response_format": {"type": "text"},
"stop": null,
"stream": false,
"stream_options": null,
"temperature": 1,
"top_p": 1,
"tools": null,
"tool_choice": "none",
"logprobs": false,
"top_logprobs": null
}' List Models
curl https://umva.net/v1/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.
Request Body Parameters
Full reference for the /v1/chat/completions request body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | - | ID of the model to use. Call GET /v1/models to list available options. |
messages | object[] | Yes | - | List of messages comprising the conversation. Each message has role (system, user, assistant, tool), content (string), and optional name (participant identifier, a-z, A-Z, 0-9, dashes, underscores, max 64 chars). |
thinking | object | null | No | null | Controls thinking mode. Object with type ("enabled" or "disabled". At UMVA, default is disabled.) |
reasoning_effort | string | No | "high" | Reasoning effort. Values: "high", "max". "low" and "medium" map to "high". "xhigh" maps to "max". |
max_tokens | int | null | No | model default | Maximum tokens to generate. Total input + generated tokens limited by model context length. |
response_format | object | null | No | {"type": "text"} | Output format: "text" or "json_object". When using json_object, instruct model to produce JSON via system/user message. |
stop | string | string[] | null | No | null | Up to 16 stop sequences. null means no custom stop. |
stream | bool | null | No | false | If true, SSE streaming. Terminated by data: [DONE]. |
stream_options | object | null | No | null | Set {"include_usage": true} to get token usage before [DONE]. Only when stream: true. |
temperature | number | null | No | 1 | Sampling temperature 0-2. Higher (0.8) = more random, lower (0.2) = more deterministic. Alter this or top_p, not both. |
top_p | number | null | No | 1 | Nucleus sampling. 0.1 = top 10% probability mass. Alter this or temperature, not both. |
tools | object[] | null | No | null | Tool definitions (function calling). Currently only "function" type. Max 128 functions. Each has name, description, parameters (JSON Schema). |
tool_choice | string | object | null | No | "none" / "auto" | "none" (no tool calls), "auto" (model decides), "required" (must call a tool), or {"type": "function", "function": {"name": "..."}} (force specific tool). |
logprobs | bool | null | No | false | If true, returns log probabilities of output tokens. |
top_logprobs | int | null | No | null | Integer 0-20. Number of most likely tokens at each position. Requires logprobs: true. |
| Deprecated / No Longer Supported | ||||
frequency_penalty | - | No | - | deprecated No longer supported. Passing it has no effect. |
presence_penalty | - | No | - | deprecated No longer supported. Passing it has no effect. |
| Additional Optional Parameters | ||||
user_id | string | No | null | Custom user identifier. [a-zA-Z0-9\-_], max 512 chars. Used for content safety, KVCache isolation, scheduling. Do not include user privacy info. |
At UMVA, all requests are non-thinking by default. You must explicitly pass thinking: {"type": "enabled"} to enable reasoning. This differs from providers where thinking is enabled by default.
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.