Chat API
Send a message, get a reply from the one model — with a full usage and cost breakdown.
POST https://stevai.com/api/v1/chatRequest headers
AuthorizationstringrequiredYour API key as a bearer token: Bearer sk_live_…. (Or use the x-api-key header instead.)
Content-Typestringrequiredapplication/json
Request body
messagestringrequiredThe prompt to send. 1–8000 characters.
regionstringoptionalWhere the request is processed. Defaults to global (best available). See regions below.
Regions
Pass one of these as region to pin where your data is processed:
global— default; routes to the best available region.eu-west— EU West (Brussels)eu-central— EU Central (Frankfurt)eu-north— EU North (Stockholm)uk— United Kingdom (London)us-east— US East (Virginia)
Example request
curl -X POST https://stevai.com/api/v1/chat \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"message": "Summarise the theory of relativity in one sentence.",
"region": "eu-west"
}'Response
replystringoptionalThe model's answer.
modelstringoptionalAlways stevai-default — there is one model.
regionstringoptionalThe region that actually processed the request (a global request resolves to a concrete region here).
usageobjectoptionalReal usage and cost for this request (see below).
The usage object
usage.tokensnumberoptionalTotal tokens (prompt + completion).
usage.computeMsnumberoptionalCompute time across the serving node(s), in milliseconds.
usage.nodesarrayoptionalWhich node(s) served the request, each with its compute time, power draw, and trust tier.
usage.electricityCostnumberoptionalElectricity cost of this request, in the given currency.
usage.internetCostnumberoptionalInternet cost of this request.
usage.costnumberoptionalWhat this request costs your account (electricity + internet + margin).
usage.currencystringoptionalCurrency of the cost fields, e.g. EUR.
{
"reply": "Space and time are relative to the observer's motion, and mass bends them.",
"model": "stevai-default",
"region": "eu-west",
"usage": {
"tokens": 54,
"computeMs": 2592.8,
"nodes": [
{ "id": "gcp-node-1", "name": "gcp-node-1", "computeMs": 2592.8, "watts": 300, "trust": "trusted" }
],
"electricityCost": 0.000065,
"internetCost": 0.000000009,
"cost": 0.000078,
"currency": "EUR"
}
}