Example Usage
import { DecisionsResponseUsage } from "@openrouter/sdk/models";
let value: DecisionsResponseUsage = {
inputTokens: 569479,
outputTokens: 170740,
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
cost | number | ➖ | What OpenRouter charges for the request, in credits. On a BYOK request this is the OpenRouter fee only. | |
costDetails | models.CostDetails | ➖ | Breakdown of upstream inference costs | { “upstream_inference_completions_cost”: 0.0004, “upstream_inference_cost”: null, “upstream_inference_prompt_cost”: 0.0008 } |
inputTokens | number | ✔️ | N/A | |
inputTokensDetails | models.DecisionsUsageInputTokensDetails | ➖ | Of input_tokens, those the provider served from its prompt cache. | |
isByok | boolean | ➖ | Whether a request was made using a Bring Your Own Key configuration | |
outputTokens | number | ✔️ | N/A |