Launch preview. EvaEsi has not launched. This guide describes the API workflow at launch; API accounts and keys are not available from this website. Contact Forlais about API access.
1. make a room and a key#
At launch, create a room and a key in the API portal. A room is one EvaEsi with its own memory, files and 1 GB of storage; rooms and keys are free. Creating a room needs a card on file, and requests draw on prepaid credit or the Developer plan's £5 a month.
Your key will look like: esi_dev_a1b2c3d4e5f6...
2. make your first request#
cURL
curl -X POST https://evaesi.dev/api/v1/responses \
-H "Authorization: Bearer esi_dev_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Explain quantum entanglement in simple terms.",
"level": "focus",
"max_output_rungs": 512
}'Python
import requests
response = requests.post(
"https://evaesi.dev/api/v1/responses",
headers={"Authorization": "Bearer esi_dev_YOUR_KEY"},
json={
"prompt": "Explain quantum entanglement in simple terms.",
"level": "focus",
"max_output_rungs": 512,
},
)
data = response.json()
print(data["content"])
print(f"Used {data['usage']['total_rungs']} rungs")JavaScript (Node.js)
const response = await fetch("https://evaesi.dev/api/v1/responses", {
method: "POST",
headers: {
"Authorization": "Bearer esi_dev_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "Explain quantum entanglement in simple terms.",
level: "focus",
max_output_rungs: 512,
}),
});
const data = await response.json();
console.log(data.content);
console.log(`Used ${data.usage.total_rungs} rungs`);3. read the response#
{
"request_id": "uuid",
"content": "Quantum entanglement is...",
"sources": [],
"sources_url": "/api/v1/sources/uuid",
"usage": {
"input_rungs": 52,
"output_rungs": 847,
"total_rungs": 899,
"regions_activated": null
},
"level": "focus"
}The documented response payload includes a sources_url field for retrieving sources, using the short same-origin path /api/v1/sources/{request_id}.
Response headers#
Successful non-stream responses emit usage and rate headers:
x-evaesi-input-rungs: 52
x-evaesi-output-rungs: 847
x-evaesi-total-rungs: 899
x-ratelimit-limit: 60
x-ratelimit-remaining: 59