Codex CLI, Cursor, OpenCode and Kilo Code on one API key

Step-by-step setup for four popular coding tools on Aash API: one base URL, one key, and every model in your plan, from GPT and Claude to Gemini and DeepSeek.

The Aash API teamPublished 3 min read
Four floating rounded tiles connected by thin lines to a single central black node.
On this page
  1. Codex CLI
  2. Cursor
  3. OpenCode
  4. Kilo Code
  5. Which model should you pick?
  6. Other tools

Most coding tools let you bring your own OpenAI-compatible endpoint. That is all Aash API needs: point a tool at https://api.aashapi.com/v1, give it your Aash API key, and every model in your plan is available in it, including Claude, Gemini, DeepSeek and Qwen, not only GPT.

Below is the setup for four of the most used tools. Each takes two or three minutes. Replace apx_live_YOUR_KEY with a key from your dashboard; the model ids come from the catalog.

Codex CLI

Codex is OpenAI's terminal agent. It reads custom providers from ~/.codex/config.toml and talks to the Responses API, which Aash API serves at /v1/responses.

Codex CLI running in a terminal
Codex CLI in the terminal. Image: openai/codex, Apache-2.0.

Install it (Node.js 18 or newer):

Terminal
npm install -g @openai/codex

Register Aash API as a provider and make it the default:

~/.codex/config.toml
model = "gpt-5.6-luna"
model_provider = "Aash API"

[model_providers.Aash API]
name = "Aash API"
base_url = "https://api.aashapi.com/v1"
env_key = "AASH_API_KEY"
wire_api = "responses"

Codex reads the key from the variable named by env_key. Store it for future terminals:

Terminal
echo 'export AASH_API_KEY="apx_live_YOUR_KEY"' >> ~/.zshrc   # or ~/.bashrc
export AASH_API_KEY="apx_live_YOUR_KEY"

On Windows, in PowerShell:

PowerShell
[Environment]::SetEnvironmentVariable("AASH_API_KEY", "apx_live_YOUR_KEY", "User")
$env:AASH_API_KEY = "apx_live_YOUR_KEY"

Open a new terminal and run codex inside your project. codex --model <id> switches the model for one session.

Cursor

Cursor routes every custom endpoint through its OpenAI settings, including Claude, Gemini and Grok models.

  1. Press Ctrl+Shift+J (⌘⇧J on Mac) to open Cursor Settings, and choose Models.
  2. In the search box, type the model id exactly, for example gpt-5.6-terra, and click Add Custom Model.
  3. Scroll down to API Keys and turn on OpenAI API Key. Leave the Anthropic and Google fields empty.
  4. Paste your Aash API key into the OpenAI API Key field.
  5. Turn on Override OpenAI Base URL, paste https://api.aashapi.com/v1 and click Verify.
  6. In the chat's model dropdown, turn off Auto and select your model.
The Cursor steps on the Aash API docs page
The same Cursor steps in the docs, with your key and model filled in.

Chat, Agent and Cmd+K now run on Aash API. Tab completion keeps using Cursor's own models, as it does for every custom key.

OpenCode

OpenCode is an open-source terminal agent. Install it with npm, or with the install script on macOS and Linux:

Terminal
npm install -g opencode-ai

Add Aash API as a provider in ~/.config/opencode/opencode.json (or in an opencode.json at the root of a project):

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "Aash API/gpt-5.6-luna",
  "provider": {
    "Aash API": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Aash API",
      "options": {
        "baseURL": "https://api.aashapi.com/v1",
        "apiKey": "apx_live_YOUR_KEY"
      },
      "models": {
        "gpt-5.6-luna": {
          "name": "GPT 5.6 Luna",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "claude-sonnet-5": {
          "name": "Claude Sonnet 5",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "gemini-3.1-pro": {
          "name": "Gemini 3.1 Pro",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        }
      }
    }
  }
}

Start opencode and pick a model with /models; the Aash API models appear in their own group. Add any other id from the catalog to the models map whenever you like. Every model entry declares modalities with image, so images and screenshots work on any model you pick: vision models read them directly, and text-only models get a description from the gateway.

OpenCode's terminal interface
OpenCode's terminal interface. Image: anomalyco/opencode, MIT License.

Kilo Code

Kilo Code runs in VS Code, in JetBrains IDEs and in the terminal.

Kilo Code in VS Code next to the Kilo CLI
Kilo Code in VS Code, beside the Kilo CLI. Image: Kilo-Org/kilocode, MIT License.

In the editor, install the Kilo Code extension, open its Settings (the gear), go to Providers and click Custom provider. Choose OpenAI Compatible and fill in:

text
Provider ID     Aash API
Provider API    OpenAI Compatible
Base URL        https://api.aashapi.com/v1
API key         apx_live_YOUR_KEY
Model           gpt-5.6-luna

Kilo then lists every model your key can reach, straight from /v1/models.

In the terminal, install the CLI and give it the same provider. It is a fork of OpenCode and reads the same shape of config:

Terminal
npm install -g @kilocode/cli
~/.config/kilo/kilo.jsonc
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "Aash API/gpt-5.6-luna",
  "provider": {
    "Aash API": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Aash API",
      "options": {
        "baseURL": "https://api.aashapi.com/v1",
        "apiKey": "apx_live_YOUR_KEY"
      },
      "models": {
        "gpt-5.6-luna": {
          "name": "GPT 5.6 Luna",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "claude-sonnet-5": {
          "name": "Claude Sonnet 5",
          "tool_call": true,
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        }
      }
    }
  }
}

Restart the CLI, run kilo in your project and choose a model with /models. Images work on every model: vision models read them directly, and text-only models get a description from the gateway.

Which model should you pick?

Any model in your plan works in all four tools, so pick by the job, not by the tool:

JobTry
Everyday coding, fast iterationsgpt-5.6-luna, deepseek-v4-flash, gemini-3.8-flash
Hard problems and large refactorsclaude-opus-5, gpt-6-sol, gemini-3.1-pro
Long agent sessions on a budgetdeepseek-v4-flash, kimi-k3, glm-5.3

Every model has its own weighted-token multiplier, so a model with a low one makes your allowance go further. The pricing page turns each plan's allowance into real tokens per model, and the live ranking shows what other developers run most right now.

Other tools

Pi, Kimi Code, Grok Build, DeepSeek Harness, Hermes and ZCode have their own recipes in the docs, and so does Claude Code. If your tool is not listed, look for a Base URL or Custom provider field: paste https://api.aashapi.com/v1 and your key, and use a model id from the catalog.

A black terminal window floating in space, a glowing prompt connected by fine lines to small glass cubes.

Guides3 min read

How to set up Claude Code with Aash API in two minutes

Point Claude Code at Aash API with three environment variables, make it permanent in settings.json, switch between Claude Sonnet, Opus and Haiku with /model, and keep an eye on your usage.

The red robot Chief in the middle, joined by dashed lines to the eight Bots of its team.

News3 min read

Meet AashBot: your own team of AI Bots on Android

AashBot is the new Android app from Aash API: a team of AI Bots, run by Chief, that research with sources, work in Gmail, Notion and 46 more apps, and make real files. What it does, how it runs on your Aash API key, and when it is out.

One key for every top model.

GPT, Claude, Gemini, Grok, DeepSeek and Qwen on a single API key and one monthly plan. Works with the tools you already use.