API Reference
Validation

Validation API

Validate Experiment

POST /validate

Validate an experiment specification without submitting it.

Request Body

Same format as POST /experiments.

Response

{
  "valid": true,
  "errors": [],
  "warnings": [
    {
      "path": "protocol.replicates.biological_replicates",
      "code": "low_replicates",
      "message": "2 biological replicates may not provide sufficient statistical power",
      "suggestion": "Consider 3+ replicates for publication-quality results"
    }
  ],
  "safety_flags": []
}

Error Codes

CodeDescription
missing_requiredRequired field is missing
invalid_valueValue is invalid for the field type
invalid_experiment_typeUnknown experiment type
safety_violationExperiment violates safety guidelines

Safety Flags

FlagDescription
bsl_level_exceededBSL level above supported (BSL-3+)
controlled_substanceInvolves controlled substances
human_subjectsInvolves human subjects
safety_rejectedRejected for safety reasons

Validate Hypothesis

POST /validate/hypothesis

Validate just the hypothesis section.

Request Body

{
  "statement": "Compound X inhibits E. coli growth with MIC ≤ 32 μg/mL",
  "null_hypothesis": "Compound X has no antibacterial activity",
  "rationale": "Based on structural similarity to known antibiotics"
}

Response

{
  "valid": true,
  "errors": [],
  "suggestions": [
    "Consider specifying the E. coli strain (e.g., ATCC 25922)"
  ]
}

Get Cost Estimate

POST /estimate

Get cost and turnaround estimates for an experiment.

Request Body

Same format as POST /experiments (can be partial).

Response

{
  "estimated_cost_usd": {
    "low": 200,
    "typical": 300,
    "high": 400
  },
  "estimated_turnaround_days": {
    "standard": 14,
    "expedited": 7
  },
  "cost_breakdown": {
    "materials": 90,
    "labor": 120,
    "equipment": 30,
    "platform_fee": 60,
    "privacy_premium": 0
  },
  "operator_availability": "high"
}

Operator Availability

LevelMeaning
highMany qualified operators available
mediumSome operators available
lowFew operators available, may take longer
noneNo operators currently match requirements