Guide

How to use the AshnaAI API in OpenClaw, Cline, and Codex

Pick one tool — Codex CLI, OpenClaw, Cline, or Continue. Install only that tool, create an AshnaAI API key, and point it at https://api.ashna.ai/v1/api. You do not need the other tools.

AshnaAI

How to use the AshnaAI API in OpenClaw, Cline, and Codex

Pick one tool — skip the rest

This page has four independent guides. Choose Codex CLI, OpenClaw, Cline, or Continue. Install only that tool. You do not need the others to talk to the AshnaAI API. Cursor and VS Code have their own posts: How to use the AshnaAI API in Cursor and How to use the AshnaAI API in VS Code.

Which section to open
If you useOpen this sectionPath
Codex CLI onlyCodex CLI/responses
OpenClaw onlyOpenClaw/chat/completions, /v1/messages, or /responses
Cline onlyCline/chat/completions
Continue onlyContinue/chat/completions
AshnaAI HTTP API www.ashna.ai/api-docs

Create an AshnaAI API key (all tools)

Do this once. Then jump to the single section for your tool. The same key works if you later try a second harness — you still only install that second tool when you want it.

  1. Open Account → API.
  2. Choose Create key and name it after the one tool you will use first.
  3. Copy the secret immediately. It is shown once.
  4. Keep it out of git and a public config file.

Codex CLI

Use this section only if you want Codex. Official install: Codex CLI getting started. Codex posts to /responses — not /chat/completions.

Install — macOS and Linux
▸ curl -fsSL https://chatgpt.com/codex/install.sh | sh
▸ codex --version
Install — Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"//chatgpt.com/codex/install.ps1 | iex"
codex --version
Install — any OS with npm
▸ npm install -g @openai/codex
▸ codex --version
Install — macOS Homebrew
▸ brew install --cask codex
▸ codex --version
Point Codex at AshnaAI — macOS, Linux, WSL
▸ export OPENAI_BASE_URL="https://api.ashna.ai/v1/api"
▸ export OPENAI_API_KEY="paste-your-key-here"
▸ cd /path/to/your/project
▸ codex
Point Codex at AshnaAI — Windows PowerShell
$env:OPENAI_BASE_URL="https://api.ashna.ai/v1/api"//api.ashna.ai/v1/api"
$env:OPENAI_API_KEY="paste-your-key-here"
cd \path\to\your\project
codex
Point Codex at AshnaAI — Windows CMD
▸ set OPENAI_BASE_URL=https://api.ashna.ai/v1/api
▸ set OPENAI_API_KEY=paste-your-key-here
▸ cd \path\to\your\project
▸ codex
  1. Install Codex with the command for your OS. Confirm with codex --version.
  2. Export OPENAI_BASE_URL=https://api.ashna.ai/v1/api and OPENAI_API_KEY in the same shell.
  3. Confirm the base URL includes /v1/api.
  4. Start codex from that shell and send one turn. It posts to /v1/api/responses.
  5. If you see 401, recheck the key. If you see 404, recheck the base URL.

OpenClaw

Use this section only if you want OpenClaw. Skip it for Codex, Cline, or Continue. Installer: OpenClaw install. Provider fields: OpenClaw providers.

Install — macOS, Linux, and WSL2
▸ curl -fsSL https://openclaw.ai/install.sh | bash
▸ openclaw --version
Install — Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex
openclaw --version
Install — any OS with npm
▸ npm install -g openclaw@latest --allow-scripts=openclaw
▸ openclaw --version
  1. Install OpenClaw with the command for your OS. Confirm with openclaw --version.
  2. Open the OpenClaw provider settings.
  3. Set the provider base to https://api.ashna.ai/v1/api
  4. Paste the AshnaAI API key.
  5. Pick one mode: openai-completions (/chat/completions), anthropic-messages (/v1/messages), or openai-responses (/responses).
  6. Send one turn on that path.

Cline

Use this section only if you want Cline in VS Code or a VS Code fork. Skip it for Codex or OpenClaw. Official notes: Cline OpenAI Compatible. Cline posts to /chat/completions.

Install — VS Code on macOS, Linux, or Windows
▸ code --install-extension saoudrizwan.claude-dev
Install — Cursor, only if you run Cline inside Cursor
▸ cursor --install-extension saoudrizwan.claude-dev
Optional Cline CLI — any OS with npm
▸ npm i -g cline
  1. Install the Cline extension with the command for your editor.
  2. Open Cline provider settings.
  3. Choose the OpenAI Compatible provider.
  4. Set API Base to https://api.ashna.ai/v1/api
  5. Paste the AshnaAI API key.
  6. Set Model to glm-5.3-flash or another catalog id.
  7. Send one Cline turn.

Continue

Use this section only if you want Continue. Skip it for Codex, OpenClaw, or Cline. Official notes: Continue OpenAI. Continue posts to /chat/completions.

Install — VS Code on macOS, Linux, or Windows
▸ code --install-extension continue.continue
Optional CLI — macOS and Linux
▸ curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bash
Optional CLI — Windows PowerShell
irm https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.ps1 | iex
Optional CLI — any OS with npm
▸ npm i -g @continuedev/cli
  1. Install the Continue extension with the VS Code CLI.
  2. Open the Continue model config.
  3. Add an OpenAI-compatible model.
  4. Set apiBase to https://api.ashna.ai/v1/api
  5. Set apiKey to your AshnaAI secret.
  6. Set model to glm-5.3-flash or another catalog id.
  7. Save and send one chat.

Try it now

HTTP reference: AshnaAI API docs and chat completions.

  1. Create a key in Account → API.
  2. Open only the section for Codex, OpenClaw, Cline, or Continue.
  3. Install that one tool, set https://api.ashna.ai/v1/api and send one turn.

Frequently asked questions

Do I need OpenClaw or Cline to use Codex with AshnaAI?
No. Codex CLI is standalone. Install only Codex, then set OPENAI_BASE_URL and OPENAI_API_KEY. Skip the OpenClaw, Cline, and Continue sections.
Which section should I follow?
Follow only the heading that matches the tool you already want: Codex CLI, OpenClaw, Cline, or Continue. Each section is a complete setup.
How do I install Codex CLI on macOS, Linux, or Windows?
macOS/Linux: curl -fsSL https://chatgpt.com/codex/install.sh | sh. Windows PowerShell: powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex". Then export OPENAI_BASE_URL=https://api.ashna.ai/v1/api and OPENAI_API_KEY.
What base URL do these harnesses share?
https://api.ashna.ai/v1/api Codex uses /responses. Cline and Continue use /chat/completions.
How do I install OpenClaw, Cline, or Continue?
OpenClaw: curl -fsSL https://openclaw.ai/install.sh | bash (or iwr on Windows). Cline: code --install-extension saoudrizwan.claude-dev. Continue: code --install-extension continue.continue. Install only the one you use.

Tags

#API#OpenClaw#Cline#Codex#developers

Found this article helpful? Share it with your network.