Cancel Agent Test Run

Beta

Cancel a non-terminal test run. Idempotent on a terminal run (completed / failed / cancelled) - the call returns the unchanged run.

Authentication

AuthorizationBearer

Enter your API key with the Bearer prefix, e.g. ‘Bearer sk_…’.

Path parameters

test_run_idstringRequired
Test run ID.

Headers

Speechify-VersionstringOptional

Response

The (possibly already-terminal) test run.

idstring

Prefixed wire identifier (run_<26 char Crockford base32>). URL paths accept only this prefixed form; legacy UUID path parameters are rejected with 404.

test_idstring

Prefixed wire identifier (test_<26 char Crockford base32>) of the parent test.

agent_idstring

Prefixed wire identifier (agent_<26 char Crockford base32>) of the agent this run executed against.

statusenum

The one lifecycle vocabulary shared by every async job (batch calls, knowledge-base imports, agent-test runs, suite runs): pendingrunning → a terminal state.

  • pending - accepted but not yet executing (queued for a worker, or deferred to a future scheduled time).
  • running - actively executing.
  • completed - ran to conclusion. The single terminal-success verb. For a job that produces a pass/fail judgment (an agent-test run), this means it produced a verdict - read the separate verdict field for the judgment, not this status.
  • failed - could not complete (an infrastructure or input failure), distinct from a completed job whose verdict is failed.
  • cancelled - cancelled before reaching a natural terminal state.
created_atdatetime
verdictenum or null

The pass/fail judgment, present only once the run reached a verdict (status is completed).

started_atdatetime or null
ended_atdatetime or null
resultobject or null
Populated once the run reached a verdict.
errorstring

Human-readable error message when status is failed.

Errors

401
Unauthorized Error
404
Not Found Error