Skip to main content

Experiments

Create, manage, and compare ML experiments. Experiments provide a structured way to track model training runs, hyperparameter configurations, and results across your machine learning projects.

All endpoints require authentication via X-API-Key header and the appropriate scope.


Experiment Object

{
"id": "exp_abc123",
"name": "Sentiment Analysis v2",
"description": "Comparing transformer architectures for sentiment classification",
"status": "running",
"owner": "user_456",
"organizationId": "org_xyz",
"tags": ["nlp", "sentiment", "production"],
"pinned": true,
"runCount": 12,
"bestRunId": "run_789",
"isPublic": false,
"sharedWith": ["user_789"],
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}

GET /api/v1/experiments

List all experiments accessible to the authenticated user.

Scope: ml-workbench:read

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by experiment name or description
statusstringNoFilter by status: draft, running, completed, failed
tagstringNoFilter by tag
pinnedbooleanNoFilter by pinned status (true or false)
limitintegerNoNumber of results to return (default: 20)
offsetintegerNoNumber of results to skip (default: 0)
sortstringNoSort field and direction, e.g. createdAt:desc

Response 200 OK

{
"count": 28,
"limit": 20,
"offset": 0,
"experiments": [
{
"id": "exp_abc123",
"name": "Sentiment Analysis v2",
"description": "Comparing transformer architectures for sentiment classification",
"status": "running",
"owner": "user_456",
"organizationId": "org_xyz",
"tags": ["nlp", "sentiment", "production"],
"pinned": true,
"runCount": 12,
"bestRunId": "run_789",
"isPublic": false,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}
]
}

POST /api/v1/experiments

Create a new experiment.

Scope: ml-workbench:write

Request Body

{
"name": "Sentiment Analysis v2",
"description": "Comparing transformer architectures for sentiment classification",
"tags": ["nlp", "sentiment"]
}
FieldTypeRequiredDescription
namestringYesExperiment name
descriptionstringNoExperiment description
tagsstring[]NoArray of tag strings for categorization

Response 201 Created

{
"id": "exp_abc123",
"name": "Sentiment Analysis v2",
"status": "draft",
"createdAt": "2025-01-15T10:30:00Z"
}

GET /api/v1/experiments/:id

Get a single experiment by ID.

Scope: ml-workbench:read

Path Parameters

ParameterTypeRequiredDescription
idstringYesExperiment ID

Response 200 OK

Returns the full Experiment object.


PUT /api/v1/experiments/:id

Update an existing experiment.

Scope: ml-workbench:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesExperiment ID

Request Body

{
"name": "Sentiment Analysis v2 - Updated",
"description": "Updated description with new findings",
"tags": ["nlp", "sentiment", "production"]
}
FieldTypeRequiredDescription
namestringNoExperiment name
descriptionstringNoExperiment description
tagsstring[]NoArray of tag strings

Response 200 OK

Returns the updated Experiment object.


DELETE /api/v1/experiments/:id

Delete an experiment and all associated runs. This action is irreversible.

Scope: ml-workbench:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesExperiment ID

Response 204 No Content


POST /api/v1/experiments/:id/pin

Toggle the pinned status of an experiment. Pinned experiments appear at the top of list views for quick access.

Scope: ml-workbench:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesExperiment ID

Response 200 OK

{
"id": "exp_abc123",
"pinned": true,
"message": "Experiment pinned successfully"
}

PUT /api/v1/experiments/:id/tags

Replace the tags on an experiment. Overwrites the existing tag list.

Scope: ml-workbench:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesExperiment ID

Request Body

{
"tags": ["nlp", "sentiment", "production", "v2"]
}
FieldTypeRequiredDescription
tagsstring[]YesArray of tag strings to set on the experiment

Response 200 OK

{
"id": "exp_abc123",
"tags": ["nlp", "sentiment", "production", "v2"],
"message": "Tags updated successfully"
}

GET /api/v1/experiments/compare

Compare two or more experiments side by side, including metrics and configuration differences.

Scope: ml-workbench:read

Query Parameters

ParameterTypeRequiredDescription
idsstringYesComma-separated list of experiment IDs to compare (minimum 2)

Response 200 OK

{
"experiments": [
{
"id": "exp_abc123",
"name": "Sentiment Analysis v2",
"status": "completed",
"runCount": 12,
"bestRunId": "run_789",
"bestMetrics": {
"accuracy": 0.934,
"f1Score": 0.921,
"loss": 0.187
},
"tags": ["nlp", "sentiment"],
"createdAt": "2025-01-15T10:30:00Z"
},
{
"id": "exp_def456",
"name": "Sentiment Analysis v3",
"status": "completed",
"runCount": 8,
"bestRunId": "run_012",
"bestMetrics": {
"accuracy": 0.951,
"f1Score": 0.943,
"loss": 0.142
},
"tags": ["nlp", "sentiment", "transformer"],
"createdAt": "2025-01-22T09:15:00Z"
}
]
}

GET /api/v1/experiments/stats

Get aggregate statistics for experiments in the organization.

Scope: ml-workbench:read

Response 200 OK

{
"total": 28,
"running": 3,
"completed": 18,
"failed": 5,
"pinned": 7
}