Get OpenRouter Usage

Beta
GET/v1/settings/integrations/openrouter/usage

This endpoint is idempotent. Learn more

Returns what the account has spent through its OpenRouter integration today, this week, this month and in total, with its monthly spend limit.

Spend is read live from OpenRouter for the integration's API key. Fails with 404 if the account has no OpenRouter integration, and with 400 if OpenRouter rejects the stored key.

Role type requiredValues:admin
Only API keys or agents whose role has this type can call this endpoint.
objectstringenumValues:openrouter_usage

Resource type identifier.

spent_todayobject

Spent today.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

spent_this_weekobject

Spent this week.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

spent_this_monthobject

Spent this month, which is what monthly_spend_limit is measured against.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

spent_totalobject

Spent since the API key was created.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

monthly_spend_limitobjectnullable

The integration's monthly spend limit, or null for no limit.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

monthly_spend_remainingobjectnullable

What is left of monthly_spend_limit this month, never below zero, or null when there is no limit.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

key_limitobjectnullable

The credit limit set on the API key in OpenRouter itself, or null when the key has none.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

key_limit_remainingobjectnullable

What is left of key_limit, or null when the key has no limit.

amountstring (decimal)

Decimal amount, as a string to preserve precision.

currencystring

Lowercase ISO 4217 currency code.

Responses

200

Successful response for Get OpenRouter Usage