Skip to main content
POST
Align Disposition Test Run

Overview

Dispositions are enabled per organization. If your organization does not have access, these endpoints return 404.
Reads the corrections saved on a finished test run and proposes rewritten prompt or description text for each corrected value, returned as before-and-after diffs with a rationale. Nothing is written: apply a proposal yourself by editing the extractor, the draft definition, or the judge. The run must be in a terminal status (complete, partial, or failed) and have at least one correction from Correct Test Run Value. Each corrected value costs one inference call; an organization may make at most 30 align requests per hour. Requires an admin, owner, operator, or prompter role.

Headers

string
required
Your API key for authentication.

Path Parameters

string
required
The agent’s unique identifier. Must be a UUID; otherwise returns 400 with the message agentId must be a valid UUID. Returns 404 Agent not found if the agent is not in your organization.
string
required
The disposition’s unique identifier. Must be a UUID; otherwise returns 400 with the message dispositionId must be a valid UUID. Returns 404 Disposition not found if it does not belong to this agent.
string
required
The test run’s unique identifier. Must be a UUID; otherwise returns 400 with the message runId must be a valid UUID. Returns 404 Test run not found if it does not belong to this disposition.

Body Parameters

The body is optional; an empty object aligns every corrected value with no extra guidance. Unknown fields return 400 BAD_REQUEST with the message Invalid request body.
array
Restrict alignment to these value ids: 1 to 50 UUIDs. Every id must exist in the run’s definition snapshot, otherwise 404 with the message Disposition value not found in this run. Values in the list that have no corrections are silently ignored.
string
Free-text guidance added to every value’s proposal request, up to 2000 characters after trimming. Use it to steer tone or emphasis (for example, “keep prompts under 80 words”).

Response

array
One entry per corrected value that produced a usable proposal. A value whose corrections suggest no change appears with an empty changes array.
array
Corrected values that received no proposal, each { "valueId", "reason" }. reason is custom_code (code values have no editable text), no_editable_fields (an unfrozen extraction source or a judge whose pinned version is gone), proposal_invalid (no usable proposal after two attempts), or brief_too_large (the value’s text and corrections exceed the per-request size budget even after trimming).
number
How many corrections were dropped, oldest first, to fit the request within its size budget. 0 when every correction was considered.
null | array
null on success, or a list of error objects if the request failed.

Docs for agents: llms.txt