How to Connect Cadreen as a Model Provider
Cadreen speaks the OpenAI API format. Any tool that works with any OpenAI-compatible provider works with Cadreen — just change the base URL. You get governance, memory, traces, and failure diagnosis on top.
Quick Start
https://api.cadreen.com/api/v1/cadreen"cadreen"— send cadreen, or a gateway model to name itGet an API key
Create a key instantly — no separate workspace step. Or open Settings to manage keys.
Show curl for manual key creation
# 1) Create a key (needs sign-in cookie / Bearer JWT)
curl -X POST https://api.cadreen.com/api/v1/cadreen/quickstart \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"name":"quickstart"}'
# 2) Use it
curl -X POST https://api.cadreen.com/api/v1/cadreen/chat/completions \
-H "Authorization: Bearer sk_cadreen_..." \
-H "Content-Type: application/json" \
-d '{"model":"cadreen","messages":[{"role":"user","content":"Hello"}]}'Keys are scoped to your workspace. Each call creates a new key. List or revoke via Settings.
curl
curl -X POST https://api.cadreen.com/api/v1/cadreen/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_cadreen_..." \
-d '{
"model": "cadreen",
"messages": [
{"role": "user", "content": "Hello"}
]
}'}Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.cadreen.com/api/v1/cadreen",
api_key="sk_cadreen_...",
)
response = client.chat.completions.create(
model="cadreen",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Node.js
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.cadreen.com/api/v1/cadreen",
apiKey: "sk_cadreen_...",
});
const response = await client.chat.completions.create({
model: "cadreen",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);Go
client := openai.NewClient(
"sk_cadreen_...",
"https://api.cadreen.com/api/v1/cadreen",
)
resp, err := client.Chat.Completions.New(ctx, openai.ChatCompletionNewParams{
Model: "cadreen",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Hello"),
},
})cadreen as the model (or leave it out) and Cadreen picks the model. A model from GET /models answers instead once your workspace has turned on named models, with Cadreen's rules around it. Any other name, one the catalogue doesn't have, is answered by Cadreen and never refused.Platform-Specific Setup
// Cursor Settings → Models → Add Model
{
"name": "Cadreen",
"baseURL": "https://api.cadreen.com/api/v1/cadreen",
"model": "cadreen",
"apiKey": "sk_cadreen_..."
}// opencode.json
{
"provider": {
"name": "@ai-sdk/openai-compatible",
"baseURL": "https://api.cadreen.com/api/v1/cadreen",
"apiKey": "sk_cadreen_..."
},
"model": "cadreen/cadreen"
}# config.yaml
models:
- name: Cadreen
provider: openai
baseURL: https://api.cadreen.com/api/v1/cadreen
model: cadreen
apiKey: sk_cadreen_...from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="cadreen",
openai_api_base="https://api.cadreen.com/api/v1/cadreen",
openai_api_key="sk_cadreen_...",
)from llama_index.llms.openai import OpenAI
llm = OpenAI(
model="cadreen",
api_base="https://api.cadreen.com/api/v1/cadreen",
api_key="sk_cadreen_...",
)import litellm
response = litellm.completion(
model="openai/cadreen",
api_base="https://api.cadreen.com/api/v1/cadreen",
api_key="sk_cadreen_...",
messages=[{"role": "user", "content": "Hello"}],
)MCP (Model Context Protocol)
Cadreen runs its own MCP server, so an MCP-compatible client can use Cadreen as a tool provider. Point the client at the address below and send your API key as a bearer token. The tools it offers are listed in the MCP guide.
# Cadreen's MCP server (Server-Sent Events)
https://api.cadreen.com/api/v1/cadreen/mcp/sse
# Sent with every request
Authorization: Bearer sk_cadreen_...POST /connections/mcp. That route goes the other way: it makes Cadreen connect out to an MCP server of yours and use its tools. For direct model access, use the OpenAI-compatible endpoint above.What Cadreen Adds
You don't choose Cadreen instead of your model. You choose structure around it. Same API, same tools — but every request is governed, remembered, and traced.
What Cadreen Adds Over Raw API Calls
temperature, top_pIgnored — Cadreen manages internallymodel fieldRequired but ignored — use "cadreen"Response metadataAdds an intelligence object: reasoning, governance, humilityChain-of-thoughtStripped — not visible to clientn parameterAlways 1 — one completion per request