Documentation menu

Usage

Every request the environment's gateway served, as the usage log recorded it, and its analytics.

Records arrive shortly after the request ends. The analytics share one envelope: from and to; bucket and buckets when cut by time; group_by, the dimension of every group; series per bucket and group; groups per group over the range; omitted_groups, those left out; others, their per-bucket sum where figures add up; and total.

OperationMethodSDK
List usageGEThixel.usage.list
Get a usage seriesGEThixel.usage.series
Get usage totalsGEThixel.usage.totals
Get usage performanceGEThixel.usage.performance
Get usage errorsGEThixel.usage.errors
Get usage failuresGEThixel.usage.failures
Get guardrail activityGEThixel.usage.guardrails
Get key activityGEThixel.usage.keys
Get a usage recordGEThixel.usage.get
List limit crossingsGEThixel.limitCrossings.list
Summarize limit crossingsGEThixel.limitCrossings.summary
List the customers with the most limit crossingsGEThixel.limitCrossings.customers

List usage#

GET/v1/usagehixel.usage.list

A page of the requests the environment's gateway served, newest first. The filters combine, each exact; pass the same ones with each page's cursor.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.
request_idquerystringOnly the request with this id, as x-hixel-request-id returned it (req_…): at most one record.
fromquerystring (date-time)Only requests that started at or after this instant.
toquerystring (date-time)Only requests that started before this instant.
cursorquerystringThe next_cursor of the previous page, to read the next one; left out for the first page. Pass the same filters with it.
limitqueryintegerHow many items the page holds: an integer from 1 to 100; 50 when left out.

Response 200: UsageRecordList

FieldTypeDescription
data requiredarray of UsageRecord
data[].id requiredstringThe id of one recorded request (use_…); not its request id.
data[].request_id requiredstringThe request's id, as x-hixel-request-id returned it (req_…).
data[].organization_id requiredstringThe id of your organization (org_…).
data[].project_id requiredstringThe id of a project (proj_…).
data[].environment_id requiredstringThe id of an environment (env_…).
data[].key_id requiredstringThe key the request was made with.
data[].key_tags requiredarray of stringThe key's tags when the request was made.
data[].customer requiredstring | nullYour id for the customer the request named (x-hixel-customer); null for none.
data[].member requiredstring | nullYour id for the member the request named (x-hixel-member); null for none.
data[].provider required"openai" | "anthropic" | "azure" | "google" | "groq" | "mistral" | … | stringThe provider that answered; a value this list does not name yet may appear.
data[].api_shape required"openai_chat_completions" | "openai_responses" | "anthropic_messages" | string | nullThe wire format of a chat request; null for an endpoint beside chat.
data[].endpoint required"embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | "audio_translations" | … | string | nullThe endpoint beside chat the request was for; null for chat.
data[].endpoint_usage requiredobject | nullMedia tokens and units of an endpoint beside chat; null for chat.
data[].endpoint_usage.media_tokens requiredobject
data[].endpoint_usage.units requiredobject
data[].requested_model requiredstringThe model the request named, an alias perhaps.
data[].model requiredstringThe public model name that answered.
data[].upstream_model requiredstringThe provider's own name of the model.
data[].deployment_id requiredstringThe route of the model that answered.
data[].payer required"wallet" | "tenant" | "byok"Who paid: the customer's wallet, your account with the platform (tenant), or the customer's own provider key (byok).
data[].attempts requiredintegerUpstream calls made, retries and fallbacks included.
data[].stream requiredbooleanWhether the response was streamed.
data[].tokens requiredobject
data[].tokens.input requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
data[].tokens.cache_read requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
data[].tokens.cache_write_5m requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
data[].tokens.cache_write_1h requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
data[].tokens.output requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
data[].tokens.reasoning requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
data[].usage_completeness required"complete" | "partial" | "missing" | "truncated" | stringHow much of the usage the provider reported: complete, or partial, missing or truncated, whose cost is an estimate.
data[].cost_micros requiredstring | nullThe provider's cost before markup, as charged: the settlement's amount when the gateway settled the request (which may be the reservation's estimate, above the cost of the usage seen), else the priced usage. null without a price.
data[].billed_micros requiredstring | nullWhat the payer was charged, as cost_micros is; 0 for BYOK.
data[].usage_cost_micros requiredstring | nullThe cost of the usage the gateway saw, whatever was charged.
data[].usage_billed_micros requiredstring | nullWhat the usage the gateway saw bills, whatever was charged.
data[].upstream_status requiredintegerThe HTTP status the provider answered with.
data[].outcome required"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"How the response body ended.
data[].mocked requiredbooleanAnswered by the mock of a test environment: no provider was called.
data[].cache required"hit" | "miss" | nullhit or miss when the response cache applied; null when it did not.
data[].guardrails requiredobject
data[].guardrails.flagged requiredarray of string
data[].guardrails.masked requiredarray of string
data[].guardrails.blocked requiredstring | nullThe output rule that stopped the response.
data[].tags requiredarray of stringThe request's own tags (x-hixel-tags), in the order it gave them; empty when it sent none. They are metadata: they decided nothing about routing, the payer, limits or the price.
data[].client_token_id requiredstring | nullThe id of the client token the request came through; null for a request with a key.
data[].session_id requiredstring | nullThe realtime session the record belongs to (the request id of the session's handshake), shared by every response and input transcription of the session; null for any other.
data[].settlement requiredobject
data[].settlement.status required"untracked" | "settled" | "released" | "not_applied" | "failed"How the request's charge to the balance ended: settled (charged), released (no provider response; nothing charged), not_applied, failed (the gateway's balance could not be reached; the ledger posts it), or untracked (no wallet paid and no limit applied).
data[].settlement.basis required"usage" | "estimate" | string | nullWhat was charged: the usage seen or the estimate, for settled and failed.
data[].settlement.reason requiredstring | nullWhy the object did not apply it, for not_applied.
data[].started_at requiredstring (date-time)When the request arrived at the gateway.
data[].duration_ms requiredintegerHow long it took, in milliseconds.
next_cursor requiredstring | nullPass back as cursor for the next page; null on the last page.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_cursor: The cursor is not one this list gave.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get a usage series#

GET/v1/usage/serieshixel.usage.series

Requests, tokens, cost and billed amounts by bucket, grouped by one dimension: the 25 largest groups in series, the rest summed in others.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from, or 7 days by hour.
bucketquery"day" | "hour"How the range is cut: by UTC day (the default) or hour.
group_byquery"customer" | "member" | "model" | "key" | "tag" | "provider" | …What each bucket is grouped by; none for one total per bucket. By tag, a request counts in each of its tags' groups.
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.

Response 200: UsageSeries

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
bucket required"day" | "hour"How the range is cut: by UTC day or hour.
buckets requiredarray of stringEvery bucket of the range, oldest first, with requests or not.
group_by required"customer" | "member" | "model" | "key" | "tag" | "provider" | … | nullThe dimension of group; null when the call gave none: one row per bucket.
series requiredarray of objectBy bucket, then group (null first): the 25 groups that billed the most over the range (then most requests, then by name).
series[].bucket requiredstring (date-time)The start of the UTC day or hour.
series[].group requiredstring | nullThe customer (your id), member, model, key id, tag, provider, payer or outcome; null for requests that named none, and always without group_by.
series[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].tokens requiredobject
series[].tokens.input requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].tokens.cache_read requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].tokens.cache_write_5m requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].tokens.cache_write_1h requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].tokens.output requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].tokens.reasoning requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].cost_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
series[].billed_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
others requiredarray of objectPer bucket, the sum of the omitted groups; empty when none were. By tag, a request in several tags may count both in series and here.
others[].bucket requiredstring (date-time)The start of the UTC day or hour.
others[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].tokens requiredobject
others[].tokens.input requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].tokens.cache_read requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].tokens.cache_write_5m requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].tokens.cache_write_1h requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].tokens.output requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].tokens.reasoning requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
others[].cost_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
others[].billed_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/series?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get usage totals#

GET/v1/usage/totalshixel.usage.totals

One range's totals, and its split by payer; call it again with the previous range to compare.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from.
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.

Response 200: UsageTotals

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
group_by required"payer"groups is by payer.
groups requiredarray of objectBy payer, always all three in the order wallet, tenant, byok.
groups[].group required"wallet" | "tenant" | "byok"
groups[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].cost_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
groups[].billed_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.
total requiredobject
total.requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.tokens requiredobject
total.tokens.input requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.tokens.cache_read requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.tokens.cache_write_5m requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.tokens.cache_write_1h requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.tokens.output requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.tokens.reasoning requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.cost_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
total.billed_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
total.unpriced requiredstringRequests without a price: they add no money.
total.customers requiredstringDistinct customers among requests that named one.
total.members requiredstringDistinct members among requests that named one, counted per customer.
total.incomplete requiredstringRequests whose body did not complete.
total.upstream_errors requiredstringRequests the provider answered with a status of 400 or above.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/totals?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get usage performance#

GET/v1/usage/performancehixel.usage.performance

Latency percentiles (p50, p95, p99), retries, cache hits and streaming over the range: by bucket and group, per group, and in total.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from, or 7 days by hour.
bucketquery"day" | "hour"How the range is cut: by UTC day (the default) or hour.
group_byquery"model" | "provider"Group series and groups by model or provider; none for totals only.
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.

Response 200: UsagePerformance

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
bucket required"day" | "hour"How the range is cut: by UTC day or hour.
buckets requiredarray of stringEvery bucket of the range, oldest first, with requests or not.
group_by required"model" | "provider" | nullThe dimension of group; null when the call gave none.
series requiredarray of objectBy bucket, then group: the first 10 groups of groups (percentiles do not add up, so there is no others).
series[].bucket requiredstring (date-time)The start of the UTC day or hour.
series[].group requiredstring | nullThe model or provider; always null without group_by.
series[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].mocked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].p50_ms requiredinteger | null
series[].p95_ms requiredinteger | null
series[].p99_ms requiredinteger | null
series[].retried requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].attempts requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].cache_hits requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].cache_misses requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].streamed requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups requiredarray of objectPer model or provider over the range, most requests first (then by name), at most 50; empty without group_by.
groups[].group requiredstring
groups[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].mocked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].p50_ms requiredinteger | null
groups[].p95_ms requiredinteger | null
groups[].p99_ms requiredinteger | null
groups[].retried requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].attempts requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].cache_hits requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].cache_misses requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].streamed requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.
total requiredobject
total.requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.mocked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.p50_ms requiredinteger | null
total.p95_ms requiredinteger | null
total.p99_ms requiredinteger | null
total.retried requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.attempts requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.cache_hits requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.cache_misses requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.streamed requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/performance?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get usage errors#

GET/v1/usage/errorshixel.usage.errors

How requests ended over the range, by bucket and outcome or upstream status class, and the requests guardrails blocked.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from, or 7 days by hour.
bucketquery"day" | "hour"How the range is cut: by UTC day (the default) or hour.
group_by requiredquery"outcome" | "status_class"Group by how the body ended (outcome) or the upstream status_class.
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.

Response 200: UsageErrors

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
bucket required"day" | "hour"How the range is cut: by UTC day or hour.
buckets requiredarray of stringEvery bucket of the range, oldest first, with requests or not.
group_by required"outcome" | "status_class"The dimension of group: how the body ended, or the upstream status class.
series requiredarray of objectEvery request by bucket and group, completed ones included.
series[].bucket requiredstring (date-time)The start of the UTC day or hour.
series[].group requiredstringThe outcome (completed, aborted, …) or status class (2xx, 4xx, 5xx, other).
series[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups requiredarray of objectEvery group over the range, in the order of its values.
groups[].group requiredstring
groups[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.
total requiredobject
total.requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.guardrail_blocked requiredstringRequests whose response a guardrail rule stopped.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/errors?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z&group_by=outcome" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get usage failures#

GET/v1/usage/failureshixel.usage.failures

The kinds of failed request over the range (provider, model, upstream status and outcome), most frequent first.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from.
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.

Response 200: UsageFailures

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
group_by required"failure"group is a kind of failure: its provider, model, upstream status and outcome.
groups requiredarray of objectThe kinds of failed request (not completed, or a status of 400 or above), most requests first, then latest first; at most 50.
groups[].group requiredobject
groups[].group.provider requiredstring
groups[].group.model requiredstring
groups[].group.upstream_status requiredintegerThe HTTP status the provider answered.
groups[].group.outcome required"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"How the response body ended.
groups[].requests requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].last_seen_at requiredstring (date-time)When the latest of them started.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/failures?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get guardrail activity#

GET/v1/usage/guardrailshixel.usage.guardrails

The requests each guardrail rule flagged, masked or blocked, by bucket.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from, or 7 days by hour.
bucketquery"day" | "hour"How the range is cut: by UTC day (the default) or hour.
customerquerystringOnly requests that named this customer, by your id for it.
memberquerystringOnly requests that named this member, by your id for it.
modelquerystringOnly requests this public model name answered.
key_idquerystringOnly requests made with this key (key_…).
tagquerystringOnly requests that carried this tag.
payerquery"wallet" | "tenant" | "byok"Only requests this payer paid.
outcomequery"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"Only requests whose body ended this way.
endpointquery"chat" | "embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | …Only requests for this: chat, or the endpoint beside chat.
session_idquerystringOnly the records of this realtime session.

Response 200: GuardrailActivity

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
bucket required"day" | "hour"How the range is cut: by UTC day or hour.
buckets requiredarray of stringEvery bucket of the range, oldest first, with requests or not.
group_by required"rule"group is a guardrail rule's id.
series requiredarray of objectThe rules of groups by bucket, then rule id; buckets without action left out.
series[].bucket requiredstring (date-time)The start of the UTC day or hour.
series[].group requiredstring
series[].flagged requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].masked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
series[].blocked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups requiredarray of objectThe rules that acted the most over the range (flagged + masked + blocked, then by id), at most 64.
groups[].group requiredstring
groups[].flagged requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].masked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].blocked requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.
total requiredobject
total.requests requiredstringRequests at least one rule acted on, each once however many rules did.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/guardrails?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get key activity#

GET/v1/usage/keyshixel.usage.keys

When each key of the environment was last used, and its requests in the range (at most 92 days).

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from.

Response 200: KeyActivity

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
group_by required"key"group is a key's id (key_…).
groups requiredarray of objectThe keys that made a request ever (revoked and expired ones included), most recently used first, at most 200. A key missing here was never used.
groups[].group requiredstringThe id of a key (key_…); never the key itself.
groups[].last_used_at requiredstring (date-time)When the key's latest request ever started, in the range or not.
groups[].requests requiredstringIts requests in the range.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/keys?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get a usage record#

GET/v1/usage/{id}hixel.usage.get

One recorded request, by the record's own id (use_…).

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
id requiredpathstringThe record's id (use_…), not the request id: GET /v1/usage?request_id= finds a record by that.

Response 200: UsageRecord

FieldTypeDescription
id requiredstringThe id of one recorded request (use_…); not its request id.
request_id requiredstringThe request's id, as x-hixel-request-id returned it (req_…).
organization_id requiredstringThe id of your organization (org_…).
project_id requiredstringThe id of a project (proj_…).
environment_id requiredstringThe id of an environment (env_…).
key_id requiredstringThe key the request was made with.
key_tags requiredarray of stringThe key's tags when the request was made.
customer requiredstring | nullYour id for the customer the request named (x-hixel-customer); null for none.
member requiredstring | nullYour id for the member the request named (x-hixel-member); null for none.
provider required"openai" | "anthropic" | "azure" | "google" | "groq" | "mistral" | … | stringThe provider that answered; a value this list does not name yet may appear.
api_shape required"openai_chat_completions" | "openai_responses" | "anthropic_messages" | string | nullThe wire format of a chat request; null for an endpoint beside chat.
endpoint required"embeddings" | "image_generations" | "image_edits" | "audio_speech" | "audio_transcriptions" | "audio_translations" | … | string | nullThe endpoint beside chat the request was for; null for chat.
endpoint_usage requiredobject | nullMedia tokens and units of an endpoint beside chat; null for chat.
endpoint_usage.media_tokens requiredobject
endpoint_usage.media_tokens.image_input_tokens requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.media_tokens.image_output_tokens requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.media_tokens.audio_input_tokens requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.media_tokens.audio_output_tokens requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.media_tokens.audio_cache_read_tokens requiredstringCached audio and image input tokens, apart from the uncached: realtime only.
endpoint_usage.media_tokens.image_cache_read_tokens requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.units requiredobject
endpoint_usage.units.images requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.units.image_size requiredstring | null"1024x1536", when known.
endpoint_usage.units.image_quality requiredstring | null
endpoint_usage.units.audio_millis requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.units.input_characters requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
endpoint_usage.units.search_units requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
requested_model requiredstringThe model the request named, an alias perhaps.
model requiredstringThe public model name that answered.
upstream_model requiredstringThe provider's own name of the model.
deployment_id requiredstringThe route of the model that answered.
payer required"wallet" | "tenant" | "byok"Who paid: the customer's wallet, your account with the platform (tenant), or the customer's own provider key (byok).
attempts requiredintegerUpstream calls made, retries and fallbacks included.
stream requiredbooleanWhether the response was streamed.
tokens requiredobject
tokens.input requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
tokens.cache_read requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
tokens.cache_write_5m requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
tokens.cache_write_1h requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
tokens.output requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
tokens.reasoning requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
usage_completeness required"complete" | "partial" | "missing" | "truncated" | stringHow much of the usage the provider reported: complete, or partial, missing or truncated, whose cost is an estimate.
cost_micros requiredstring | nullThe provider's cost before markup, as charged: the settlement's amount when the gateway settled the request (which may be the reservation's estimate, above the cost of the usage seen), else the priced usage. null without a price.
billed_micros requiredstring | nullWhat the payer was charged, as cost_micros is; 0 for BYOK.
usage_cost_micros requiredstring | nullThe cost of the usage the gateway saw, whatever was charged.
usage_billed_micros requiredstring | nullWhat the usage the gateway saw bills, whatever was charged.
upstream_status requiredintegerThe HTTP status the provider answered with.
outcome required"completed" | "aborted" | "upstream_error" | "truncated" | "stream_error"How the response body ended.
mocked requiredbooleanAnswered by the mock of a test environment: no provider was called.
cache required"hit" | "miss" | nullhit or miss when the response cache applied; null when it did not.
guardrails requiredobject
guardrails.flagged requiredarray of string
guardrails.masked requiredarray of string
guardrails.blocked requiredstring | nullThe output rule that stopped the response.
tags requiredarray of stringThe request's own tags (x-hixel-tags), in the order it gave them; empty when it sent none. They are metadata: they decided nothing about routing, the payer, limits or the price.
client_token_id requiredstring | nullThe id of the client token the request came through; null for a request with a key.
session_id requiredstring | nullThe realtime session the record belongs to (the request id of the session's handshake), shared by every response and input transcription of the session; null for any other.
settlement requiredobject
settlement.status required"untracked" | "settled" | "released" | "not_applied" | "failed"How the request's charge to the balance ended: settled (charged), released (no provider response; nothing charged), not_applied, failed (the gateway's balance could not be reached; the ledger posts it), or untracked (no wallet paid and no limit applied).
settlement.basis required"usage" | "estimate" | string | nullWhat was charged: the usage seen or the estimate, for settled and failed.
settlement.reason requiredstring | nullWhy the object did not apply it, for not_applied.
started_at requiredstring (date-time)When the request arrived at the gateway.
duration_ms requiredintegerHow long it took, in milliseconds.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_params: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404
    • usage_event_not_found: The resource does not exist in the key's environment; a resource outside it reads the same.
    • environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/usage/use_123" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

List limit crossings#

GET/v1/limit_crossingshixel.limitCrossings.list

A page of the environment's limit crossings, newest first: each request the gateway refused at a spend limit or because a wallet could not cover it.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
customerquerystringOnly this customer's crossings, by your id for it.
limit_typequery"spend_limit" | "insufficient_credits"Only crossings of this kind.
fromquerystring (date-time)Only crossings at or after this instant.
toquerystring (date-time)Only crossings before this instant.
cursorquerystringThe next_cursor of the previous page, to read the next one; left out for the first page. Pass the same filters with it.
limitqueryintegerHow many items the page holds: an integer from 1 to 100; 50 when left out.

Response 200: LimitCrossingList

FieldTypeDescription
data requiredarray of LimitCrossing
data[].id requiredstring
data[].customer requiredstring | null
data[].customer_name requiredstring | null
data[].member requiredstring | null
data[].key_id requiredstring | null
data[].limit_type required"spend_limit" | "insufficient_credits"
data[].limit_id requiredstring | null
data[].request_id requiredstring
data[].reached_at requiredstring (date-time)
next_cursor requiredstring | nullPass back as cursor for the next page; null on the last page.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_cursor: The cursor is not one this list gave.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/limit_crossings" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Summarize limit crossings#

GET/v1/limit_crossings/summaryhixel.limitCrossings.summary

Limit crossings by bucket and limit type over the range (at most 92 days; 7 by hour), and in total.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from, or 7 days by hour.
bucketquery"day" | "hour"How the range is cut: by UTC day (the default) or hour.
customerquerystringOnly this customer's crossings, by your id for it.
limit_typequery"spend_limit" | "insufficient_credits"Only crossings of this kind.

Response 200: LimitCrossingSummary

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
bucket required"day" | "hour"How the range is cut: by UTC day or hour.
buckets requiredarray of stringEvery bucket of the range, oldest first, with requests or not.
group_by required"limit_type"group is the kind of limit.
series requiredarray of objectBy bucket, then limit type (spend_limit first); empty buckets left out.
series[].bucket requiredstring (date-time)The start of the UTC day or hour.
series[].group required"spend_limit" | "insufficient_credits"
series[].crossings requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups requiredarray of objectBoth limit types over the range, spend_limit first.
groups[].group required"spend_limit" | "insufficient_credits"
groups[].crossings requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.
total requiredobject
total.crossings requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
total.key_crossings requiredstringCrossings of a key's own limit.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/limit_crossings/summary?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

List the customers with the most limit crossings#

GET/v1/limit_crossings/customershixel.limitCrossings.customers

The customers whose requests were refused at a limit the most over the range (at most 92 days).

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from.
limit_typequery"spend_limit" | "insufficient_credits"Only crossings of this kind.

Response 200: LimitCrossingCustomers

FieldTypeDescription
from requiredstring (date-time)The start of the range, inclusive.
to requiredstring (date-time)The end of the range, exclusive.
group_by required"customer"group is a customer, by your id.
groups requiredarray of objectThe customers with the most crossings (both types together, then by id), at most 50. Keys' own limits are not here.
groups[].group requiredstringYour id for the customer (its external_id), as every path takes it.
groups[].customer_name requiredstring | null
groups[].spend_limit requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
groups[].insufficient_credits requiredstringAn exact integer as a decimal string, such as "1250": never a JSON number, which cannot hold every integer exactly.
omitted_groups requiredintegerGroups left out of groups and series; 0 when none.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_range: from must be before to, and a summary covers at most 92 days (7 days by hour).
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/limit_crossings/customers?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"