TaskClassificationResponseData - TypeScript SDK
TaskClassificationResponseData - TypeScript SDK
TaskClassificationResponseData type definition
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Example Usage
1 import { TaskClassificationResponseData } from "@openrouter/sdk/models"; 2 3 let value: TaskClassificationResponseData = { 4 asOf: "2026-06-17", 5 classifications: [ 6 { 7 categoryTokenShare: 0.48, 8 categoryUsageShare: 0.51, 9 displayName: "Code Generation", 10 macroCategory: "code", 11 models: [ 12 { 13 id: "openai/gpt-4.1-mini", 14 tagTokenShare: 0.75, 15 tagUsageShare: 0.55, 16 }, 17 { 18 id: "anthropic/claude-sonnet-4", 19 tagTokenShare: 0.12, 20 tagUsageShare: 0.2, 21 }, 22 ], 23 tag: "code:general_impl", 24 tokenShare: 0.31, 25 usageShare: 0.23, 26 }, 27 ], 28 macroCategories: [ 29 { 30 key: "code", 31 label: "Code", 32 tokenShare: 0.52, 33 usageShare: 0.45, 34 }, 35 ], 36 windowDays: 7, 37 };
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
asOf | string | ✔️ | UTC date (YYYY-MM-DD) of the window upper bound (yesterday). Data is exclusive of the current incomplete UTC day. This is the expected latest date in the snapshot; it does not confirm data presence for that date. | 2026-06-17 |
classifications | models.TaskClassificationItem[] | ✔️ | Per-task classification market-share data, sorted by usage_share descending. | |
macroCategories | models.TaskClassificationMacroCategory[] | ✔️ | Aggregate market-share data per macro-category (code, data, agent, general). | |
windowDays | number | ✔️ | Number of trailing days covered by this snapshot. | 7 |