Routers
Add caft to your router once; your apps use the router's endpoint and key.
Get a caft key and some credits first. Addresses below are each router's default; change them if it runs elsewhere. Test requests use caft credits. If you add fallback providers, those routes and their bills are yours.
OmniRoute
Install OmniRoute, then open Providers → Add OpenAI Compatible.
| Field | Value |
|---|---|
| Name | caft |
| Prefix | caft |
| API Type | Chat Completions |
| Base URL | https://api.caft.dev/v1 |
Leave the custom paths empty and select Add. Open the provider, add a Connection with your caft key and default model glm-5.3-flash, and add the model under Models if it's missing. The API Key (for Check) field only tests the endpoint; it doesn't save a connection.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:20128/v1 |
| API key | An OmniRoute key from API Manager |
| Model | caft/glm-5.3-flash |
curl http://localhost:20128/v1/chat/completions \
-H "Authorization: Bearer $OMNIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "caft/glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'9Router
Install 9Router, then open Providers → Custom Providers → Add OpenAI Compatible.
| Field | Value |
|---|---|
| Name | caft |
| Prefix | caft |
| API Type | Chat Completions |
| Base URL | https://api.caft.dev/v1 |
Select Create, open the provider, Add API Key with your caft key and default model glm-5.3-flash (required), and save.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:20128/v1 |
| API key | A key from Endpoint → API Keys |
| Model | caft/glm-5.3-flash |
curl http://localhost:20128/v1/chat/completions \
-H "Authorization: Bearer $NINEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "caft/glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'LiteLLM
Install the proxy. Set CAFT_API_KEY, and LITELLM_MASTER_KEY to a separate secret starting with sk-. Save as config.yaml, or add the model to your existing one:
model_list:
- model_name: caft-flash
litellm_params:
model: openai/glm-5.3-flash
api_base: https://api.caft.dev/v1
api_key: os.environ/CAFT_API_KEY
general_settings:
master_key: os.environ/LITELLM_MASTER_KEYlitellm --config config.yaml --host 127.0.0.1 --port 4000
openai/ selects LiteLLM's OpenAI client; caft receives glm-5.3-flash. On a shared proxy, give apps a virtual key instead of the master key.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://127.0.0.1:4000/v1 |
| API key | Your LITELLM_MASTER_KEY or a virtual key |
| Model | caft-flash |
curl http://127.0.0.1:4000/v1/chat/completions \
-H "Authorization: Bearer $LITELLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "caft-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'Bifrost
Install Bifrost, set CAFT_API_KEY, and save this as ./data/config.json.
{
"providers": {
"caft": {
"keys": [
{
"name": "caft",
"value": "env.CAFT_API_KEY",
"models": [
"*"
],
"weight": 1
}
],
"network_config": {
"base_url": "https://api.caft.dev",
"default_request_timeout_in_seconds": 300
},
"custom_provider_config": {
"base_provider_type": "openai",
"allowed_requests": {
"chat_completion": true,
"chat_completion_stream": true,
"list_models": true
}
}
}
}
}base_url has no /v1; Bifrost adds /v1/chat/completions. env. reads the key from the environment.
npx -y @maximhq/bifrost -app-dir ./data -port 8080
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:8080/v1 |
| Model | caft/glm-5.3-flash |
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "caft/glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'A local Bifrost without virtual keys needs no app key.
new-api
Start new-api, then Channels → Add channel.
| Field | Value |
|---|---|
| Type | OpenAI |
| Name | caft |
| Base URL | https://api.caft.dev |
| Key | Your caft API key |
| Models | glm-5.3-flash |
| Group | default |
Save, then Test. No /v1: new-api adds the path. For a multi-user deployment, set a model price; current prices are in the model list.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:3000/v1 |
| API key | A new-api token from Tokens → Add token |
| Model | glm-5.3-flash |
curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $NEWAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'Portkey
The open-source Portkey gateway stores no provider settings: apps send your caft key and two headers on every request.
npx @portkey-ai/gateway build has returned HTTP 500 on streaming requests (issue #1389).docker run -d -p 127.0.0.1:8787:8787 portkeyai/gateway:latest
curl http://localhost:8787/v1/chat/completions \
-H "Authorization: Bearer $CAFT_API_KEY" \
-H "Content-Type: application/json" \
-H "x-portkey-provider: openai" \
-H "x-portkey-custom-host: https://api.caft.dev/v1" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "stream": true}'In the OpenAI SDKs, set the headers with default_headers (Python) or defaultHeaders (TypeScript).
CLIProxyAPI
Add this to the CLIProxyAPI config.yaml with your caft key, then restart.
openai-compatibility:
- name: "caft"
base-url: "https://api.caft.dev/v1"
api-key-entries:
- api-key: "YOUR_CAFT_API_KEY"
models:
- name: "glm-5.3-flash"Keep /v1: CLIProxyAPI adds only /chat/completions. If you set an alias, apps must use it.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:8317/v1 |
| API key | A key from api-keys in config.yaml |
| Model | glm-5.3-flash |
curl http://localhost:8317/v1/chat/completions \
-H "Authorization: Bearer $CLIPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'One API
Start One API (on ARM use justsong/one-api:v0.6.10; latest is x86 only). Sign in as root and change the password. The console is in Chinese; English meanings are in brackets.
Open 渠道 (Channels) → 添加新的渠道 (Add new channel):
| Field | Value |
|---|---|
| 类型 (Type) | OpenAI |
| 名称 (Name) | caft |
| 分组 (Group) | default |
| 模型 (Models) | glm-5.3-flash |
| 密钥 (Key) | Your caft API key |
| 代理 (Base URL) | https://api.caft.dev |
Type the model in the custom field and select 填入 (Add). 提交 (Submit), then 测试 (Test). No /v1 in the base URL.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:3000/v1 |
| API key | A token from 令牌 (Tokens) |
| Model | glm-5.3-flash |
curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $ONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'gpt-load
Sign in to gpt-load with the management key, then Groups → Add group.
| Field | Value |
|---|---|
| Channel | OpenAI Compatible |
| Upstream URL | https://api.caft.dev/v1 |
| API keys | Your caft API key |
| Models | glm-5.3-flash |
| Name | caft |
Keep /v1 and leave the client alias empty. Then create a key under Access keys with access to the caft group.
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:3001/v1 |
| API key | Your gpt-load access key |
| Model | glm-5.3-flash |
curl http://localhost:3001/v1/chat/completions \
-H "Authorization: Bearer $GPT_LOAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'AxonHub
In AxonHub, open Channels → Add Channel.
| Field | Value |
|---|---|
| Provider | OpenAI |
| Channel Name | caft |
| Base URL | https://api.caft.dev/v1 |
| API Key | Your caft API key |
| Models | glm-5.3-flash |
| Test Model | glm-5.3-flash |
New channels start disabled: enable it, then select Test. If apps send Anthropic Messages through AxonHub, remove the metadata field in Override Settings → Override Body: [{"op":"delete","path":"metadata"}].
Connect your app
| Setting | Value |
|---|---|
| Base URL | http://localhost:8090/v1 |
| API key | An AxonHub API key |
| Model | glm-5.3-flash |
curl http://localhost:8090/v1/chat/completions \
-H "Authorization: Bearer $AXONHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Say hello."}], "max_tokens": 128, "stream": true}'