RikaidoDeveloper

POST /v1/harness/read

Read a source

A URL, a markdown or a text: the recipe it holds, in the shape validate reads.

POSThttps://api.rikaido.app/v1/harness/read

The request

sourcestring · required
A web address, markdown or the text of a recipe. At most 60,000 characters.
locale'fr' | 'en'
The source’s language, for the copyist. fr by default.

How it is read

The recipe is first located, in the source’s own words — never paraphrased before it is judged:

  1. markup — the page’s schema.org markup, when it has one. Nothing is guessed.
  2. as-written — the text as written, when it is headed into ingredients and steps.
  3. transcribed — the model, as a copyist, under a fidelity check, last.

Then every ingredient line is laid out into { name, quantity, unit } by a verified reader. A line it cannot read arrives whole in name, with no quantity, and read.unread counts them.

The answer

200
{
  "recipe": {
    "title": "Cherry tomato focaccia",
    "servings": 6,
    "ingredients": [{ "name": "all-purpose flour", "quantity": "500", "unit": "g" }],
    "steps": [{ "instruction": "Mix the flour, water, yeast and salt." }]
  },
  "read": { "how": "markup", "url": "https://…", "site": "example.com" }
}

Send recipe as is to validate: it is the same shape.

Errors

CodecodeWhen
400emptyThe source is empty.
413too-largeMore than 60,000 characters.
422no-recipeNothing that looks like a recipe in the source.
4xxprivate-address, unreachable, not-a-pageThe address points at a private network, does not answer, or is not a page.
429More than 10 reads in a minute.

What it costs

$0.050 per call. A read fetches a page and may call the model; the price follows the cost. Nothing is kept.