Kavren

Integrations

Use Kavren models in your editor, terminal or application. Pick your client for its configuration and connection check.

Connection details

Get your connection details ↗
KAVREN_BASE_URL
https://kavren.dev/v1
KAVREN_API_KEY
Your customer key, stored in the environment where the client runs.

Chat Completions

OpenCode

Run opencode --version and save the matching example as opencode.json in your project. If you already have a config, replace its kavren entry that lives under providers (2.x) or provider (1.x). Set KAVREN_API_KEY to the full sk-… key from API keys, then start OpenCode from that terminal in the same folder.

OpenCode 2.x · opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "kavren": {
      "name": "Kavren",
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://kavren.dev/v1",
        "apiKey": "{env:KAVREN_API_KEY}"
      },
      "models": {
        "glm-5.3-abliterated": {
          "name": "GLM 5.3 Abliterated",
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          }
        },
        "glm-5.3-flash-abliterated": {
          "name": "GLM 5.3 Flash Abliterated",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          }
        },
        "deepseek-v4.1-flash-abliterated": {
          "name": "DeepSeek V4.1 Flash 1017 Abliterated",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          }
        },
        "deepseek-v4.1-flash-abliterated-fast": {
          "name": "DeepSeek V4.1 Flash 1017 Fast Abliterated",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          }
        },
        "kimi-k3.1-pro-abliterated": {
          "name": "Kimi K3.1 Pro Abliterated",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          }
        },
        "qwen4-35b-abliterated": {
          "name": "Qwen4 35B Abliterated",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 131072
          }
        },
        "ergo-1.0": {
          "name": "Ergo 1.0",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 131072
          }
        },
        "deepseek-v4.1-flash-fast": {
          "name": "DeepSeek V4.1 Flash 1017",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 256000
          }
        },
        "minimax-m3.1-flash": {
          "name": "MiniMax M3.1 Flash",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 500000
          }
        },
        "kimi-k3.1-pro": {
          "name": "Kimi K3.1 Pro",
          "capabilities": {
            "tools": true,
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          }
        }
      }
    }
  },
  "model": "kavren/deepseek-v4.1-flash-fast"
}
OpenCode 1.x · opencode.json
{
  "provider": {
    "kavren": {
      "name": "Kavren",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://kavren.dev/v1",
        "apiKey": "{env:KAVREN_API_KEY}"
      },
      "models": {
        "glm-5.3-abliterated": {
          "name": "GLM 5.3 Abliterated",
          "tool_call": true,
          "modalities": {
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          },
          "attachment": false
        },
        "glm-5.3-flash-abliterated": {
          "name": "GLM 5.3 Flash Abliterated",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          },
          "attachment": true
        },
        "deepseek-v4.1-flash-abliterated": {
          "name": "DeepSeek V4.1 Flash 1017 Abliterated",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          },
          "attachment": true
        },
        "deepseek-v4.1-flash-abliterated-fast": {
          "name": "DeepSeek V4.1 Flash 1017 Fast Abliterated",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          },
          "attachment": true
        },
        "kimi-k3.1-pro-abliterated": {
          "name": "Kimi K3.1 Pro Abliterated",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          },
          "attachment": true
        },
        "deepseek-v4.1-flash-fast": {
          "name": "DeepSeek V4.1 Flash 1017",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 256000
          },
          "attachment": true
        },
        "minimax-m3.1-flash": {
          "name": "MiniMax M3.1 Flash",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 500000
          },
          "attachment": true
        },
        "kimi-k3.1-pro": {
          "name": "Kimi K3.1 Pro",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 128000
          },
          "attachment": true
        },
        "qwen4-35b-abliterated": {
          "name": "Qwen4 35B Abliterated",
          "attachment": true,
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 131072
          }
        },
        "ergo-1.0": {
          "name": "Ergo 1.0",
          "attachment": true,
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 1048576,
            "output": 131072
          }
        }
      }
    }
  },
  "model": "kavren/deepseek-v4.1-flash-fast"
}
PowerShell
$env:KAVREN_API_KEY = "sk-…"
Bash / Zsh
export KAVREN_API_KEY="sk-…"
Check the model list
opencode models
Run
opencode

Client tested Both examples register the Kavren model catalog. If OpenCode reports ‘Model unavailable’, check the list for the full ID, for example kavren/deepseek-v4.1-flash-abliterated. To check your key separately, use Test your connection in the dashboard.

Chat Completions

Pi

Add the Kavren entry to ~/.pi/agent/models.json. Pi reads the key from the named environment variable.

~/.pi/agent/models.json
{
  "providers": {
    "kavren": {
      "baseUrl": "https://kavren.dev/v1",
      "api": "openai-completions",
      "apiKey": "KAVREN_API_KEY",
      "models": [
        {
          "id": "deepseek-v4.1-flash-fast",
          "name": "DeepSeek V4.1 Flash 1017",
          "input": [
            "text",
            "image"
          ]
        }
      ]
    }
  }
}
Run
pi --provider kavren --model deepseek-v4.1-flash-fast

Protocol tested This profile uses Kavren’s tested Chat Completions endpoint. The Pi application itself has no recorded end-to-end test here.

Responses

Codex CLI

Add this profile to ~/.codex/config.toml. Start the CLI with the Kavren profile.

~/.codex/config.toml
[profiles.kavren]
model_provider = "kavren"
model = "deepseek-v4.1-flash-fast"
web_search = "disabled"

[model_providers.kavren]
name = "Kavren"
base_url = "https://kavren.dev/v1"
env_key = "KAVREN_API_KEY"
wire_api = "responses"
supports_websockets = false
Run
codex --profile kavren

Protocol tested The gateway tests cover Responses usage and client tool results. This profile uses HTTP streaming and turns off the hosted search tool. A full Codex session is unverified.

Messages

Claude Code CLI

Use a fresh Bash session with your Kavren environment variables set. The CLI appends /v1/messages to the service address, so the example removes the final /v1 first.

Bash
export ANTHROPIC_BASE_URL="${KAVREN_BASE_URL%/v1}"
export ANTHROPIC_AUTH_TOKEN="$KAVREN_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4.1-flash-fast"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="$ANTHROPIC_MODEL"
export ANTHROPIC_DEFAULT_SONNET_MODEL="$ANTHROPIC_MODEL"
export ANTHROPIC_DEFAULT_OPUS_MODEL="$ANTHROPIC_MODEL"
claude --model "$ANTHROPIC_MODEL"

Protocol tested Messages streaming and usage are covered by gateway tests. The commands target the terminal CLI; Desktop has a separate model picker.

HTTP

cURL

Run the command for your shell to retrieve the model ID. Reading the catalog does not generate a response or consume model tokens.

Bash
curl --fail-with-body "$KAVREN_BASE_URL/models/deepseek-v4.1-flash-fast" \
  -H "Authorization: Bearer $KAVREN_API_KEY"
PowerShell
curl.exe --fail-with-body "$env:KAVREN_BASE_URL/models/deepseek-v4.1-flash-fast" -H "Authorization: Bearer $env:KAVREN_API_KEY"

Client tested Authenticated model listing and JSON responses have been checked against the gateway.

OpenAI SDK

Python

Install the SDK with python -m pip install openai. Save this file and run it in the same environment as your key. It prints the model ID without starting inference.

kavren.py
import os
from openai import OpenAI

client = OpenAI(
    base_url=os.environ["KAVREN_BASE_URL"],
    api_key=os.environ["KAVREN_API_KEY"],
)
model = client.models.retrieve("deepseek-v4.1-flash-fast")
print(model.id)
Run
python kavren.py

Protocol tested The catalog and Chat Completions endpoints are tested. A Python SDK end-to-end run has not been recorded.

OpenAI SDK

Node.js

Install the SDK with npm install openai. Save the example as an ES module. It prints the model ID without starting inference.

kavren.mjs
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: process.env.KAVREN_BASE_URL,
  apiKey: process.env.KAVREN_API_KEY,
});
const model = await client.models.retrieve("deepseek-v4.1-flash-fast");
console.log(model.id);
Run
node kavren.mjs

Client tested The JavaScript SDK was tested against the gateway with a simulated model response.

Where tools run

Your client executes its file, terminal and custom function tools with its own permissions. For web search, the client’s search tool takes priority. Kavren can look up an explicit public query when a suitable client tool is missing or returns a service error.

API error reference →

Claude Desktop

Desktop’s Code tab checks model IDs against its supported Anthropic models. Kavren’s model IDs are not supported by that picker. OpenCode can select Kavren routes by their catalog IDs.

Open the OpenCode guide →

Search Kavren