Skip to main content
POST
Create a consensus experiment on a supported block (extract, classifier, split, or for_each configured with map_method="split_by_key"). The experiment freezes a name, a fixed document set, and a consensus count — but does NOT run metrics. Trigger the first run with Run Experiment. The create route is flat: send workflow_id in the request body. Provide documents through one or both of:
  • document_captures — references to past workflow runs. The handle inputs the block actually received are materialized server-side.
  • documents — explicit handle inputs you assemble yourself, optionally carrying source metadata.
n_consensus must be 3, 5, or 7. See Experiments for the full conceptual model.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create an experiment, in one of two modes.

  • Create from scratch — provide block_id, name, optional document_captures/documents/n_consensus. Leave source_experiment_id unset.
  • Duplicate an existing experiment — provide only source_experiment_id. The source's block, name (with a (Copy) suffix), n_consensus, and documents are copied. All other fields must be omitted.

Combining source_experiment_id with any other field is rejected.

workflow_id
string
required
block_id
string | null
document_captures
ExperimentDocumentCaptureRequest · object[] | null
documents
ExplicitExperimentDocumentRequest · object[] | null
n_consensus
enum<integer> | null
Available options:
3,
5,
7
name
string | null
source_experiment_id
string | null

Response

Successful Response

An experiment that evaluates a workflow block against a set of documents, with its latest run status and score.

id
string
required
workflow_id
string
required
block_id
string
required
n_consensus
enum<integer>
required
Available options:
3,
5,
7
name
string
required
block_type
enum<string>
required
Available options:
extract,
classifier,
split,
for_each
document_count
integer
default:0
last_run_id
string | null
created_at
string<date-time>

When the experiment was created

updated_at
string<date-time>

When the experiment was last updated

status
enum<string>
default:draft
Available options:
draft,
processing,
completed,
failed,
cancelled
score
number | null
is_stale
boolean
default:false
freshness
ArtifactFreshness · object
freshness_state
enum<string>
default:unknown
Available options:
fresh,
stale,
unknown
freshness_reasons
string[]
run_plan_mode
enum<string>
default:unknown
Available options:
run,
noop,
conflict,
unknown
rerunnable_document_count
integer
default:0
schema_drift
enum<string>
default:unknown
Available options:
none,
partial,
drifted,
unknown
schema_drift_detail
string | null
drift
ArtifactDrift · object