ActivityItem - TypeScript SDK

ActivityItem type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Example Usage

1import { ActivityItem } from "@openrouter/sdk/models";
2
3let value: ActivityItem = {
4 date: "2025-08-24",
5 model: "openai/gpt-4.1",
6 modelPermaslug: "openai/gpt-4.1-2025-04-14",
7 endpointId: "550e8400-e29b-41d4-a716-446655440000",
8 providerName: "OpenAI",
9 usage: 0.015,
10 byokUsageInference: 0.012,
11 requests: 5,
12 promptTokens: 50,
13 completionTokens: 125,
14 reasoningTokens: 25,
15};

Fields

FieldTypeRequiredDescriptionExample
datestring✔️Date of the activity (YYYY-MM-DD format)2025-08-24
modelstring✔️Model slug (e.g., “openai/gpt-4.1”)openai/gpt-4.1
modelPermaslugstring✔️Model permaslug (e.g., “openai/gpt-4.1-2025-04-14”)openai/gpt-4.1-2025-04-14
endpointIdstring✔️Unique identifier for the endpoint550e8400-e29b-41d4-a716-446655440000
providerNamestring✔️Name of the provider serving this endpointOpenAI
usagenumber✔️Total cost in USD (OpenRouter credits spent)0.015
byokUsageInferencenumber✔️BYOK inference cost in USD (external credits spent)0.012
requestsnumber✔️Number of requests made5
promptTokensnumber✔️Total prompt tokens used50
completionTokensnumber✔️Total completion tokens generated125
reasoningTokensnumber✔️Total reasoning tokens used25