Lumo API
Unofficial development tracker for the Proton Lumo API. Documents what works, what doesn't, and tested Python examples updated as the API evolves.
─────────────────────────────────────────────────────────────┐
│ CLIENT SIDE │
├────────────────────────────────────────────────────────────┤
│ │
│ Your message: │
│ "What is 2+2?" │
│ │ │
│ ▼ │
│ ┌──────────────────────────┐ │
│ │ AES-256-GCM Encrypt │ ← Uses 32-byte random key │
│ │ Input: plaintext + key │ │
│ │ Output: IV + ciphertext + tag │
│ └──────────────────────────┘ │
│ │ │
│ ▼ │
│ Binary data: [12 bytes][??? bytes][16 bytes] │
│ │ │ │ │
│ IV Ciphertext Tag │
│ │ │
│ ▼ │
│ ┌──────────────────────────┐ │
│ │ Base64 Encode │ ← For JSON transport │
│ └──────────────────────────┘ │
• Client generates a random 32-byte AES key for each request
• Message content is encrypted with AES-256-GCM using that key
• The AES key itself is wrapped with GPG (recipient's public key)
• Both encrypted content and GPG-wrapped key are sent to API
• API decrypts using its private key, processes, then re-encrypts response
• Client decrypts the streaming response chunks locally
Feature Status
Tested directly against the live API. The Lumo API launched recently and the backend does not yet expose all features described in the frontend documentation config.
lumo-lite, lumo-max) with vision capabilities."none" (fast, no thinking) and "high" (slow, ~2-3x latency with thinking). Invalid values like "low", "medium" return HTTP 422.provider, finish_reason, and usage.prompt_tokens_details.cached_tokens.Listen to the API Walkthrough
Prefer to listen than read? Play the briefing and get the whole tracker explained out loud, from auth to tools to the known issues.
OpenCode Integration
Drop this config into your project's opencode.json to use the Lumo API directly from OpenCode. Lumo is auto detected.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"lumo": {
"npm": "@ai-sdk/openai-compatible",
"name": "Lumo",
"options": {
"baseURL": "https://lumo.proton.me/api/ai/v1",
"apiKey": "your_api_key"
},
"models": {
"lumo-max": { "name": "Lumo-Max" }
}
}
}
}
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"lumo": {
"npm": "@ai-sdk/openai-compatible",
"name": "Lumo",
"options": {
"baseURL": "https://api.carlostkd.ch/v1",
"apiKey": "your_api_key"
},
"models": {
"lumo-max": { "name": "Lumo-Max" }
}
}
}
}
Available API Models
Three models are available on the chat completions endpoint. The auto model is recommended for general use as it routes to the best backend model for the task.
Supported Parameters
The endpoint is OpenAI chat completions compatible. Only parameters confirmed as working are listed here.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model ID. Use auto, lumo-lite, or lumo-max. |
| messages | array | required | Conversation history as {role, content} objects. Roles: system, user, assistant. |
| Create/List Keys | array | required | Its possible to do this I do not intend to disclose this method publicly |
| temperature | number | optional | Sampling temperature 0.0–2.0. Lower = more deterministic. Default: 1.0. |
| max_tokens | integer | optional | Maximum tokens in the completion. Defaults to model output limit. |
| stream | boolean | optional | Can be turned ON/OFF and is now required. |
| reasoning_effort | string | optional | Controls model thinking. Valid values: "none" (fast, no thinking) and "high" (slow, ~2-3x latency with visible thinking block). Invalid values like "low", "medium" return HTTP 422. Default: "high". |
Full Working Script
Production ready script with all confirmed working features. Switch models by commenting and uncommenting the MODEL lines. Extend MESSAGES for multi-turn conversations. Includes reasoning_effort, streaming, and all available tools.
import requests import json API_KEY = "your_api_key_here" # MODEL = "auto" # MODEL = "lumo-max" MODEL = "lumo-lite" TEMPERATURE = 0.7 MAX_TOKENS = 1024 # "none" = fast (no thinking), "high" = slow (with thinking) REASONING_EFFORT = "high" # Tools must be in OpenAI function format. Simple string names may not work. TOOLS = [ {"type": "function", "function": {"name": "weather", "description": "Get weather data", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "stock", "description": "Get stock price", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "web_search", "description": "Search the web", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "cryptocurrency", "description": "Get crypto prices", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "proton_info", "description": "Get Proton product info", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "generate_image", "description": "Generate an image", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "describe_image", "description": "Describe an image", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "edit_image", "description": "Edit an image", "parameters": {"type": "object", "properties": {}, "required": []}}}, {"type": "function", "function": {"name": "web_extract", "description": "Extract content from web page", "parameters": {"type": "object", "properties": {}, "required": []}}} ] SYSTEM_PROMPT = "You are a helpful assistant that gives concise and accurate answers." MESSAGES = [ {"role": "user", "content": "why is the sky blue?"}, ] url = "https://lumo-api.proton.me/api/ai/v1/chat/completions" headers = { "Authorization": "Bearer " + API_KEY, "Content-Type": "application/json", } payload = { "model": MODEL, "messages": [{"role": "system", "content": SYSTEM_PROMPT}] + MESSAGES, "temperature": TEMPERATURE, "max_tokens": MAX_TOKENS, "reasoning_effort": REASONING_EFFORT, "stream": True, "tools": TOOLS, } r = requests.post(url, headers=headers, json=payload, timeout=120) r.raise_for_status() chunks = [] for line in r.iter_lines(): if line and line.startswith(b"data:"): data = line[5:].decode('utf-8') if data == "[DONE]": break try: chunk = json.loads(data) choices = chunk.get("choices", []) if choices: delta = choices[0].get("delta", {}) if isinstance(delta, dict): content = delta.get("content") if content: chunks.append(content) except (json.JSONDecodeError, KeyError, TypeError): continue full_content = "".join(chunks) if "</think>" in full_content: full_content = full_content.split("</think>", 1)[1].strip() print(full_content)
import requests import json API_KEY = "your_api_key_here" url = "https://lumo-api.proton.me/api/ai/v1/models" # Or call the limits endpoint #url = "https://lumo-api.proton.me/api/ai/v1/limits" headers = { "Authorization": "Bearer " + API_KEY, "Content-Type": "application/json", } r = requests.get(url, headers=headers, timeout=30) print("Status:", r.status_code) print("Response:", json.dumps(r.json(), indent=2))
Status: 200
Response: {
"object": "list",
"data": [
{
"object": "model",
"id": "lumo-lite",
"created": 1779890182,
"owned_by": "proton",
"capabilities": {
"completion_chat": true,
"function_calling": true,
"vision": true
},
"name": "Lumo Lite",
"description": "Fast, efficient model for everyday tasks.",
"max_context_length": 131072,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": 1,
"archived": false
},
{
"object": "model",
"id": "lumo-max",
"created": 1779890182,
"owned_by": "proton",
"capabilities": {
"completion_chat": true,
"function_calling": true,
"vision": true
},
"name": "Lumo Max",
"description": "More capable model for complex reasoning and longer context.",
"max_context_length": 131072,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": 1,
"archived": false
},
{
"object": "model",
"id": "apertus-15",
"created": 1779890182,
"owned_by": "proton",
"capabilities": {
"completion_chat": true,
"function_calling": true,
"vision": true
},
"name": "Apertus 1.5",
"description": "Fully open, Swiss-made model for lighter tasks",
"max_context_length": 131072,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": 1,
"archived": false
}
]
}
Redacted: I do not intend to disclose this method publicly prior to its official launch
Available Tools
| Tool | Standalone | Full Array | Notes |
|---|---|---|---|
weather | ✓ | ✓ | Returns temperature, humidity, wind, pressure |
stock | ✓ | ✓ | Real-time stock price by ticker symbol |
web_search | ✓ | ✓ | Returns full search results with sources |
web_extract | ✓ | ✓ | Extract content from web pages |
cryptocurrency | ✓ | ✓ | Real-time crypto prices across exchanges |
proton_info | ✓ | ✓ | Proton product documentation |
generate_image | ✓ | ✓ | Generate images from text prompts |
describe_image | ✓ | ✓ | Analyze and describe uploaded images |
edit_image | ✓ | ✓ | Edit existing images with text instructions |
import requests, json ALL_TOOLS = ["proton_info", "web_search", "web_extract", "weather", "stock", "cryptocurrency", "generate_image", "describe_image", "edit_image"] payload = { "Prompt": { "type": "generation_request", "turns": [ {"role": "user", "content": "What is the weather in Geneva today?", "images": [], "encrypted": True} ], "options": {"tools": ALL_TOOLS}, "targets": ["message"] } } r = requests.post( "https://lumo.proton.me/api/ai/v1/chat/completions", headers={ "Authorization": "Bearer " + API_KEY, "Content-Type": "application/json", }, json=payload, timeout=60, stream=True ) message = "" for raw in r.iter_lines(): if not raw: continue line = raw.decode("utf-8").strip() if not line.startswith("data:"): continue try: chunk = json.loads(line[5:]) if chunk.get("type") == "token_data" and chunk.get("target") == "message": message += chunk.get("content", "") except: continue print(message.strip())
Stream Event Types
| type | target | Description |
|---|---|---|
queued | — | Request received by server |
ingesting | — | Processing started. Contains job_id and model_name |
token_data | reasoning | Internal thinking discard |
token_data | message | Response to display to user |
token_data | title | Auto-generated conversation title |
tool_call | — | Tool invoked. content is JSON with name and arguments |
tool_result | — | Tool response. content is JSON with real-time data |
Limitations & Not Yet Working
The API is in early access. The frontend documentation config is ahead of what is actually deployed on the backend.
-1.0 to 20.0 all return 200 with no validation error. Responses are identical regardless of the value passed. No observable effect on output determinism or randomness.Lumo API Tracker — community tested · not affiliated with Proton · Live API