API: a run’s usage carries its cost, and tokens take the names providers bill under
API: a run’s usage carries its cost, and tokens take the names providers bill under
Every operation that returns a durable run, and the run.completed, run.failed and run.requires_action webhook payloads, now report what the run cost. usage.cost_micro_usd is an integer in millionths of a US dollar, priced at your plan’s rates on the rate card named by usage.rate_card_version, and each usage.models[] entry carries its own cost_micro_usd. The figure is informational; your invoice is authoritative.
The token fields are renamed to the names every provider bills under: input_tokens (cached reads included), cached_input_tokens (that subset), output_tokens and total_tokens, on the run’s usage, on each usage.models[] entry and on each step. prompt_tokens and completion_tokens are gone from this version onward; the counts are the same.
This shape applies to every caller from this date, whatever Speechify-Version it pins: durable runs are in beta and had no production integrations when the fields were renamed, so there is no older shape to keep. To migrate, read input_tokens where you read prompt_tokens and output_tokens where you read completion_tokens, and never add cached_input_tokens to input_tokens.
Unversioned and additive in the same release: the Waymark gateway’s waymark response block gains cost_micro_usd, rate_card_version and a per-model cost_micro_usd.