Count tokens from stored text for a suite's unmeasured samples
Backfill for rows written before the gateway recorded usage. For samples of the suite’s completed runs that have answer or reasoning text but no token figure, counts prompt, reasoning and answer tokens from the stored text (tiktoken o200k_base, one ruler for every model), marks them tokens_estimated, and refreshes each run’s per-task tokens and run totals so the leaderboard’s efficiency figures appear. Processes limit runs per call, oldest run id first; call again until remaining_runs is 0. Samples the provider or the import already measured are left alone, and a sample with no text stays unmeasured. New rows get the same figures at generation or import time, so this is a no-op on a suite with nothing to measure.
Authorizations
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Headers
Optional external end-user identifier forwarded by the API gateway.
Path Parameters
Body
How many runs to measure in this call. Call again until remaining_runs is 0.
1 <= x <= 20Response
OK
Runs whose samples were counted in this call.
0 <= x <= 9007199254740991Samples that gained token figures in this call.
0 <= x <= 9007199254740991Runs of the suite that still have samples with text but no token figure, after this call.
0 <= x <= 9007199254740991