Append trials to an open coding-agent run
Adds finished trials to a run opened with finalize: false, so a job started from MKA1 can be watched while it runs instead of appearing complete out of nowhere at the end. Each trial pins its own sample_index and upserts on (task, model, sample_index): a harness cannot tell a timeout from a lost response, so re-sending a batch is safe and replaces rather than duplicates. The whole batch and its aggregate recompute land in one transaction, serialized per run. Counts, metrics and cost are recomputed from the stored rows on every call, never accumulated from the request, so a replayed batch cannot double them. Send finalize: true (usually with an empty trials) to close the run — until then it stays in_progress and off the leaderboards, which only count completed runs. Appending to an already-completed or cancelled run is rejected: that record is finished, and rewriting it would silently move a number someone may have already read.
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
Each trial pins its own sample_index (unique per task and model): re-sending a batch replaces the same rows instead of duplicating them, so a retried batch is safe.
1000Marks the run completed once these trials land — the last call of a streaming job sends this, usually with an empty trials.
Response
OK
-9007199254740991 <= x <= 9007199254740991The org that owns this run.
The team that owns this run.
queued, in_progress, finalizing, completed, failed, cancelling, cancelled Coding-agent harness that produced this run (e.g. omp, claude-code). Null for every non-harness eval kind — a null here is not a missing value, it means the run is not an agent run.
Version of agent_name, as the harness reported it. Null when agent_name is.
Reasoning-effort setting the agent ran at (e.g. medium, xhigh). Part of the leaderboard's row identity: the same agent and model at two efforts are two rows, not one. Null when agent_name is.
Total spend for the run in USD. Null when the harness did not report cost.
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991