POST /v1/harness/validate
Check a recipe
The harness judges the recipe you send it, under the constraints you name. It keeps nothing.
POSThttps://api.rikaido.app/v1/harness/validate
The request
A recipe object — a title, measured ingredients, ordered steps — and, if you want, the constraints to judge under.
recipe.titlestring · requiredThe dish’s name. Used to classify the recipe before judging it.
recipe.cuisinestringA hint for the classifier.
recipe.ingredients[]{ name, quantity, unit, optional? } · requiredOne line per ingredient, the quantity as text, as written. “a pinch” is read; “to taste” on a structural ingredient is vague, and noted.
recipe.steps[]{ instruction, tempC? } · requiredIn order. Give the temperature as a number when the step has one: the harness checks it because it is there, not because a regex guessed it.
recipe.teaches[]string[]The techniques the recipe claims to teach, as slugs. A slug the lexicon does not hold is named, then dropped.
constraints.allergies[]string[]Nine allergens, in English or French: peanut, tree nut, milk, egg, wheat, soy, fish, shellfish, sesame.
constraints.dietaryPrefs[]string[]Five diets: vegetarian, vegan, gluten-free, halal, kosher.
constraints.exclusions[]string[]Any named food — “cilantro”, “pork”, “olives”. Enforced as hard as an allergy.
titleHintstringThe person’s own phrasing, when there is one. Used only to classify.
The answer
200
{
"ok": true,
"safe": true,
"issues": [],
"classification": { "category": "savory", "baked": false },
"constraints": { "allergies": ["peanut"], "dietaryPrefs": [], "exclusions": [] },
"feedback": ""
}okbooleanNo finding of severity
error.safebooleanNo safety finding.
false: do not serve.issues[]Issue[]One per thing to fix. See Reading the answer and The codes.
classification{ category, baked }savory, bread, enriched-bread, quick-bread, cake, cookie, pastry, batter, pasta or unclassified.constraintsobjectWhat was enforced, echoed.
feedbackstringEmpty when there is nothing to fix; otherwise the same correction brief Rikaido feeds back to its own model.
The Rikaido-Usage-Op: validate header rides on every counted answer.
Errors
| Code | When |
|---|---|
400 | recipe has no title, ingredients or steps. |
401 | Unknown or revoked key. |
402 | The month’s free calls are used and no card is on file. |
429 | More than 60 calls in a minute. |
What it costs
$0.005 per call, in Canadian dollars. This route is pure — no model, no network — and answers in milliseconds.