---
title: "food.recipe-suggestion@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/food.recipe-suggestion"
updated: null
---

# food.recipe-suggestion@1 · OpenVibe.Services

HTML: [food.recipe-suggestion@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/food.recipe-suggestion)

# FoodRecipeSuggestion `food.recipe-suggestion@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: food
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/food/recipe-suggestion.v1.json`](/docs/contracts/food.recipe-suggestion.json)

food.recipe-suggestion@1: one stored answer (the last 20 a person are kept). Ingredients are from the pantry or cite the food-list rows Food sent the workflow; to\_buy and to\_buy\_cost are Food's own typical prices, never the model's. A recipe is AI-suggested and labelled so on the page.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^rcp_[0-9A-HJKMNP-TV-Z]{26}$` |
| `created_at` | string | yes |  | - `format date-time` |
| `ask` | string \| null | yes |  | - `maxLength 500` |
| `people` | integer \| null | yes |  | - `minimum 1`<br>- `maximum 12` |
| `ai_run_id` | string \| null | yes |  |  |
| `recipes` | array of object | yes |  | - `maxItems 3`<br>- `items: no other fields` |
| `recipes[].title` | string | yes |  | - `maxLength 160` |
| `recipes[].serves` | integer \| null |  |  | - `minimum 1`<br>- `maximum 12` |
| `recipes[].minutes` | integer \| null |  |  | - `minimum 1`<br>- `maximum 600` |
| `recipes[].ingredients` | array of object | yes |  | - `minItems 1`<br>- `maxItems 25`<br>- `items: no other fields` |
| `recipes[].ingredients[].name` | string | yes |  | - `maxLength 120` |
| `recipes[].ingredients[].amount` | string \| null | yes |  | - `maxLength 80` |
| `recipes[].ingredients[].from_pantry` | boolean | yes |  |  |
| `recipes[].ingredients[].citations` | array of integer | yes |  | - `items: minimum 0` |
| `recipes[].steps` | array of string | yes |  | - `minItems 1`<br>- `maxItems 20`<br>- `items: maxLength 600` |
| `recipes[].notes` | string \| null |  |  | - `maxLength 600` |
| `recipes[].to_buy` | array of object | yes |  | - `items: no other fields` |
| `recipes[].to_buy[].slug` | string | yes |  |  |
| `recipes[].to_buy[].name` | string | yes |  |  |
| `recipes[].to_buy[].price` | number \| null | yes |  | - `minimum 0` |
| `recipes[].to_buy_cost` | number | yes |  | - `minimum 0` |
| `recipes[].to_buy_cost_partial` | boolean |  |  |  |
| `recipes[].cost_note` | string | yes |  |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: one

~~~~
{
  "id": "rcp_01JQ8Z0000000000000000000C",
  "created_at": "2026-10-12T05:25:14.000Z",
  "ask": "something quick",
  "people": 2,
  "ai_run_id": "run_01JQ8Z0000000000000000000D",
  "recipes": [
    {
      "title": "Egg fried rice",
      "serves": 2,
      "minutes": 15,
      "ingredients": [
        {
          "name": "Eggs",
          "amount": "3",
          "from_pantry": true,
          "citations": []
        },
        {
          "name": "White rice",
          "amount": "2 cups cooked",
          "from_pantry": false,
          "citations": [
            1
          ]
        }
      ],
      "steps": [
        "Scramble the eggs and set them aside.",
        "Fry the rice, stir the eggs back in and serve."
      ],
      "notes": null,
      "to_buy": [
        {
          "slug": "rice-long-grain",
          "name": "Long Grain White Rice (2 lb)",
          "price": 1.25
        }
      ],
      "to_buy_cost": 1.25,
      "to_buy_cost_partial": false,
      "cost_note": "Cost is an estimate from typical prices, not a live price."
    }
  ]
}
~~~~

Rejected: four-recipes

~~~~
{
  "id": "rcp_01JQ8Z0000000000000000000C",
  "created_at": "2026-10-12T05:25:14.000Z",
  "ask": "something quick",
  "people": 2,
  "ai_run_id": "run_01JQ8Z0000000000000000000D",
  "recipes": [
    {
      "title": "Egg fried rice",
      "serves": 2,
      "minutes": 15,
      "ingredients": [
        {
          "name": "Eggs",
          "amount": "3",
          "from_pantry": true,
          "citations": []
        },
        {
          "name": "White rice",
          "amount": "2 cups cooked",
          "from_pantry": false,
          "citations": [
            1
          ]
        }
      ],
      "steps": [
        "Scramble the eggs and set them aside.",
        "Fry the rice, stir the eggs back in and serve."
      ],
      "notes": null,
      "to_buy": [
        {
          "slug": "rice-long-grain",
          "name": "Long Grain White Rice (2 lb)",
          "price": 1.25
        }
      ],
      "to_buy_cost": 1.25,
      "to_buy_cost_partial": false,
      "cost_note": "Cost is an estimate from typical prices, not a live price."
    },
    {
      "title": "Egg fried rice",
      "serves": 2,
      "minutes": 15,
      "ingredients": [
        {
          "name": "Eggs",
          "amount": "3",
          "from_pantry": true,
          "citations": []
        },
        {
          "name": "White rice",
          "amount": "2 cups cooked",
          "from_pantry": false,
          "citations": [
            1
          ]
        }
      ],
      "steps": [
        "Scramble the eggs and set them aside.",
        "Fry the rice, stir the eggs back in and serve."
      ],
      "notes": null,
      "to_buy": [
        {
          "slug": "rice-long-grain",
          "name": "Long Grain White Rice (2 lb)",
          "price": 1.25
        }
      ],
      "to_buy_cost": 1.25,
      "to_buy_cost_partial": false,
      "cost_note": "Cost is an estimate from typical prices, not a live price."
    },
    {
      "title": "Egg fried rice",
      "serves": 2,
      "minutes": 15,
      "ingredients": [
        {
          "name": "Eggs",
          "amount": "3",
          "from_pantry": true,
          "citations": []
        },
        {
          "name": "White rice",
          "amount": "2 cups cooked",
          "from_pantry": false,
          "citations": [
            1
          ]
        }
      ],
      "steps": [
        "Scramble the eggs and set them aside.",
        "Fry the rice, stir the eggs back in and serve."
      ],
      "notes": null,
      "to_buy": [
        {
          "slug": "rice-long-grain",
          "name": "Long Grain White Rice (2 lb)",
          "price": 1.25
        }
      ],
      "to_buy_cost": 1.25,
      "to_buy_cost_partial": false,
      "cost_note": "Cost is an estimate from typical prices, not a live price."
    },
    {
      "title": "Egg fried rice",
      "serves": 2,
      "minutes": 15,
      "ingredients": [
        {
          "name": "Eggs",
          "amount": "3",
          "from_pantry": true,
          "citations": []
        },
        {
          "name": "White rice",
          "amount": "2 cups cooked",
          "from_pantry": false,
          "citations": [
            1
          ]
        }
      ],
      "steps": [
        "Scramble the eggs and set them aside.",
        "Fry the rice, stir the eggs back in and serve."
      ],
      "notes": null,
      "to_buy": [
        {
          "slug": "rice-long-grain",
          "name": "Long Grain White Rice (2 lb)",
          "price": 1.25
        }
      ],
      "to_buy_cost": 1.25,
      "to_buy_cost_partial": false,
      "cost_note": "Cost is an estimate from typical prices, not a live price."
    }
  ]
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('food.recipe-suggestion@1', value);   // { valid, errors: [{ path, message }] }
~~~~
