https://api.anpord.com/v1. Every operation is a POST with a JSON body, reads included, and there are no path or query parameters:
Authentication
Pass an API key as a bearer token:evals:read. Starting a batch needs evals:write.
Start a batch
evals.batches.start creates a batch that runs every case of a suite on every variant. It returns right away with the batch id and a runs list holding one run per case per variant, each with its caseId and variantId, while the trials continue on the server:
trials is the number of trials in each run. verify is the shell command that decides whether a trial passed, which the SDK writes as validate: command("..."). Poll evals.batches.get with the returned id until status is finished or failed.
The API can’t run the local sandbox. Run those with anpord eval --local.
Starting a batch is not idempotent. If the response is lost, list recent batches with evals.batches.list before retrying.
Run a case again
evals.cases.run starts a batch for a stored case’s newest version. Name variant ids from evals.cases.get to pick variants, or leave variants out to run every variant the case has run on. trials defaults to 1:
Limits
A batch over a size limit is refused with
400. A start while three batches are running is refused with 409. Retry once one finishes.
Errors
The errors above return JSON with a
message. The TypeScript client decodes responses and throws AnpordError on failure.