Conflux Docs
API and CLI

CLI setup

Connect Claude CLI and Codex CLI to Conflux while keeping workspace governance active.

Choose your CLI

Set the Anthropic-compatible base URL and use a Conflux workspace API key.

Windows PowerShell:

$env:ANTHROPIC_BASE_URL="https://api.yoiyoi.xyz"
$env:ANTHROPIC_API_KEY="<CONFLUX_API_KEY>"
Remove-Item Env:ANTHROPIC_AUTH_TOKEN -ErrorAction SilentlyContinue
claude --dangerously-skip-permissions

macOS/Linux:

export ANTHROPIC_BASE_URL="https://api.yoiyoi.xyz"
export ANTHROPIC_API_KEY="<CONFLUX_API_KEY>"
unset ANTHROPIC_AUTH_TOKEN
claude --dangerously-skip-permissions

Configure Codex to point at Conflux, then set the Conflux API key before running.

Use a model ID returned by /v1/models for that API key, then add this provider configuration to your Codex config.toml.

model = "<MODEL_ID_FROM_V1_MODELS>"
model_provider = "yoiyoi"

[model_providers.yoiyoi]
name = "yoiyoi"
base_url = "https://api.yoiyoi.xyz/v1"
env_key = "CONFLUX_API_KEY"

The model value is the default for this Codex configuration. To choose another enabled model for one run, pass its exact catalog ID with -m or --model.

codex -m <MODEL_ID_FROM_V1_MODELS>
codex exec -m <MODEL_ID_FROM_V1_MODELS> "<PROMPT>"

Windows PowerShell:

$env:CONFLUX_API_KEY="<CONFLUX_API_KEY>"
codex

macOS/Linux:

export CONFLUX_API_KEY="<CONFLUX_API_KEY>"
codex

Choose an enabled model

Conflux does not publish a fixed Codex model generation or a fixed model list. The available model IDs come from connected provider instances configured by an administrator, then are narrowed by Model Inventory, workspace membership, and API-key policy.

Query the authenticated catalog before setting model.

Windows PowerShell:

Invoke-RestMethod "https://api.yoiyoi.xyz/v1/models"   -Headers @{ Authorization = "Bearer $env:CONFLUX_API_KEY" }

macOS/Linux:

curl https://api.yoiyoi.xyz/v1/models \
  -H "Authorization: Bearer $CONFLUX_API_KEY"

Use the exact id returned for your key. Its provider-key namespace identifies the configured provider instance, so do not assume that a default namespace or a model from another workspace is available.

A concrete allowed ID passed with -m overrides the configured default for that run. When Codex does not send an enabled Conflux model ID, Conflux applies the workspace policy and default direct model instead.

Reasoning settings follow model capability

Set model_reasoning_effortonly when the selected model's metadata advertises a compatible reasoning level. If the model is not listed for your key, ask a workspace administrator to enable it in Model Inventory and the applicable access policy.

Long-running work

Long-running CLI work can exceed browser or proxy expectations when routed through the wrong hostname. For production CLI/API traffic, use the direct API hostname rather than the web hostname.

CLI-native memory

Claude CLI and Codex CLI may already include their own working context. Conflux preserves that client payload on the first attempt and uses workspace memory as a governed layer around the request, not as a replacement for the CLI's own task context.