Guide

How to use the AshnaAI API in VS Code

Create an AshnaAI API key, then add a Custom Endpoint in VS Code Language Models. Chat and agent turns use the OpenAI-compatible catalog: paste the Bearer key, set the base URL to https://api.ashna.ai/v1/api, and pick a catalog id such as glm-5.3-flash.

AshnaAI

How to use the AshnaAI API in VS Code

Key Takeaways

  • Someone using catalog models from VS Code Chat first creates a Bearer key in Account → API.
  • VS Code Language Models → Add Models → Custom Endpoint is the click path. The provider base URL is https://api.ashna.ai/v1/api so model discovery hits GET /v1/api/models.
  • The same model field used in curl works in the editor: glm-5.3-flash, another catalog id, or a custom agent id.

Watch the VS Code setup

The clip below is the Language Models overlay in VS Code: Add Models is the control that starts a Custom Endpoint. Someone who already has a key can follow the clicks, then return here for the exact URL and model id.

VS Code Language Models editor: Add Models opens the Custom Endpoint path.

Step 1: Create an AshnaAI API key

The editor needs a Bearer token before it can list or call catalog models. Open Account → API. Create key asks for a name—VS Code is enough. The secret is shown once. It is sent as Authorization: Bearer. It does not belong in git, a gist, or a recorded screen.

Step 2: Open Language Models in VS Code

In the Chat view, open the model picker and choose Manage Language Models. The Command Palette command is Chat: Manage Language Models. The Language Models editor opens as a modal over the editor—the same overlay as the video. Official notes: AI language models in VS Code.

Step 3: Add a Custom Endpoint

Select Add Models, then Custom Endpoint. That provider is the OpenAI-compatible path. Group name: AshnaAI. API type: chat-completions. Base URL: https://api.ashna.ai/v1/api Paste the key into the secret field VS Code stores locally.

When the provider URL is https://api.ashna.ai/v1/api model discovery uses GET /v1/api/models—the same list as How to call any catalog model through the API. A model can also be written by hand in chatLanguageModels.json with vendor customendpoint, id glm-5.3-flash, and url https://api.ashna.ai/v1/api/chat/completions

Step 4: Pick a catalog id

After the provider saves, the Chat model picker lists the catalog rows VS Code discovered. glm-5.3-flash is the usual coding pin. Other ids work the same way: change only the model string. Confirm ids on model and agent ids or list models.

Tool-calling models stay available for agent chat. If a newly added row does not appear, Microsoft’s docs say restart VS Code once.

Fields that have to match

These are the values the Custom Endpoint must send. A typo on the base URL is the usual failure: https://api.ashna.ai without /v1/api points at the wrong path.

AshnaAI Custom Endpoint fields for VS Code Language Models
FieldValue
ProviderCustom Endpoint
Group nameAshnaAI
API typechat-completions
Base URLhttps://api.ashna.ai/v1/api
AuthBearer key from Account → API
Example model idglm-5.3-flash
Completions URLhttps://api.ashna.ai/v1/api/chat/completions
AshnaAI HTTP API plus VS Code Custom Endpoint provider fields www.ashna.ai/api-docs

Try it now

Create a key in Account → API, then add the Custom Endpoint in VS Code. HTTP examples live on AshnaAI API docs and chat completions. To try Flash in the product UI first, open GLM-5.3-Flash in chat.

Sourcing & Methodology

Mapped to the public AshnaAI HTTP API (Account → API keys, GET /v1/api/models, POST /v1/api/chat/completions) and the VS Code Language Models editor Custom Endpoint provider documented by Microsoft.

Topics

#API#VS Code#developers#Language Models

Found this article insightful?

Share it with fellow builders, founders, and AI practitioners.

Frequently asked questions

Everything You Need to Know

Open Account → API, choose Create key, give it a name, and copy the secret. That string is the Bearer token. Do not put it in a public repo or a screenshot.

Chat: Manage Language Models. The same editor opens from the gear on the Chat model picker. The walkthrough video on this page shows Add Models on that overlay.

Yes. After the Custom Endpoint is saved, pick glm-5.3-flash in the Chat model picker. The same id works in curl. Product chat pin: app.ashna.ai/chat?agent=glm-5.3-flash.

Microsoft’s Language Models docs say Bring Your Own Key works for chat without a Copilot plan. Some editor features still expect a GitHub account. The AshnaAI route is the Custom Endpoint, not a Copilot SKU.

Continue ReadingView all

Related Articles & Guides