For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
    • Overview
    • Usage for Agents
  • TypeScript SDK
    • Overview
      • Analytics
      • APIKeys
      • Byok
      • Chat
      • Credits
      • Embeddings
      • Endpoints
      • Generations
      • Guardrails
        • Models
        • ActivityItem
      • OAuth
      • Observability
      • Organization
      • Presets
      • Providers
      • Rerank
      • Beta.Responses
      • Transcriptions
      • Speech
      • VideoGeneration
      • Workspaces
  • Python SDK
    • Overview
  • Go SDK
  • DevTools
    • Overview
    • Migrating to @openrouter/agent
LogoLogo
ModelsChatRankingsDocs
On this page
  • Example Usage
  • Fields
TypeScript SDKAPI ReferenceModels

ActivityItem - TypeScript SDK

ActivityItem type definition
Was this page helpful?
Previous

OAuth - TypeScript SDK

OAuth method reference
Next
Built with

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 byokUsageInference: 0.012,
5 completionTokens: 125,
6 date: "2025-08-24",
7 endpointId: "550e8400-e29b-41d4-a716-446655440000",
8 model: "openai/gpt-4.1",
9 modelPermaslug: "openai/gpt-4.1-2025-04-14",
10 promptTokens: 50,
11 providerName: "OpenAI",
12 reasoningTokens: 25,
13 requests: 5,
14 usage: 0.015,
15};

Fields

FieldTypeRequiredDescriptionExample
byokUsageInferencenumber✔️BYOK inference cost in USD (external credits spent)0.012
completionTokensnumber✔️Total completion tokens generated125
datestring✔️Date of the activity (YYYY-MM-DD format)2025-08-24
endpointIdstring✔️Unique identifier for the endpoint550e8400-e29b-41d4-a716-446655440000
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
promptTokensnumber✔️Total prompt tokens used50
providerNamestring✔️Name of the provider serving this endpointOpenAI
reasoningTokensnumber✔️Total reasoning tokens used25
requestsnumber✔️Number of requests made5
usagenumber✔️Total cost in USD (OpenRouter credits spent)0.015