Skip to Content
Levain LabsLevain Labs
API ReferenceAgents

Verify Version

Run a server-side verification pass on a draft version.

Run a server-side verification pass on a draft version.

Validates the recipe and reviews the latest committed changes; the recorded verdict is what publishing reads. By default the pass is report-only: checks failures and review comments are recorded for the caller to address (read them from GET /api/v1/agents/{agent_id}/versions/{version}/review-threads and the round's build outcome), and the platform never edits the branch. With fix: true the platform's builder addresses its own review feedback autonomously — the pre-existing behaviour. With publish: true the version is published automatically when verification passes. reviewer_model picks the reviewer for this pass (default claude-opus-5-5; claude-fable-5-1 is the deepest and costliest read, claude-sonnet-5-5 the cheapest). Only drafts the platform's builder worked on are reviewed: a draft whose commits were all pushed from outside (through the version's git credential) gets the recipe checks only, and passing checks are its verdict. review overrides that either way. Billed like a build turn.

Returns 409 when the version is not a draft, or when a build or verification is already running for it.

POST
/api/v1/agents/{agent_id}/versions/{version}/verify

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

agent_id*Agent Id
version*Version

Header Parameters

X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.levainlabs.com/api/v1/agents/string/versions/0/verify" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run_id": "string",
  "session_id": "string"
}