How to use the AshnaAI API in Cursor
Create an AshnaAI API key, open Cursor Settings → Models, paste the key, then set Override OpenAI Base URL to https://api.ashna.ai/v1/api. Chat uses POST /chat/completions.
AshnaAI

What you will set up
Cursor talks OpenAI Chat Completions. You will create one key, paste it in Models, override the OpenAI base URL, then pick a catalog id. Official notes: Cursor Models. Claude Code uses Messages instead: How to use the AshnaAI API in Claude Code.
Step 1: Create an AshnaAI API key
Cursor stores this as the OpenAI API key.
- 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 2: Open Cursor Models
This is the panel that holds the OpenAI override.
- Open Cursor Settings.
- Go to Models.
- Stay on that page for the next two fields.
Step 3: Paste the key and override the base URL
Both fields must be set. The override is what routes Cursor to AshnaAI.
- 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 4: 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.
- Choose glm-5.3-flash, or type another catalog id.
- Send one message.
- If the new row is missing, restart Cursor once and check the base URL again.
Fields that have to match
Paste these values. A typo on the base URL is the usual failure.
| Field | Value |
|---|---|
| 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 |
| Example model id | glm-5.3-flash |
Try it now
HTTP notes: AshnaAI API docs and chat completions. VS Code uses a Custom Endpoint instead: How to use the AshnaAI API in VS Code.
- Create a key in Account → API.
- Set Override OpenAI Base URL to https://api.ashna.ai/v1/api
- Send one chat with glm-5.3-flash.
Frequently asked questions
- What OpenAI base URL does Cursor need?
- https://api.ashna.ai/v1/api Include /v1/api. Cursor then calls GET /models and POST /chat/completions.
- Does Cursor use the Responses API?
- No. Cursor’s override posts Chat Completions. Codex uses POST /responses. Claude Code uses Messages.
- Why is GET /models empty or 401?
- 401 is a missing or truncated key. An empty list usually means the override dropped /v1/api. Confirm the key in Account → API.
- Can I type a model id Cursor did not list?
- Yes. Enter any catalog or custom-agent id. Unknown ids still pass through.
- Is this the same as VS Code?
- Same API, different UI. VS Code uses Language Models → Custom Endpoint. Walkthrough: How to use the AshnaAI API in VS Code.
Tags
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 helpful? Share it with your network.