Skip to main content
Any tool that lets you set an OpenAI or Anthropic base URL and key can use Aesoteric. The API keys page in the console shows the Claude Code and Pi setups filled in with current model ids and context sizes. In the examples, replace <model-id> with a model id and <context-length> with that model’s context_length from the Models page. Use one key per tool, so you can see each tool’s spend and revoke it on its own.

Any OpenAI-compatible tool

Tools that speak the Anthropic format use https://api.aesoteric.ai as the base URL, without /v1.

Claude Code

Set these in your shell, then start claude:
  • ANTHROPIC_DEFAULT_HAIKU_MODEL covers the background tasks Claude Code would otherwise send to a Claude model.
  • CLAUDE_CODE_MAX_CONTEXT_TOKENS tells Claude Code the real context size of the model you chose. Without it, Claude Code can send prompts longer than that model accepts, and those are answered 400.
  • Claude Code’s WebSearch tool is refused, because there is no web search. To keep it from being tried, deny it in .claude/settings.json:
Anthropic does not support Claude Code with other providers’ models, so expect rough edges. See the Claude Code docs.

Codex

Codex uses the Responses format. Add a provider to ~/.codex/config.toml:
~/.codex/config.toml
Then set your key and run Codex:
  • Codex’s web search tool is removed from each request, so you don’t need to turn it off.
  • Codex offers its apply_patch tool only when its model metadata asks for it. Without that, it edits files with shell commands. Both work.
OpenAI does not support Codex with other providers’ models, so expect rough edges.

Pi

  1. Add an aesoteric provider to ~/.pi/agent/models.json, merging it into providers if the file exists. The Pi tab on the API keys page has this file filled in for every model. To write it yourself, add one entry to models per model, and in thinkingLevelMap map each Pi level to an effort from that model’s reasoning.supported_efforts, or to null if it isn’t listed. Set reasoning to false if that model lists no efforts:
~/.pi/agent/models.json
input is that model’s architecture.input_modalities. maxTokens is Pi’s own cap on one answer, not a model limit.
  1. Set your key in the shell that starts Pi:
  1. Start pi, run /model and choose a model.
See pi.dev.

OpenCode

Add a custom provider to opencode.json in your project, or to ~/.config/opencode/opencode.json:
opencode.json
Set your key in the shell that starts OpenCode, then start opencode and choose aesoteric/<model-id> with /models:
opencode.ai’s docs show a newer config format (providers, package, settings) that OpenCode 1.19.6, the latest release as of November 2026, doesn’t read, so use the format above. See opencode.ai.

Cursor

  1. Open Cursor Settings > Models.
  2. Turn on OpenAI API Key and paste your Aesoteric key.
  3. Turn on Override OpenAI Base URL and enter https://api.aesoteric.ai/v1.
  4. Add <model-id> as a custom model and choose it.
Cursor sends these requests from its own servers, and custom keys work only for chat. The base URL override applies to every OpenAI model in Cursor, so turn it off to use Cursor’s own OpenAI models. See Cursor’s API keys docs.