Build and capture canonical events directly when wrappers don’t fit your stack.
Wrappers cover the OpenAI, Anthropic, and Vercel AI SDKs. For anything else — custom inference stacks, other providers, backfills — construct canonical events yourself and capture them directly.
carbon.captureLlmCall({ event }); // one LLM eventcarbon.captureToolCall({ event }); // one tool eventcarbon.captureEvents({ events }); // a mixed batch
All three validate events synchronously against the canonical schema and throw on invalid input, then buffer the events for delivery like any wrapper-captured event. The full field reference is in the event schema.