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

  1. Sign up for a free UMVA account at umva.net (no KYC required).
  2. Generate an AI API key from your dashboard or use the editor auth flow.
  3. Add funds to your wallet (minimum $0.10, card or crypto).
  4. Use the base URL https://umva.net with your Bearer token.
  5. Call GET /v1/models to list models or POST /v1/chat/completions for 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

MethodEndpointDescription
GET/v1/modelsList models (OpenAI-compatible format)
POST/v1/chat/completionsChat completions (OpenAI-compatible, SSE streaming)
POST/v1/completionsLegacy completions (OpenAI-compatible)
POST/v1/messagesMessages (Anthropic-compatible, SSE streaming)
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/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

ParameterTypeRequiredDefaultDescription
modelstringYes-ID of the model to use. Call GET /v1/models to list available options.
messagesobject[]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).
thinkingobject | nullNonullControls thinking mode. Object with type ("enabled" or "disabled". At UMVA, default is disabled.)
reasoning_effortstringNo"high"Reasoning effort. Values: "high", "max". "low" and "medium" map to "high". "xhigh" maps to "max".
max_tokensint | nullNomodel defaultMaximum tokens to generate. Total input + generated tokens limited by model context length.
response_formatobject | nullNo{"type": "text"}Output format: "text" or "json_object". When using json_object, instruct model to produce JSON via system/user message.
stopstring | string[] | nullNonullUp to 16 stop sequences. null means no custom stop.
streambool | nullNofalseIf true, SSE streaming. Terminated by data: [DONE].
stream_optionsobject | nullNonullSet {"include_usage": true} to get token usage before [DONE]. Only when stream: true.
temperaturenumber | nullNo1Sampling temperature 0-2. Higher (0.8) = more random, lower (0.2) = more deterministic. Alter this or top_p, not both.
top_pnumber | nullNo1Nucleus sampling. 0.1 = top 10% probability mass. Alter this or temperature, not both.
toolsobject[] | nullNonullTool definitions (function calling). Currently only "function" type. Max 128 functions. Each has name, description, parameters (JSON Schema).
tool_choicestring | object | nullNo"none" / "auto""none" (no tool calls), "auto" (model decides), "required" (must call a tool), or {"type": "function", "function": {"name": "..."}} (force specific tool).
logprobsbool | nullNofalseIf true, returns log probabilities of output tokens.
top_logprobsint | nullNonullInteger 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_idstringNonullCustom 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 IDInput PriceOutput PriceContextBest For
umva-code-fast$0.5000/M$1.1200/M1,000,000Default 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/M1,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.