Lumo API

@Carlostkd OpenAI compatible endpoint powered by Proton Lumo API
active

Overview

Json file to drop it into any OpenAI compatible client OpenCode custom scripts, or any tool that lets you set a custom OpenAI compatible base URL.

Endpoints

GET /v1/models — list available models
POST /v1/chat/completions — chat completions skills and subagents available.

OpenCode Config

Paste this into your project's opencode.json, then start opencode it should connect automatically.

If you prefer to use the web interface start it with: opencode web --hostname 0.0.0.0

opencode.json
{
  "$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": {
        "auto": {
          "name": "Lumo Auto"
        }
      }
    }
  },
  "server": {
    "port": 4096,
    "hostname": "0.0.0.0"
  }
}
opencode.json (official endpoint)
{
  "$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": {
        "auto": {
          "name": "Lumo Auto"
        }
      }
    }
  },
  "server": {
    "port": 4096,
    "hostname": "0.0.0.0"
  }
}

Quick Start

  1. Copy the config into your project's opencode.json.
  2. Should connect automatically to Lumo Auto.
  3. If not Run /models and pick Lumo Auto.
  4. Start coding.

Curl examples

List models
curl https://api.carlostkd.ch/v1/models \
  -H "Authorization: Bearer YOUR_KEY"
Chat completion
curl https://api.carlostkd.ch/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "hello"}],
    "stream": true
  }'
Generate image
curl https://api.carlostkd.ch/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Generate an image of a cat"}],
    "stream": true,
    "tools": [["generate_image"]]
  }'
Web search
curl https://api.carlostkd.ch/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "What is the weather today?"}],
    "stream": true,
    "tools": [["web_search"]]
  }'
Extract web content
curl https://api.carlostkd.ch/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Extract content from https://example.com"}],
    "stream": true,
    "tools": [["extract_web"]]
  }'
Multiple tools
curl https://api.carlostkd.ch/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Search for cat images and generate one"}],
    "stream": true,
    "tools": [["web_search"], ["generate_image"]]
  }'
copied