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.
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
{
"$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"
}
}
{
"$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"
}
}
opencode.json./models and pick Lumo Auto.curl https://api.carlostkd.ch/v1/models \ -H "Authorization: Bearer YOUR_KEY"
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
}'
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"]]
}'
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"]]
}'
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"]]
}'
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"]]
}'