Guide

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

Create one AshnaAI API key, set the base URL to https://api.ashna.ai/v1/api, then follow the steps for OpenClaw, Cline, Continue, or Codex. Match /chat/completions, /v1/messages, or /responses.

AshnaAI

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

What you will set up

Every tool on this page uses the same key and the same base URL. Only the path changes. Cursor and VS Code have their own click paths: How to use the AshnaAI API in Cursor and How to use the AshnaAI API in VS Code.

Step 1: Create an AshnaAI API key

Create the key once. Reuse it for OpenClaw, Cline, Continue, and Codex.

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

Step 2: Choose the path your tool already uses

Set the base to https://api.ashna.ai/v1/api Then use the path the harness already posts to. The wrong path is the usual 404.

Protocol paths for coding harnesses
HarnessPath
Cline, Continue, OpenClaw openai-completions/chat/completions
OpenClaw anthropic-messages/v1/messages
Codex CLI, OpenClaw openai-responses/responses
AshnaAI HTTP API z.ai/blog/glm-5.3-flash

Step 3: OpenClaw

Official notes: OpenClaw providers.

  1. Open the OpenClaw provider settings.
  2. Set the provider base to https://api.ashna.ai/v1/api
  3. Paste the key from Step 1.
  4. Pick openai-completions, anthropic-messages, or openai-responses.
  5. Send one turn. openai-completions hits /chat/completions. anthropic-messages hits /v1/messages. openai-responses hits /responses.

Step 4: Cline

Official notes: Cline OpenAI Compatible.

  1. Open Cline provider settings.
  2. Choose the OpenAI Compatible provider.
  3. Set API Base to https://api.ashna.ai/v1/api
  4. Paste the API Key from Step 1.
  5. Set Model to glm-5.3-flash or another catalog id.
  6. Send one Cline turn. Cline posts to /chat/completions.

Step 5: Continue

Official notes: Continue OpenAI.

  1. Open the Continue model config.
  2. Add an OpenAI-compatible model.
  3. Set apiBase to https://api.ashna.ai/v1/api
  4. Set apiKey to the secret from Step 1.
  5. Set model to glm-5.3-flash or another catalog id.
  6. Save and send one chat. Continue posts to /chat/completions.

Step 6: Codex CLI

Official notes: Codex CLI.

  1. Open the shell that launches Codex.
  2. Export OPENAI_BASE_URL=https://api.ashna.ai/v1/api
  3. Export OPENAI_API_KEY=<the secret from Step 1>.
  4. Start Codex from that same shell.
  5. Send one turn. Codex posts to /v1/api/responses, not /chat/completions.

Try it now

HTTP notes: AshnaAI API docs and chat completions.

  1. Create a key in Account → API.
  2. Set the base URL to https://api.ashna.ai/v1/api
  3. Follow the step for your harness and send one turn on the matching path.

Frequently asked questions

What base URL do these harnesses share?
https://api.ashna.ai/v1/api The path after that prefix is /chat/completions, /responses, or /v1/messages.
Which OpenClaw modes work?
openai-completions, anthropic-messages, and openai-responses. Same host and key. Notes: docs.openclaw.ai/providers.
How do I add Cline?
OpenAI Compatible provider. API Base https://api.ashna.ai/v1/api API Key from Account → API. Model glm-5.3-flash or another catalog id.
How do I add Continue?
OpenAI-compatible model: apiBase https://api.ashna.ai/v1/api apiKey from Account → API, model set to a catalog id.
How do I point Codex CLI at AshnaAI?
Export OPENAI_BASE_URL=https://api.ashna.ai/v1/api and OPENAI_API_KEY. Codex posts to /responses, not /chat/completions.

Tags

#API#OpenClaw#Cline#Codex#developers

Found this article helpful? Share it with your network.