ULTINEO

AI token usage and pricing

This resource reports what your AI project used in the current billing week and what it amounts to. Runs are measured in tokens and priced per token: there is no plan, no allowance and no pack, so a run is never refused for usage.

Endpoints

MethodPathScope
GET/v1/ai/run-usage/summaryusage:read

The endpoint takes no parameters.

Read the summary

curl
curl https://api.ultineo.com/v1/ai/run-usage/summary \
  -H "Authorization: Bearer sk-project-YOUR_KEY"
application/json
{
  "code": 200,
  "title": "OK",
  "response": {
    "object": "usage",
    "period": { "start": 1794182400, "end": 1794787199 },
    "price": { "currency": "EUR", "unit": 1000000, "input": 1, "output": 5 },
    "tokens": { "input": 842000, "output": 311500, "used": 1153500, "available": 2000000000 },
    "amount": 2.4,
    "runs": { "total": 1840, "finished": 1795, "failed": 31, "pending": 14 }
  }
}

The usage object

FieldTypeDescription
objectstringAlways usage.
periodobjectThe billing week the figures cover.
priceobjectThe price per token.
tokensobjectThe tokens used in the period.
amountnumberThe tokens of the period at the price, in the price's currency.
runsobjectRun totals of your project.

period

FieldTypeDescription
startintegerMonday 00:00:00 UTC of the current week, in Unix seconds.
endintegerSunday 23:59:59 UTC of the current week, in Unix seconds.

price

FieldTypeDescription
currencystringEUR. Prices exclude VAT.
unitintegerThe number of tokens the two prices apply to: 1000000.
inputnumberPrice of unit input tokens.
outputnumberPrice of unit output tokens.

tokens

FieldTypeDescription
inputintegerInput tokens of the period's runs.
outputintegerOutput tokens of the period's runs.
usedintegerinput plus output.
availableintegerA constant, far above any usage. Kept for clients written when an allowance existed; do not build on it.

Runs that ended in an error are left out of the three counts and of amount.

runs

FieldTypeDescription
totalintegerEvery run your project has ever launched.
finishedintegerRuns that completed.
failedintegerRuns that ended in an error.
pendingintegerRuns still queued or in progress.

These four are totals over your project's whole life, not figures for the current week.