Skip to main content

Experiments API

Shipped today: GET /v1/experiments, POST /v1/experiments, plus the sub-collections /experiments/costs, /experiments/queues, /experiments/templates (GET + POST each). Per-experiment routes (GET /v1/experiments/{id}, /logs, /metrics) are planned, not yet live. Stream logs via the experiment-detail view in the web app or the Convex experiments.getLogs query.
Experiments are the core research unit in Hubify. Each experiment runs on GPU compute (or CPU), streams logs in real time, passes through QC gates, and stores results back to the lab.

Experiment Status Lifecycle

Create an Experiment

labId
string
required
Convex ID of the lab this experiment belongs to.
title
string
required
Human-readable experiment title (e.g., “MCMC Chain, Planck 2018 + BAO”).
projectId
string
Convex ID of the parent project, if applicable.
experimentId
string
Custom identifier (e.g., “EXP-054”). Auto-generated if omitted.
computeMode
string
default:"CPU"
Compute target: H200, H100, A100, or CPU.
config
object
Experiment configuration as a JSON object. Stored as a string internally.
template
string
Experiment template name (e.g., mcmc, anomaly-sweep, fisher-forecast).
priority
string
default:"normal"
Queue priority: critical, high, normal, low.
estimatedSeconds
number
Estimated runtime in seconds. Used for scheduling and cost projection.
data
object

List Experiments

labId
string
required
Lab ID to list experiments for.
status
string
Filter by status: queued, running, pass, fail, blocked.
projectId
string
Filter by parent project.
limit
number
default:"50"
Results per page.
cursor
string
Pagination cursor.

Get an Experiment

Update an Experiment

Update metadata or status of an experiment. Use this to manually transition status (e.g., unblock a blocked experiment).
title
string
Updated title.
status
string
New status. Valid transitions depend on current status.
result
string
Result summary (typically set on completion).
priority
string
Updated priority.

Delete an Experiment

Delete an experiment and its associated logs. Does not delete figures generated by the experiment.

Experiment Logs

Stream or retrieve logs for a running or completed experiment.

List Logs

experimentId
string
required
Experiment Convex ID.
level
string
Filter by log level: info, warn, error, debug.
limit
number
default:"100"
Number of log entries to return.

Subscribe to Logs (Real-Time)

Experiment Metrics

After an experiment completes, metrics are available in the result and associated log entries.
data
object