RikaidoDeveloper

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 · required
The dish’s name. Used to classify the recipe before judging it.
recipe.cuisinestring
A hint for the classifier.
recipe.ingredients[]{ name, quantity, unit, optional? } · required
One 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? } · required
In 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.
titleHintstring
The 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": ""
}
okboolean
No finding of severity error.
safeboolean
No 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.
constraintsobject
What was enforced, echoed.
feedbackstring
Empty 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

CodeWhen
400recipe has no title, ingredients or steps.
401Unknown or revoked key.
402The month’s free calls are used and no card is on file.
429More 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.