Ladder API
Validate
Validate a LADR config without saving or executing.
Overview
POST /v1/validate runs the LADR grammar validator on a supplied config without saving or executing it. Use it to check authoring correctness programmatically; used by Foundry's editor and by CI pipelines that publish ladders.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
config | object | Yes | The LADR config object to validate. Same shape as what gets saved. |
bash
curl -X POST https://api.redeo.ai/v1/validate \
-H "Authorization: Bearer $REDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"config": {
"name": "My Ladder",
"allowedTargets": { "strategy": "universal" },
"exit": "step0",
"knobs": {},
"steps": [...]
}
}'Response Shape
json
{
"valid": false,
"errors": [
"steps[1].fields[0].from.stepId not found: did you mean \"draft\"?",
"executionBudget.maxSpend exceeds platform max ($50)"
]
}valid: true means the config can be saved and executed. valid: false means at least one error was found; the errors array lists every problem (the validator does not stop at the first error).