The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { OpenResponsesUsage } from "@openrouter/sdk/models";
let value: OpenResponsesUsage = {
inputTokens: 10,
inputTokensDetails: {
cachedTokens: 0,
},
outputTokens: 25,
outputTokensDetails: {
reasoningTokens: 0,
},
totalTokens: 35,
};
Fields
| Field | Type | Required | Description |
|---|---|---|---|
inputTokens | number | :heavy_check_mark: | N/A |
inputTokensDetails | models.InputTokensDetails | :heavy_check_mark: | N/A |
outputTokens | number | :heavy_check_mark: | N/A |
outputTokensDetails | models.OutputTokensDetails | :heavy_check_mark: | N/A |
totalTokens | number | :heavy_check_mark: | N/A |
cost | number | :heavy_minus_sign: | Cost of the completion |
isByok | boolean | :heavy_minus_sign: | Whether a request was made using a Bring Your Own Key configuration |
costDetails | models.CostDetails | :heavy_minus_sign: | N/A |