POST/api/lab/pipelineclient-runs-pipeline
Register a lab model endpoint and prompt template for Phase E WHY producer replacement. The intake records the request; downstream runtime execution and worker questions still pass through trades-agent gates.
Writes: apps/web/public/lab-clips/lab-produced/<lab_id>/<clip_id>.json
Request Shape
{
"lab_id": "acme-lab",
"clip_id": "test03",
"model_endpoint_url": "https://lab.example.com/trades/why-producer",
"model_prompt_template": "Given the span evidence, return WHY claims with citations."
}
Curl
curl -sS -X POST "https://tradesdata.ai/api/lab/pipeline" \
-H "Authorization: Bearer $TRADES_DATA_LAB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lab_id": "acme-lab",
"clip_id": "test03",
"model_endpoint_url": "https://lab.example.com/trades/why-producer",
"model_prompt_template": "Given the span evidence, return WHY claims with citations."
}'
POST/api/lab/questionspost-dataset Q&A
Submit targeted follow-up questions on delivered spans. Accepted questions are queued for the next worker session for the relevant worker pool.
Writes: runs/_meta/lab-extension/<lab_id>/questions/<dataset_bundle_id>.json and apps/web/public/lab-clips/lab-questions/<lab_id>/<dataset_bundle_id>.json
Request Shape
{
"lab_id": "acme-lab",
"dataset_bundle_id": "test03-tier1-raw",
"questions": [
{
"clip_id": "test03",
"span_id": "span-00042",
"question_text": "Was the driver angle chosen to avoid stripping the screw head?",
"materiality_reason": "This changes the WHY claim for the span and affects training labels for tool-angle recovery."
}
]
}
Curl
curl -sS -X POST "https://tradesdata.ai/api/lab/questions" \
-H "Authorization: Bearer $TRADES_DATA_LAB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lab_id": "acme-lab",
"dataset_bundle_id": "test03-tier1-raw",
"questions": [
{
"clip_id": "test03",
"span_id": "span-00042",
"question_text": "Was the driver angle chosen to avoid stripping the screw head?",
"materiality_reason": "This changes the WHY claim for the span and affects training labels for tool-angle recovery."
}
]
}'
POST/api/lab/benchmarksbenchmark injection
Register lab-specific acceptance criteria to run alongside the publish gate and ship as lab-origin rows in the standards scorecard.
Writes: apps/web/public/lab-clips/standards-scorecard/<clip_id>.json
Request Shape
{
"lab_id": "acme-lab",
"clip_id": "test03",
"criteria": [
{
"criterion_id": "lab-recovery-angle-001",
"what_it_grades": "Error-recovery spans include tool angle rationale",
"verifiable_assertion": "Every recovery span has a WHY claim citing sensor evidence and worker review state.",
"pass_threshold": 0.95
}
]
}
Curl
curl -sS -X POST "https://tradesdata.ai/api/lab/benchmarks" \
-H "Authorization: Bearer $TRADES_DATA_LAB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lab_id": "acme-lab",
"clip_id": "test03",
"criteria": [
{
"criterion_id": "lab-recovery-angle-001",
"what_it_grades": "Error-recovery spans include tool angle rationale",
"verifiable_assertion": "Every recovery span has a WHY claim citing sensor evidence and worker review state.",
"pass_threshold": 0.95
}
]
}'