Docs/API

The API

What the API is, where it lives, and what is on it.

Checked against the code on

The askr API is the OpenAI chat completions API with a different base URL and key. Anything that speaks that shape works: Cursor, Continue, Aider, the OpenAI SDKs, LangChain, or a curl command. The surface is deliberately small.

Base URL
https://heyaskr.ai/v1
Auth
Authorization: Bearer askr_live_...
Format
JSON in, JSON out; server-sent events when stream: true
Money
Credits. One dollar is 1,000 credits. Every response says what it cost.

The three endpoints

MethodPathWhat it does
GET/v1Connection check. Your balance and the key in use. Detail
GET/v1/modelsEvery chat model you can call, in the shape the OpenAI SDKs expect. Detail
POST/v1/chat/completionsThe one that does the work. Streaming and non-streaming. Detail

What is not on it

Video runs in the workspace on its own endpoint and is not on the API yet. Audio and embedding models are refused. There are no images, files, assistants, fine-tuning or responses endpoints. Pictures come from chat models that answer with an image, in message.images. The full list, with where each item sits on the roadmap, is on What is not on the API yet.

Where it differs from OpenAI

The request and response shapes match. There are four deliberate differences, and Differences from OpenAI lists them. The one you will use: askr.credits_charged on every response.

Browsers

The API sends no CORS headers, so a web page on another origin cannot call it directly, and it should not: a key in front-end code is a key anyone can spend. Call it from your server, a CLI, a desktop tool or a script.