Create an experiment

Create an experiment and start asynchronous workflow execution over a dataset.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Request

Create and asynchronously run an experiment. Provide exactly one scoring path: evaluator_ids/evaluator_slugs or evaluator_workflow_ids.

dataset_idstringRequired
Dataset ID to process.
workflowlist of objectsRequired
Workflow tasks to run for each dataset row.
evaluator_idslist of stringsOptional

Preferred evaluator identifiers for scoring. Mutually exclusive with evaluator_workflow_ids.

evaluator_slugslist of stringsOptional

Backward-compatible alias for evaluator_ids. If both are provided, evaluator_ids takes precedence.

evaluator_workflow_idslist of stringsOptional

WorkflowVersion IDs configured for eval-only scoring. Mutually exclusive with evaluator IDs/slugs.

experiment_idstringOptional

Optional client-provided experiment ID. The backend generates one when omitted.

namestringOptional
Experiment name.
descriptionstringOptional
Experiment description.
span_workflow_namestringOptionalDefaults to workflow
Root workflow span name.
enable_tracingbooleanOptionalDefaults to true
Whether to create trace logs.
batch_sizeintegerOptionalDefaults to 100
Batch size for processing.
concurrencyintegerOptionalDefaults to 15
Number of concurrent workers.
generation_methodstringOptional
Optional evaluation generation method override.

Response

Created experiment.
idstring
Experiment ID.
namestring
Experiment name.
statusstring
Experiment execution status.
created_atdatetime
descriptionstring or nullOptional
Experiment description.
datasetstring or nullOptional
Dataset ID associated with the experiment.
dataset_idstring or nullOptional
Dataset ID associated with the experiment.
dataset_namestring or nullOptional
Dataset name, when available.
workflow_countintegerOptional
Number of workflow steps.
progressdoubleOptional
Execution progress percentage.
started_atdatetime or nullOptional
completed_atdatetime or nullOptional
tagslist of maps from strings to anyOptional
Tags attached to the experiment.
workflowlist of objectsOptional
Workflow tasks configured for the experiment.
evaluator_idslist of stringsOptional
Evaluator IDs used for scoring.
evaluator_slugslist of stringsOptional

Backward-compatible evaluator identifiers stored by the backend.

evaluator_workflow_idslist of stringsOptional

Eval-only workflow versions used for scoring.

batch_sizeintegerOptional
concurrencyintegerOptional
enable_tracingbooleanOptional
error_messagestring or nullOptional
Failure details when status is failed.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error