zerostack

Cheaper Inference

Cheaper Inference is an OpenAI-compatible LLM gateway. One API key gives access to models from several labs. Use zerostack’s custom provider configuration to connect to its Chat Completions endpoint.

Credentials

Create an API key at https://cheaperinference.com/signup, then set it in your shell instead of storing it in the config:

export CHEAPER_INFERENCE_API_KEY="your-api-key"

Provider Configuration

Add this table to your zerostack config. See Configuration for config locations and project-local overrides.

[custom_providers.cheaper-inference]
provider_type = "openai"
base_url = "https://api.cheaperinference.com/v1"
api_key_env = "CHEAPER_INFERENCE_API_KEY"
api_style = "completions"
model = "gpt-5.4-mini"

Keep base_url ending in /v1. The client appends /chat/completions, so do not include that suffix in the configured URL. api_style = "completions" explicitly selects Chat Completions rather than the Responses API.

Start a session with:

zerostack --provider cheaper-inference --model gpt-5.4-mini

For a short text-only connectivity check:

zerostack --provider cheaper-inference --model gpt-5.4-mini --no-tools --max-tokens 32 -p "Reply with exactly pong."

Model IDs and Metadata

The example uses the exact model ID gpt-5.4-mini. To see the models available to your account:

curl https://api.cheaperinference.com/v1/models \
  -H "Authorization: Bearer $CHEAPER_INFERENCE_API_KEY"

Each row carries a type field; the text rows are the chat models. Use a returned ID unchanged with --model.

The listing reports OpenRouter-style context_length and pricing fields, so zerostack reads the context window and token pricing live; see Live context window and pricing. A context_window set in the config (or per quick model) overrides the live value.

An optional quick model gives the route a short name:

[quick_models.cheaper-inference-mini]
provider = "cheaper-inference"
model = "gpt-5.4-mini"

Select it with zerostack --quick-model cheaper-inference-mini.