Cheaper InferenceA Keak company

App integrations

Use cheaper inference in the apps you already know

Cheaper Inference supports OpenAI-compatible Chat Completions and a stateless Responses API for Codex. Most agents, coding tools, and chat apps only need a base URL, an API key, and a model ID.

Use this base URL

https://api.cheaperinference.com/v1

Codex CLI and desktop app

Send new local Codex tasks through Cheaper Inference's Responses API.

Official configuration reference

Supported: streamed responses, function calls, local Codex tools such as apply_patch, and usage accounting. This configuration applies to new local tasks in the Codex CLI, desktop app, and IDE extension. It does not change Codex cloud chats.

1 Install or verify Codex

If codex --version already prints a version, continue to step 2.

Terminal
npm install --global @openai/codex
codex --version

2 Make your API key available

Create a key in the Cheaper Inference dashboard. Replace the placeholder below, then run the command in the same terminal window you will use to start Codex. This sets the key for that terminal session only.

macOS or Linux
export CHEAPER_INFERENCE_API_KEY="ir_live_YOUR_API_KEY"
Windows PowerShell
$env:CHEAPER_INFERENCE_API_KEY = "ir_live_YOUR_API_KEY"

3 Add the custom provider

Open ~/.codex/config.toml and add the configuration below. In the desktop app, choose Settings → Configuration → Open config.toml. Replace gpt-5.4 with any currently available text-model ID from the live catalog; models with reliable tool calling work best for coding tasks.

~/.codex/config.toml
model = "gpt-5.4"
model_provider = "cheaper-inference"

[model_providers.cheaper-inference]
name = "Cheaper Inference"
base_url = "https://api.cheaperinference.com/v1"
env_key = "CHEAPER_INFERENCE_API_KEY"
wire_api = "responses"
Using the macOS desktop app from the Dock?

Apps opened from the Dock may not inherit a key exported in Terminal. Store a dedicated key in macOS Keychain, then use Codex's command-backed authentication. Paste your key when prompted; it will not appear in the command itself.

Store the key securely
read -s "CHEAPER_KEY?Paste your Cheaper Inference API key: "
echo
security add-generic-password -U -a codex -s cheaper-inference-codex -w "$CHEAPER_KEY"
unset CHEAPER_KEY

In the provider configuration, remove the env_key line and add:

Command-backed authentication
[model_providers.cheaper-inference.auth]
command = "/usr/bin/security"
args = ["find-generic-password", "-a", "codex", "-s", "cheaper-inference-codex", "-w"]

Use either env_key or the auth block, not both.

4 Restart and test

Codex CLI

From the terminal where you set the key, open your project and run:

Read-only tool test
codex exec --model gpt-5.4 --sandbox read-only "Run pwd without changing files, then tell me the directory."

Codex desktop app

  1. Completely quit and reopen the app.
  2. Start a new local task; an existing task keeps its original model.
  3. Ask: Inspect this project without changing files and tell me its framework.

Confirm it worked: open Cheaper Inference History. The completed request should show the selected model, endpoint /v1/responses, token usage, and a settled charge.

Troubleshooting
codex: command not found
Open a new terminal after installation and run codex --version again.
npm reports EACCES or “permission denied”
Do not change system-folder permissions blindly. Use npm's recommended EACCES fix or install Codex through a user-managed Node installation.
The request returns 401
The process cannot read your API key. Start the CLI from the terminal where you exported it, or use the macOS Keychain option for the desktop app.
The model is missing from the picker
Custom models may not appear in Codex's built-in picker. Set the exact model ID in config.toml, restart Codex, and begin a new local task.
Codex warns about unknown or fallback model metadata
This warning can be non-blocking for a custom model. If the task completes and History records the request, the connection worked. Test tool use before relying on an unfamiliar model for larger coding tasks.
Responses API limitations

This endpoint is stateless and requires store: false. Stored responses, previous_response_id, conversations, background mode, and provider-hosted web or file search are not supported. Local Codex tools continue to work.

OpenClaw

Add Cheaper Inference as a custom Chat Completions provider.

Official provider docs
  1. Set CHEAPER_INFERENCE_API_KEY in the environment that starts OpenClaw.
  2. Add the provider and model to your OpenClaw configuration.
  3. Select the model as cheaper-inference/gpt-5.4.
{
  "env": {
    "CHEAPER_INFERENCE_API_KEY": "ir_live_YOUR_API_KEY"
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "cheaper-inference/gpt-5.4"
      }
    }
  },
  "models": {
    "providers": {
      "cheaper-inference": {
        "baseUrl": "https://api.cheaperinference.com/v1",
        "apiKey": "${CHEAPER_INFERENCE_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "gpt-5.4",
            "name": "GPT-5.4 via Cheaper Inference"
          }
        ]
      }
    }
  }
}

Important: keep api set to openai-completions. Add another object to models for each Cheaper Inference model ID you want OpenClaw to expose.

Capability metadata: OpenClaw supplies generic context, output-token, reasoning, and input-modality defaults when optional model fields are omitted. Add explicit values only after verifying them for the exact model you selected.

Hermes Agent

Use Hermes' custom endpoint option.

Official provider docs
  1. Run hermes model.
  2. Choose Custom endpoint (self-hosted / VLLM / etc.).
  3. Enter the base URL above, your API key, and an exact model ID such as gpt-5.4.
  4. When Hermes asks for the API mode, choose Chat Completions.

For a manual setup, put CHEAPER_INFERENCE_API_KEY=ir_live_YOUR_API_KEY in ~/.hermes/.env, then edit ~/.hermes/config.yaml:

custom_providers:
  - name: cheaper-inference
    base_url: https://api.cheaperinference.com/v1
    key_env: CHEAPER_INFERENCE_API_KEY
    api_mode: chat_completions

model:
  default: gpt-5.4
  provider: custom:cheaper-inference

Recommended: use hermes model so Hermes writes the configuration in its current format. Protect ~/.hermes/.env because it contains your key.

OpenCode

Configure an OpenAI-compatible custom provider.

Official provider docs
  1. Open /connect, choose Other, enter cheaper-inference, and add your API key.
  2. Add the provider below to opencode.json, then use /models to select it.
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "cheaper-inference": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Cheaper Inference",
      "options": {
        "baseURL": "https://api.cheaperinference.com/v1"
      },
      "models": {
        "gpt-5.4": {
          "name": "GPT-5.4"
        }
      }
    }
  }
}

Important: use @ai-sdk/openai-compatible so OpenCode sends Chat Completions requests. Add more entries under models using exact IDs from the live catalog.

OpenWork

Use Cheaper Inference in the OpenCode-powered desktop agent.

Official OpenWork project

The OpenCode schema is intentional: OpenWork uses OpenCode as its model engine and reads OpenCode provider configuration for each workspace.

  1. Open a workspace in OpenWork and create opencode.json in that workspace's root folder.
  2. Add the provider configuration below, then reopen or reload the workspace.
  3. Open Settings → AI Providers → Connect provider, choose Cheaper Inference, and paste your API key.
  4. Select a Cheaper Inference model from OpenWork's model picker and start a task.
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "cheaper-inference": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Cheaper Inference",
      "env": ["CHEAPER_INFERENCE_API_KEY"],
      "options": {
        "baseURL": "https://api.cheaperinference.com/v1"
      },
      "models": {
        "gpt-5.6-sol": {
          "name": "GPT-5.6 Sol"
        },
        "gpt-5.6-terra": {
          "name": "GPT-5.6 Terra"
        },
        "deepseek-v4-flash": {
          "name": "DeepSeek V4 Flash"
        }
      }
    }
  }
}

Keep the key out of the file: the env declaration tells OpenWork that this provider accepts an API key; it does not contain the secret. OpenWork stores the key locally through OpenCode after you connect the provider. Add or replace model entries using exact IDs from the live catalog.

If Cheaper Inference does not appear: completely reload the workspace engine after saving the file. If it is still missing, capture the exact error and your OpenWork version before contacting support.

Open WebUI

Connect a hosted or self-hosted chat interface.

Official connection docs
  1. Open Admin Settings → Connections → OpenAI.
  2. Click Add Connection.
  3. Enter https://api.cheaperinference.com/v1 and your API key, then save.
  4. Select a discovered model. If needed, add exact IDs under Model IDs (Filter).

Feature scope: chat and model discovery work through the Cheaper Inference connection. Configure a separate provider for Open WebUI features that require embeddings, speech-to-text, or text-to-speech.

Cline

Use the OpenAI Compatible provider in VS Code.

Official provider docs
  1. Open Cline settings and choose OpenAI Compatible as the API provider.
  2. Set the Base URL to https://api.cheaperinference.com/v1.
  3. Paste your API key and enter an exact model ID such as gpt-5.4.
  4. Save, then start a small task and confirm the request appears in Cheaper Inference History.

Advanced model settings: enable image support, computer/tool use, and context or output limits only when the selected model supports them. These settings are model-specific, even when the same OpenAI-compatible connection is reused.

Aider

Point the terminal pair programmer at the compatible endpoint.

Official compatible API docs
export OPENAI_API_BASE=https://api.cheaperinference.com/v1
export OPENAI_API_KEY=ir_live_YOUR_API_KEY

cd /path/to/your/project
aider --model openai/gpt-5.4

Windows PowerShell:

$env:OPENAI_API_BASE = "https://api.cheaperinference.com/v1"
$env:OPENAI_API_KEY = "ir_live_YOUR_API_KEY"

Set-Location C:\path\to\your\project
aider --model openai/gpt-5.4

Model naming: keep Aider's openai/ prefix, followed by the exact Cheaper Inference model ID. If Aider warns that a newer model is unknown, its official model settings can be used to describe the model's context and edit format.

LibreChat

Add a custom OpenAI-compatible endpoint for a team chat deployment.

Official custom endpoint docs

Add the key to LibreChat's .env:

CHEAPER_INFERENCE_API_KEY=ir_live_YOUR_API_KEY

Add the endpoint to librechat.yaml, then restart LibreChat:

version: 1.3.13
endpoints:
  custom:
    - name: Cheaper Inference
      apiKey: '${CHEAPER_INFERENCE_API_KEY}'
      baseURL: 'https://api.cheaperinference.com/v1'
      models:
        default:
          - gpt-5.4
          - claude-opus-4.6
        fetch: true
      titleConvo: true
      titleModel: gpt-5.4
      modelDisplayLabel: Cheaper Inference

Claude model IDs: keep this as a custom OpenAI-compatible endpoint even when selecting a Claude model. Cheaper Inference translates the common request format to the serving provider.

Continue

Add a model to Continue's YAML configuration.

Official OpenAI provider docs
name: Cheaper Inference
version: 0.0.1
schema: v1

models:
  - name: GPT-5.4 through Cheaper Inference
    provider: openai
    model: gpt-5.4
    apiBase: https://api.cheaperinference.com/v1
    apiKey: ir_live_YOUR_API_KEY
    useResponsesApi: false

Recommended for Continue: keep useResponsesApi: false so Continue uses the broadly compatible Chat Completions path. The Responses endpoint is currently targeted at stateless Codex workloads.

Verify the connection

  1. Start with a short prompt and a model shown in the live catalog.
  2. Confirm the response completes in the app.
  3. Open your Cheaper Inference dashboard and verify the model, token usage, charge, and savings in History.

Codex can use /v1/responses. For other apps, use OpenAI-compatible Chat Completions unless the guide says otherwise. Configure a separate provider for embeddings, audio, stored Responses conversations, or hosted web and file search. For raw HTTP examples, parameters, and error handling, see the API documentation.