Recipes API

21 ops: list_recipes, get_recipe, create_recipe, save_recipe_version, compare_recipe_versions, promote_recipe_version, dismiss_recipe_version, record_recipe_cook, update_recipe, delete_recipe, add_recipe_note, delete_recipe_note, add_recipe_image, remove_recipe_image, create_recipe_upload_link, shar

List recipes · POST /api/v1/list_recipes · scope recipes:read or GET …?input=

The person's saved recipes, most recently changed first: id, title, tags, the current version, how many versions there are, which version numbers are candidates waiting for a verdict, how often it was cooked, the current version's average rating, and whether it is shared. Filters: q (title, description or tag contains), tag, undecided (only recipes with a candidate), status (active by default). With pantry: true each recipe is compared with what is on hand (have, total, missing, uses_expiring) and the most cookable come first: use that for "what can I make tonight" or to use up food that is about to expire.

curl -X POST https://getgutlog.com/api/v1/list_recipes \  -H "Authorization: Bearer gutlog_…"

Get a recipe · POST /api/v1/get_recipe · scope recipes:read or GET …?input=

One recipe at one version (current by default; a number or latest for another): ingredients with amounts and canonical ingredient ids, steps with their photos and notes, servings and times, the version's status and ratings; plus every version in brief (number, label, status, what changed, ratings), the recipe's own photos and notes, the last cooks, `watch` (ingredients on the person's own trigger or allergen list) and `next` (what to ask or do next). pantry: true adds what is on hand and what is missing. Call it before changing a recipe, so the new version starts from what is saved. Versions: the first is the current one (the status quo). Every change is a new version, a candidate until the person promotes it (it becomes current) or dismisses it (the current one stays); older versions are kept and can be promoted again.

curl -X POST https://getgutlog.com/api/v1/get_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Save a new recipe · POST /api/v1/create_recipe · scope recipes:write

Save a recipe you and the person worked out, as version 1 (the current one). You write it: this stores it. Send the title, every ingredient (name, quantity, unit; grams when you can estimate them, so a serving can be logged with nutrients; note, optional, group) and the steps in order (sentences, or { text, minutes, tip }), plus servings, times, tags and where it was adapted from. To build it from what is in the kitchen, read get_raw_ingredients and list_expiring first. Returns the saved recipe as get_recipe does, with its id. To change a saved recipe use save_recipe_version, never create_recipe again.

curl -X POST https://getgutlog.com/api/v1/create_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"title":"Let me log a recipe once and reuse it","ingredients":[{"name":"scrambled eggs"}],"steps":["step"]}'

Save a new version of a recipe · POST /api/v1/save_recipe_version · scope recipes:write

Save a change to a recipe as a new version: less salt, a swap for what is in the pantry, a different method. Send change_summary (what changed and why) and only the parts that changed: ingredients and steps are full replacements of the list, everything omitted is copied from based_on (the current version by default). It is saved as a candidate and the current version stays the standard, unless promote: true (use that only when the person says the change is simply a correction). Photos of unchanged steps carry over. Returns the version, what differs from its parent, and what to do next: cook it, record_recipe_cook, then promote_recipe_version or dismiss_recipe_version. Versions: the first is the current one (the status quo). Every change is a new version, a candidate until the person promotes it (it becomes current) or dismisses it (the current one stays); older versions are kept and can be promoted again.

curl -X POST https://getgutlog.com/api/v1/save_recipe_version \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","change_summary":"change_summary"}'

Compare two versions of a recipe · POST /api/v1/compare_recipe_versions · scope recipes:read or GET …?input=

Two versions side by side (the current one against the latest by default): ingredients added, removed and changed, steps added and removed, changed servings and times, each version's cooks, average rating, would-make-again answers and what the person said about it. When the base is current and the other is a candidate, `suggestion` says what the ratings point to (promote, keep_current, cook_first, cook_again) with the reason. Use it to help the person decide which one is better; they decide.

curl -X POST https://getgutlog.com/api/v1/compare_recipe_versions \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Make a version the current one · POST /api/v1/promote_recipe_version · scope recipes:write

Make a version the recipe's current one, the new standard: after the person has said the change was better. The version it replaces is kept and can be promoted again (that is also how to go back). A shared link shows the newly promoted version from then on. Only on the person's word; never because the ratings alone suggest it.

curl -X POST https://getgutlog.com/api/v1/promote_recipe_version \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Keep the current version · POST /api/v1/dismiss_recipe_version · scope recipes:write

Turn a candidate version down: the person tried it and prefers the current one, or no longer wants to try it. The current version stays; the dismissed one is kept in the history with the reason and can still be promoted later. Not for the current version itself.

curl -X POST https://getgutlog.com/api/v1/dismiss_recipe_version \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Record cooking a recipe · POST /api/v1/record_recipe_cook · scope recipes:write

Record that a version was cooked and how it turned out: the rating (1–5, from the person), would_make_again, and their notes on what worked and what to change. This feedback is what decides between versions, so record it each time, for the version that was actually cooked (current by default). Pass cook_id to add a rating or notes to an earlier cook instead. Returns the version's and the current version's ratings, a `suggestion` when a candidate now has a verdict, `log_meal_recipe` (pass it as log_meal's `recipe` to put a serving in the diary) and what to ask next. Take what was used out of the pantry with consume_pantry_items.

curl -X POST https://getgutlog.com/api/v1/record_recipe_cook \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Update a recipe's details · POST /api/v1/update_recipe · scope recipes:write

Change what is not part of a version: the title, description, tags, the source it was adapted from, or archive it (archived: true hides it from list_recipes, nothing is deleted). Ingredients, steps, servings and times change only through save_recipe_version.

curl -X POST https://getgutlog.com/api/v1/update_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Delete a recipe · POST /api/v1/delete_recipe · scope recipes:write

Delete a recipe for good: every version, its cooks, notes and photos, and its shared link. Cannot be undone; to put it out of the way use update_recipe { archived: true } instead. Only on the person's clear request.

curl -X POST https://getgutlog.com/api/v1/delete_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Add a note to a recipe · POST /api/v1/add_recipe_note · scope recipes:write

Keep a note in the person's words: on the recipe as a whole ("Dad likes it with rice"), on one version (version), or on one step of a version (version and step: "my oven runs hot, 12 minutes was enough"). Notes are optional, private unless the person shares the recipe with include_notes, and come back with get_recipe. For how a cook turned out use record_recipe_cook instead.

curl -X POST https://getgutlog.com/api/v1/add_recipe_note \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","body":"I cook the same chili every week and re-enter it each time."}'

Delete a recipe note · POST /api/v1/delete_recipe_note · scope recipes:write

Delete one of the person's notes on a recipe, a version or a step, by its id (from get_recipe). The recipe and its versions are untouched.

curl -X POST https://getgutlog.com/api/v1/delete_recipe_note \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"note_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Add an image to a recipe · POST /api/v1/add_recipe_image · scope recipes:write

Attach an image to a recipe (its cover and gallery), to one version (how that version turned out) or to one step of a version. Send image as { url } (a public https link we download and keep a copy of: an image you generated and hosted, a photo already online) or { data, media_type } (base64, for agents that hold the bytes: coding agents, the CLI, the API). In a chat where you have neither (a photo the person attached, an image you made that has no public URL) call create_recipe_upload_link and give the person the link instead. Set generated: true for an image a model made. JPEG, PNG, WebP or GIF; camera location data is removed. Images are optional.

curl -X POST https://getgutlog.com/api/v1/add_recipe_image \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","image":{"data":"data","media_type":"image/jpeg"}}'

Remove a recipe image · POST /api/v1/remove_recipe_image · scope recipes:write

Remove one image by its id (from get_recipe). A step photo carried over to newer versions is removed only from the version this id belongs to.

curl -X POST https://getgutlog.com/api/v1/remove_recipe_image \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"image_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Share a recipe · POST /api/v1/share_recipe · scope recipes:write

Turn on a public link for a recipe: anyone with the link reads its current version (title, ingredients, steps, photos) with no account, and the page follows the recipe as better versions are promoted. Ratings, cooks, candidates and the person's trigger list are never shown; their notes only with include_notes: true. Returns url (a page for people) and markdown_url (the same as Markdown, for pasting or for another assistant). Calling it again keeps the same link and updates include_notes. Only when the person asks to share.

curl -X POST https://getgutlog.com/api/v1/share_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Stop sharing a recipe · POST /api/v1/unshare_recipe · scope recipes:write

Turn a recipe's public link off. The old link stops working for everyone at once; sharing again later makes a new link. Copies other people already imported are theirs and stay.

curl -X POST https://getgutlog.com/api/v1/unshare_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"recipe_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

get_shared_recipe

readno credential needed

Read a shared recipe · POST /api/v1/get_shared_recipe · scope recipes:read or GET …?input=

Read a recipe someone shared, from its link (https://…/r/<token>): title, description, ingredients with amounts, steps, times and photo URLs, at the owner's current version. Needs no account. To keep a copy the person can change, call import_shared_recipe.

curl -X POST https://getgutlog.com/api/v1/get_shared_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"url":"https://example.com/"}'

Save a copy of a shared recipe · POST /api/v1/import_shared_recipe · scope recipes:write

Save someone's shared recipe (by its link) into the person's own recipes as version 1, photos included, with the link kept as its source. It is a copy: later changes on either side do not affect the other. Then tweak it with save_recipe_version.

curl -X POST https://getgutlog.com/api/v1/import_shared_recipe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"url":"https://example.com/"}'

What recipes are waiting on the person · POST /api/v1/get_recipe_nudges · scope recipes:read or GET …?input=

What is waiting for the person across their recipes, most useful first: candidate versions whose ratings now point to a verdict (promote, or dismiss), cooks with no rating yet, and candidates saved but never cooked. Each has `ask` (a question to put to them) and `then` (the call that records their answer). Call it when a conversation turns to cooking or recipes and bring up one or two; never decide for them. Also says whether the weekly reminder email is on (set_recipe_reminders).

curl -X POST https://getgutlog.com/api/v1/get_recipe_nudges \  -H "Authorization: Bearer gutlog_…"

Set recipe reminders · POST /api/v1/set_recipe_reminders · scope recipes:write

Turn the weekly recipe reminder email on or off: one email in a week that has something waiting (a version to promote or drop, a cook with no rating), none otherwise, with counts only and no recipe content. The email is part of Plus; get_recipe_nudges gives the same prompts in chat on every plan. Off by default; only on the person's request.

curl -X POST https://getgutlog.com/api/v1/set_recipe_reminders \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"email":"off"}'