Per-customer Scope 3 emissions statements

Customer Statements & Buyer Requests
#customer#customerRef#customer_ref#statement#scope-3#sb-253#allocation

Attribute AI calls to the customer they serve and issue each customer a statement of the AI emissions allocated to them.

How It Works Under the Hood
  • •Each telemetry event can carry a customer_ref: your own pseudonymous account id for the customer (emails are rejected).
  • •The customer reference is part of the entry's audit hash, so re-attributing a call to a different customer breaks chain verification.
  • •Statements include allocated emissions and electricity with ranges, per-model and grid breakdowns, methodology, a statement ID (SHA-256 of its data) and the audit chain head.
How to Use It Step-by-Step
  1. 1JavaScript: pass customerRef per call, or resolveCustomerRef in the client config (e.g. from AsyncLocalStorage).
  2. 2Python: wrap calls in with shdwsdk.customer(account_id):. OpenTelemetry: set the shdw.customer_ref span attribute. LiteLLM: metadata={'shdw_customer_ref': account_id}.
  3. 3Open the 'Customer statements' tab, choose a period, optionally give customers display names, and open a statement (paid plans).
JavaScript
const shdw = new ShdwTelemetryClient({
  apiKey: process.env.SHDW_API_KEY!,
  resolveCustomerRef: () => requestContext.getStore()?.accountId,
});

Related guides