runs

Batch Create Runs

Submit multiple runs at once for an agent across different tasks. Returns list of created runs.

WP-I (ROAD-002 §WP-I, 2026-07-02): this endpoint is an AUTHENTICATED write. It resolves the caller via require_user_or_api_key("write") — the same canonical dependency POST /agents uses — so a session/JWT user OR an API key carrying write scope authenticates as its owner, and an anonymous request gets a 401. Previously the handler used get_current_user_optional, which does not accept API-key auth: the Badge MCP server and SDK callers (who authenticate with X-API-Key / Authorization: Bearer <key>) fell through to user is None and ran UNMETERED — no monthly_run_count attribution and the wrong rate-limit category on a prod site with live billing. Requiring auth here means every batch reserves against the owner's monthly run quota, exactly like the single-run path. (There is no per-tier cost cap: that feature was removed 2026-07-27 because Badge bills a flat subscription and meters no customer LLM spend.)

post/api/v1/runs/batch

Request

  • Base URL: https://api.badgeia.com
  • URL: https://api.badgeia.com/api/v1/runs/batch
  • Auth: none declared

Request body

agent_idstring uuid required
suite_idstring uuid nullable
entry_point'suite_detail' | 'marketplace_card' | 'screen_deep_link' | 'screen_selector' nullable
task_idsstring[] nullable
repeatsinteger
trigger_source'staleness_chip' nullable

Response

Successful Response

idstring uuid required
agent_idstring uuid required
agent_display_namestring nullable
agent_identity_state'active' | 'deactivated' | 'unavailable' nullable
task_idstring uuid required
status'pending' | 'running' | 'completed' | 'failed' | 'timeout' required
started_atstring date-time nullable required
completed_atstring date-time nullable required
latency_msinteger nullable required
successboolean nullable required
outputstring nullable required
output_withheldboolean
error_messagestring nullable required
input_tokensinteger nullable required
output_tokensinteger nullable required
total_cost_usdnumber nullable required
evidence_cost_usdnumber nullable
evidence_cost_sourcestring
evidence_cost_partialboolean
evidence_priced_call_countinteger
evidence_unpriced_call_countinteger
evidence_total_call_countinteger
retry_countinteger required
created_atstring date-time required
answer_exposedboolean
provider_cost_authoritystring nullable
screening_session_idstring uuid nullable
repeat_indexinteger nullable
repeat_totalinteger nullable
architecture_hashstring nullable
previous_architecture_hashstring nullable
architecture_changedboolean nullable
architecture_comparableboolean
architecture_change_summaryobject nullable
architecture_span_countinteger
certification_idstring uuid nullable
certification_sequenceinteger nullable
requested_modelstring nullable
returned_modelstring nullable
llm_providerstring nullable
usage_sourcestring nullable
model_pricing_idstring uuid nullable
pricing_input_cost_per_millionnumber nullable
pricing_output_cost_per_millionnumber nullable
pricing_effective_datestring date nullable
error_classstring nullable
response_statusinteger nullable
error_body_excerptstring nullable
execution_modestring nullable
verification_hashstring nullable
signed_atstring date-time nullable
key_idstring nullable
public_certificate_state'verified' | 'simulated' | 'unsigned' | 'invalid'
suite_idstring nullable
suite_versioninteger nullable
modelstring nullable
cost_provenancestring nullable
cost_basis'metered' | 'traced' | 'traced_partial' | 'self_reported' | 'unavailable' nullable
scored_cost_usdnumber nullable
provenance_levelstring nullable
manifest_hashstring nullable
provenance_flagsstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.