Portal
SandboxAPI v1Not signed inExternal user: —

Recipes

Build a recipe lifecycle: discover or create a recipe, then transform it with dietary goals.

What you can build

Recipe finders, import pipelines, vegetarian/vegan transformers, and pantry-aware recipe UIs — without reinventing food structure in your client.

1. Find a recipe

page = client.recipes.list(search="chili", limit=10)
recipe = client.recipes.get(page.items[0].id)
print(recipe.id, recipe.title)

2. Create or import

TypeScript can create recipes with recipes.create. Both SDKs can import from a URL. Python create uses REST POST /v1/recipes until a create helper ships.

const created = await client.recipes.create({
  title: "Weeknight Chili",
  ingredients: ["1 lb ground beef", "2 tbsp chili powder", "1 onion"],
  instructions: ["Brown beef", "Simmer 30 minutes"],
  visibility: "PRIVATE",
});
const recipeId = created.recipe.id;

More import patterns: Recipe importing

3. Transform (proposal)

Ask for a dietary transformation. The response is a proposal (ingredient swaps + confidence) — not an automatic overwrite of the stored recipe.

proposal = client.recipes.transform(recipe.id, "VEGETARIAN")
print(proposal.confidence_score)
if proposal.summary:
    print(proposal.summary.title)
for line in proposal.transformed_ingredients:
    print(line.from_name, "→", line.to_name, line.reason)

Transformation types include VEGETARIAN, VEGAN, GLUTEN_FREE, DAIRY_FREE, and others. For unified reasoning goals, see Reasoning.

Example transform fields

{
  "transformation_type": "VEGETARIAN",
  "confidence_score": 0.9,
  "transformed_ingredients": [
    {
      "from_name": "ground beef",
      "to_name": "lentils",
      "reason": "…",
      "confidence": 0.88
    }
  ],
  "explanations": ["…"],
  "summary": { "title": "…", "confidence": 0.9, "changes": ["…"] }
}

Production considerations

  • Transforms are read-only proposals. Persist by creating a new recipe (or updating) only after the user accepts.
  • Discovery lists may include copied_from_recipe_id when a tenant already owns a copy of a catalog recipe.

Next

What are you building?