Get OpenRouter Usage
Beta/v1/settings/integrations/openrouter/usageThis 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.
objectstringenumValues:openrouter_usageResource type identifier.
spent_todayobjectSpent today.
amountstring (decimal)Decimal amount, as a string to preserve precision.
currencystringLowercase ISO 4217 currency code.
spent_this_weekobjectSpent this week.
amountstring (decimal)Decimal amount, as a string to preserve precision.
currencystringLowercase ISO 4217 currency code.
spent_this_monthobjectSpent this month, which is what monthly_spend_limit is measured against.
amountstring (decimal)Decimal amount, as a string to preserve precision.
currencystringLowercase ISO 4217 currency code.
spent_totalobjectSpent since the API key was created.
amountstring (decimal)Decimal amount, as a string to preserve precision.
currencystringLowercase ISO 4217 currency code.
monthly_spend_limitobjectnullableThe integration's monthly spend limit, or null for no limit.
amountstring (decimal)Decimal amount, as a string to preserve precision.
currencystringLowercase ISO 4217 currency code.
monthly_spend_remainingobjectnullableWhat 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.
currencystringLowercase ISO 4217 currency code.
key_limitobjectnullableThe 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.
currencystringLowercase ISO 4217 currency code.
key_limit_remainingobjectnullableWhat is left of key_limit, or null when the key has no limit.
amountstring (decimal)Decimal amount, as a string to preserve precision.
currencystringLowercase ISO 4217 currency code.
Responses
Successful response for Get OpenRouter Usage