Every request goes to one endpoint, POST /api/v1/responses. You choose a model, send a prompt, and get an answer back along with the evidence behind it. There is an older /api/v1/chat route that still works, but it exists so that integrations written against it keep running. Use responses for anything new.
Rungs
EvaEsi measures and bills in rungs. One rung is one character of output. That is the whole rule.
Most platforms bill in tokens, which puts a tokeniser between your text and your invoice, deciding what your words were worth. Two sentences of the same length can cost different amounts and you cannot tell which until the bill arrives. Rungs remove that step. An answer of 2,000 characters is 2,000 rungs before the model multiplier, so you can work out what a request cost by counting.
Each model carries a multiplier that reflects how hard it works, set per model and per plan, and the rungs you are charged are the output characters times that multiplier. API usage is different again: it is priced per million characters and charged in both directions, which is why the usage API reports what you sent and what came back separately. Pricing has every figure.
Two kinds of route
There are two sets of routes and it is worth knowing which you are looking at, because they authenticate differently.
Routes under /api/v1 are for your code. They take an API key in an Authorization header, and they are what the rest of these pages describe.
Routes under /v1 belong to the browser console and use a signed in session instead of a key. You will not call those directly. They are what the console uses when it opens.
Base URL and keys
The base URL is https://evaesi.dev. Send your key as a bearer token on every request.
Authorization: Bearer esi_dev_YOUR_KEYKeys are not being issued yet. When the console opens you will create them there, and authentication covers how they are scoped and rotated.
What you can call
| Endpoint | What it does |
|---|---|
POST /api/v1/responses | Ask a model something. Set stream to get the answer as it is written. |
GET /api/v1/sources/{request_id} | Fetch the evidence behind an answer you already have. |
GET /api/v1/models | Every model, its limits, and whether it is available now. |
GET /api/v1/usage | What you have spent this billing period. |
GET /api/v1/usage/history | Earlier billing periods, newest first. |
GET /api/v1/limits | Your rate limits and how much allowance is left. |
POST /api/v1/batch | Submit many requests at once. Not open yet. |
Where to start
- Quickstart gets you a working request in a few minutes.
- Models explains what each one is for and what it costs.
- Responses API is the full reference for the endpoint everything runs through.
- Errors is worth reading before you need it.