What you will set up
Cursor talks OpenAI Chat Completions. You will install Cursor (desktop app and optional CLI), create one AshnaAI API key, paste it in Models, override the OpenAI base URL, then pick a catalog id. Desktop download: cursor.com/download. Models reference: Cursor Models. Claude Code uses Messages instead: How to use the AshnaAI API in Claude Code.
Step 1: Install Cursor (desktop app)
Most AshnaAI setup happens inside the Cursor editor under Settings → Models. Download the app for your platform first.
- Open cursor.com/download.
- Choose macOS, Windows, or Linux and download the installer.
- Run the installer and open Cursor once so Settings → Models is available.
- Use the AshnaAI API key from Step 3 in Settings → Models.
Step 2: Install the Cursor CLI (optional)
The Cursor CLI (binary name agent) runs the same agent from any terminal — useful for scripts, CI, or working outside the editor. Official install guide: Cursor CLI installation.
▸ curl https://cursor.com/install -fsS | bashirm 'https://cursor.com/install?win32=true'//cursor.com/install?win32=true' | iex▸ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc▸ source ~/.bashrc▸ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc▸ source ~/.zshrc▸ agent --version- The AshnaAI API override in Step 4 applies to Chat inside the Cursor editor.
- To update the CLI later, run agent update.
Step 3: Create an AshnaAI API key
Cursor stores this as the OpenAI API key in Settings → Models.
- Open Account → API.
- Choose Create key and name it Cursor.
- Copy the secret immediately. It is shown once.
- Keep it out of git, a gist, and a screenshot.
Step 4: Paste the key and override the base URL
Both fields must be set in the editor. The override is what routes Cursor Chat to AshnaAI.
- Open Cursor Settings → Models.
- Paste the secret into the OpenAI API Key field.
- Enable Override OpenAI Base URL.
- Set the URL to https://api.ashna.ai/v1/api
- Save. Do not drop /v1/api — that is the usual empty model list.
Step 5: Pick a catalog id and send a chat
Cursor lists ids from GET /v1/api/models and chats with POST /v1/api/chat/completions.
- Open the Chat model picker in Cursor.
- Choose glm-5.3-flash, or type another catalog id manually.
- Send one message to confirm the route works.
- If models are missing, restart Cursor once and recheck the base URL.
- Cursor does not always auto-discover every custom model from GET /models — typing the catalog id directly still works.
Fields that have to match
Paste these values. A typo on the base URL is the usual failure.
| Field | Value |
|---|---|
| CLI install (macOS/Linux) | curl https://cursor.com/install -fsS | bash |
| CLI install (Windows) | irm 'https://cursor.com/install?win32=true' | iex |
| OpenAI API Key | Bearer key from Account → API |
| Override OpenAI Base URL | https://api.ashna.ai/v1/api |
| Models | GET /v1/api/models |
| Chat | POST /v1/api/chat/completions |
Try it now
HTTP reference: AshnaAI API docs and chat completions. VS Code uses a Custom Endpoint instead: How to use the AshnaAI API in VS Code.
- Install Cursor and optionally the agent CLI.
- Create a key in Account → API.
- Set Override OpenAI Base URL to https://api.ashna.ai/v1/api and send one chat.
Mapped to Cursor download and CLI installation docs, Cursor Models Override OpenAI Base URL, and the public AshnaAI HTTP API (GET /v1/api/models, POST /v1/api/chat/completions).
Topics
Related
- AshnaAI for Work
- AshnaAI vs ChatGPT
- AshnaAI vs Claude
- Large Language Model (LLM)
- Foundation Model
- how to use the ashna ai api in claude code
- how to use the ashna ai api in vs code
- how to use the ashna ai api in openclaw cline and codex
- how to call any catalog model through the api
- ashna x1 task aware model routing
Try this in AshnaAI. Create a free account.
Found this article insightful?
Share it with fellow builders, founders, and AI practitioners.


