caft/docs
Dashboard

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.

FieldValue
Namecaft
Prefixcaft
API TypeChat Completions
Base URLhttps://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

SettingValue
Base URLhttp://localhost:20128/v1
API keyAn OmniRoute key from API Manager
Modelcaft/glm-5.3-flash
Shell
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.

FieldValue
Namecaft
Prefixcaft
API TypeChat Completions
Base URLhttps://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

SettingValue
Base URLhttp://localhost:20128/v1
API keyA key from Endpoint → API Keys
Modelcaft/glm-5.3-flash
Shell
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:

YAML
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_KEY
Shell
litellm --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

SettingValue
Base URLhttp://127.0.0.1:4000/v1
API keyYour LITELLM_MASTER_KEY or a virtual key
Modelcaft-flash
Shell
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.

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.

Shell
npx -y @maximhq/bifrost -app-dir ./data -port 8080

Connect your app

SettingValue
Base URLhttp://localhost:8080/v1
Modelcaft/glm-5.3-flash
Shell
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.

FieldValue
TypeOpenAI
Namecaft
Base URLhttps://api.caft.dev
KeyYour caft API key
Modelsglm-5.3-flash
Groupdefault

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

SettingValue
Base URLhttp://localhost:3000/v1
API keyA new-api token from Tokens → Add token
Modelglm-5.3-flash
Shell
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.

Use the Docker image. The npx @portkey-ai/gateway build has returned HTTP 500 on streaming requests (issue #1389).
Shell
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.

YAML
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

SettingValue
Base URLhttp://localhost:8317/v1
API keyA key from api-keys in config.yaml
Modelglm-5.3-flash
Shell
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):

FieldValue
类型 (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

SettingValue
Base URLhttp://localhost:3000/v1
API keyA token from 令牌 (Tokens)
Modelglm-5.3-flash
Shell
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.

FieldValue
ChannelOpenAI Compatible
Upstream URLhttps://api.caft.dev/v1
API keysYour caft API key
Modelsglm-5.3-flash
Namecaft

Keep /v1 and leave the client alias empty. Then create a key under Access keys with access to the caft group.

Connect your app

SettingValue
Base URLhttp://localhost:3001/v1
API keyYour gpt-load access key
Modelglm-5.3-flash
Shell
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.

FieldValue
ProviderOpenAI
Channel Namecaft
Base URLhttps://api.caft.dev/v1
API KeyYour caft API key
Modelsglm-5.3-flash
Test Modelglm-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

SettingValue
Base URLhttp://localhost:8090/v1
API keyAn AxonHub API key
Modelglm-5.3-flash
Shell
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}'