Reference

Integrations

Configure common coding, agent, and chat clients with a base URL, key, and model ID.

On this page

This page is for developers connecting an existing client by supplying the three values it needs: base URL, API key, and model ID.

The OpenAI SDK examples and Codex CLI configuration are verified. Other sections are configuration guides only; client versions and feature behavior can differ, so validate one request before relying on those tools.

Install with CLSSAI Connect#

CLSSAI Connect installs Codex CLI, Kilo CLI, Hermes Agent and OpenClaw in a private directory, and provides a Docker setup for LibreChat. Each app page generates the command for your operating system and selected model.

Run the command, open the browser approval URL printed by the installer, and match the device code. Approving creates a dedicated app key and configures the endpoint and model. Keys are encrypted for the installer and are never embedded in an installation URL or shell command.

Use the full launcher path printed at the end with run <app> or doctor <app>. Connect does not modify shell startup files. Example:

BashSyntax highlighted
~/.local/share/clssai-connect/bin/clssai run codex-cli
~/.local/share/clssai-connect/bin/clssai doctor codex-cli

Windows uses the clssai.cmd launcher in the same directory under your user profile. Hermes requires WSL on Windows. LibreChat requires Docker Compose and 8 GB of free Docker storage, and starts on http://localhost:3080.

The Linux CLI installations were tested in isolated server containers, including requests to a controlled API endpoint to verify model IDs, authorization and streaming. This verifies configuration transport, not every model's tool capabilities. A fresh Ubuntu 22.04 environment also completed installation from the public URL, live browser approval and a real CLSSAI response through Kilo. Desktop execution has not been tested.

Codex Desktop configuration#

Select Desktop configuration on the Codex page. Connect merges the CLSSAI provider into the user configuration, backs up the previous file and stores the key with owner-only permissions so the desktop process does not depend on a terminal environment variable. Fully quit and reopen Codex after setup.

BashSyntax highlighted
~/.local/share/clssai-connect/bin/clssai restore codex-desktop

The desktop application itself must already be installed. Custom CODEX_HOME locations are honored when present in the installer environment. A TOML parse error stops setup before changing the original file.

Change or remove a connection#

Run the installer again to change models or replace a key. CLI settings are isolated under ~/.local/share/clssai-connect/apps/<app>. Remove unused keys in API keys. Deleting local configuration does not revoke a key. For LibreChat, stop its own Compose project before removing files; keep its database volumes if you want to retain chats.

The app page uses the selected model’s available catalog context limit. Without catalog metadata, Kilo and OpenClaw start with a conservative 32,768-token context and 4,096-token output budget. For a model with different limits, pass --context-window and --max-output to the Connect CLI and use values supported by that model.

Codex CLI#

Verified with a real CLSSAI key over the Responses API.

  • Base URL: https://api.clssai.com/v1
  • Key: environment variable CLSSAI_API_KEY
  • Model: the complete ID openai/gpt-5.4-nano
tomlPlain rendering
model = "openai/gpt-5.4-nano"
model_provider = "clssai"

[model_providers.clssai]
name = "CLSSAI"
base_url = "https://api.clssai.com/v1"
env_key = "CLSSAI_API_KEY"
wire_api = "responses"

Codex refreshes the model list when it starts. Because GET /v1/models returns the OpenAI list shape rather than a top-level models field, Codex prints a non-fatal warning about missing field models; this does not prevent requests. Keep the model as a complete author/model ID. See the verified Responses API path for its request and streaming contract.

LibreChat#

Configuration guide only.

YAMLSyntax highlighted
baseURL: https://api.clssai.com/v1
apiKey: ${CLSSAI_API_KEY}
model: openai/gpt-5.4-nano

Map these values to the custom OpenAI-compatible endpoint fields in your installed version, restart the server, and verify a one-line chat response.

Kilo Code#

Kilo CLI 7.5.15 was installed and connected through the live Connect flow. A real CLSSAI request completed with the configured model and key.

For GPT-5 models, Kilo’s compatible SDK omits the normal output cap. Connect explicitly sets max_completion_tokens: 4096 in the model options to avoid an oversized upstream token reservation. The installer’s --max-output option changes that limit.

Plain textPlain rendering
Base URL: https://api.clssai.com/v1
API key: $CLSSAI_API_KEY
Model ID: openai/gpt-5.4-nano

Choose the custom OpenAI-compatible entry, save the three values, and verify a short server-side request.

Hermes Agent#

Configuration guide only.

BashSyntax highlighted
export OPENAI_BASE_URL="https://api.clssai.com/v1"
export OPENAI_API_KEY="$CLSSAI_API_KEY"
export OPENAI_MODEL="openai/gpt-5.4-nano"

Start with a text-only task and inspect the returned model and status before enabling a broader workflow.

OpenClaw#

Configuration guide only.

Plain textPlain rendering
Base URL: https://api.clssai.com/v1
API key: $CLSSAI_API_KEY
Model ID: openai/gpt-5.4-nano

Enter the values in the custom OpenAI-compatible connection fields and verify one text request. Tool behavior is outside this guide's commitment.

OpenAI SDK generic#

Verified for Python, JavaScript, and curl.

PythonSyntax highlighted
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.clssai.com/v1", api_key=os.environ["CLSSAI_API_KEY"])
result = client.chat.completions.create(
    model="openai/gpt-5.4-nano",
    messages=[{"role": "user", "content": "Reply with OK."}],
)
print(result.choices[0].message.content)

Common mistakes#

  • Except for the verified Codex CLI section, treat non-SDK sections as setup guidance rather than a compatibility guarantee.
  • Keep the key in the server environment and never enable browser SDK calls.
  • Include /v1 for OpenAI-compatible clients and omit it from the Anthropic SDK base URL.
  • Preserve full :free and :batch IDs.
  • Check empty streaming choices arrays and retain cf-ray for tracing.
Need a hand?

Find answers to common questions or diagnose a failed request.

Frequently asked questions →Troubleshoot errors →