Documentation
LLM endpoints
View .mdOpenAPI

Read an endpoint's usage

GEThttps://weights.fyi/run/v1/endpoints/{endpoint}/usagescope: read
text
GET https://weights.fyi/run/v1/endpoints/<endpoint>/usage
Authorization: Bearer <token>                    scope: read
Available since
2026-10-10 implementation review: the endpoint API is built; runtime availability follows the model catalog. No LLM chat model is available on this service yet.
Answer time
synchronous: read from the service's records at the moment of the call.

What your endpoint has done and cost: its calls by how they ended, the tokens charged (prompt, cached, output) and the charge of each, in total and per UTC day, the runs its calls landed in, and the prices a call admitted now keeps. Each call that ends with its answer is charged once, as it ends, so final is true whenever no call is in flight.

You are charged per token, never for the time the endpoint is ready. A call carried across a move is charged on your own prompt and every answer token you received: its usage counts both readings of your conversation, the bill only yours.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with read.
endpointpathyesThe endpoint's id.

Return value

200 OK.

FieldMeaning
id, modelThe endpoint and its model.
requestsCalls answered or refused after they were admitted.
by_outcomeCalls by how they ended: completed, cut, refused, failed.
prompt_tokens, cached_tokens, completion_tokensThe tokens charged: your prompts (cached included), the part read from the cache, the answers.
charges_usd_microsTheir charges by part, prompt, cached and output, in millionths of a dollar.
usd_microsThe total charged.
finaltrue while no call is in flight.
daysPer UTC day: day, requests (charged calls), the same tokens, charges_usd_micros and usd_micros.
runsEach run your calls were charged in: started_at, ended_at, usd_micros, final.
pricesThe prices per 1M tokens now: usd_per_1m_prompt_tokens, usd_per_1m_cached_tokens, usd_per_1m_cache_write_tokens, usd_per_1m_output_tokens, and basis.
basisHow a call is charged, in words.

Errors

StatusCodeWhen it happensWhat to do
404endpoint_not_foundNo endpoint of yours has that id.Check the id.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks read, or the account is suspended.Use a token with read.
429rate_limitedThe token sends calls faster than its request rate.Wait the Retry-After seconds.

Examples

sh
curl -s https://weights.fyi/run/v1/endpoints/ENDPOINT_ID/usage -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
{"id": "ep_5b1e0c7d2a9f4e6b8c3d", "requests": 41, "prompt_tokens": 902140, "cached_tokens": 766800, "completion_tokens": 30212,
 "charges_usd_micros": {"prompt": 12323, "cached": 17455, "output": 52001}, "usd_micros": 81779, "final": true}

The answer is shortened here; the figures are an illustration.

History

  • Built 2026-10-09; implementation reviewed 2026-10-10. Runtime availability follows the model catalog.
  • 2026-10-10: charged per token as each call ends; the time ready is no longer charged.

See also

GET /v1/usage, Prices and billing.