Chat API

Send a message, get a reply from the one model — with a full usage and cost breakdown.

endpoint
POST https://stevai.com/api/v1/chat

Request headers

Authorizationstringrequired

Your API key as a bearer token: Bearer sk_live_…. (Or use the x-api-key header instead.)

Content-Typestringrequired

application/json

Request body

messagestringrequired

The prompt to send. 1–8000 characters.

regionstringoptional

Where 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
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

replystringoptional

The model's answer.

modelstringoptional

Always stevai-default — there is one model.

regionstringoptional

The region that actually processed the request (a global request resolves to a concrete region here).

usageobjectoptional

Real usage and cost for this request (see below).

The usage object

usage.tokensnumberoptional

Total tokens (prompt + completion).

usage.computeMsnumberoptional

Compute time across the serving node(s), in milliseconds.

usage.nodesarrayoptional

Which node(s) served the request, each with its compute time, power draw, and trust tier.

usage.electricityCostnumberoptional

Electricity cost of this request, in the given currency.

usage.internetCostnumberoptional

Internet cost of this request.

usage.costnumberoptional

What this request costs your account (electricity + internet + margin).

usage.currencystringoptional

Currency of the cost fields, e.g. EUR.

200 response
{
  "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"
  }
}