SDKs & Libraries

Use any OpenAI-compatible client. Just swap the base URL and API key.

Works with everything

Conflux Router implements the OpenAI API spec. Any library that supports OpenAI works with us — no custom SDK required.

OpenAI SDKLangChainVercel AI SDKLlamaIndexHaystackCrewAI

Quick Start

bash
1
2
3
4
5
6
7
8
9
10
11
12
"docs-token-command">curl https://theconflux.com/v1/chat/completions \
  -H "Authorization: Bearer cf_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Explain quantum computing in one paragraph."}
    ],
    "max_tokens": "docs-token-number">256,
    "temperature": "docs-token-number">0.7
  }'

Configuration

VariableDescriptionDefault
CONFLUX_API_KEYYour API key (cf_live_xxx)Required
CONFLUX_BASE_URLAPI base URLhttps://theconflux.com/v1
CONFLUX_DEFAULT_MODELDefault model aliasgpt-4o-mini
CONFLUX_MAX_RETRIESRetry count on failure3
.env
1
2
CONFLUX_API_KEY=cf_live_x7k9m2p4q8r1s5t6
CONFLUX_BASE_URL=https://theconflux.com/v1