Public SDKs and coding-agent collectors
Instrument every LLM cost.
Attribute product LLM spend to customers, users, features, and workflows. Use the TypeScript SDK, Python SDK, or the HTTP API, then collect internal coding-agent usage with the same public repository.
npm install @traice/sdkimport { configure, meter } from "@traice/sdk";TypeScript and Node.js
Meter provider calls, streams, frameworks, adapters, and active request guardrails.
Python
Track sync and async OpenAI, Anthropic, LangChain, and LangGraph calls.
HTTP and cURL
Send the product usage event contract from any runtime without an SDK.
Installation
Create a workspace key and send the first event.
Internal Spend
Collect Claude Code and Codex usage by employee and team.
API Reference
Review signatures, event contracts, and links to source.
Documentation map
Everything in one place
Getting started
Product SDKs
Product SDKsChoose the TypeScript SDK, Python SDK, or HTTP API for product-runtime cost attribution.TypeScript and Node.js SDKMeter provider calls and streams, select delivery adapters, and enforce active request rules in Node.js applications.Python SDKConfigure collection, track sync or async LLM calls, and send attributed events without blocking requests.HTTP and cURLSend attributed product usage events from any runtime through the public HTTP contract.OpenTelemetry and Vendor ImportsSend OTel GenAI spans or backfill normalized LiteLLM and Langfuse cost data without copying prompts or responses.SDK Runtime Architecture and PerformanceSee client-side request work, caches, batching, measured local latency, limits, and the serverless workaround.
Internal spend
Collector OverviewInstall, operate, and extend the local Claude Code and Codex usage collector.Collector ConfigurationManage collector destinations, credentials, identity, local state, and compatibility safely.Collector RoutingRoute Codex and Claude Code sessions to authorized workspaces by agent, repository, or worktree.Claude CodeConfigure Claude Code telemetry for trAIce Internal Spend.CodexConfigure Codex telemetry for trAIce Internal Spend.PrivacyWhat collectors send, what they avoid, and how prompt capture is controlled.
Tools
Reference
API ReferenceReference guides, package registries, source entrypoints, and public event contracts.TypeScript API ReferencePublic @traice/sdk functions, classes, adapters, integrations, analytics, guardrails, and types.Python API ReferencePublic traice-sdk functions, client lifecycle, tracker, callback handler, and data classes.Event Contract ReferenceProduct transport fields, SDK-local cost events, internal usage events, and protocol utilities.