← Back to docs

Recipes

Recipes

Recipes is being delivered in stages. The first implementation adds database tables, Laravel models and authenticated web screens. A JSON API is now present in code but has not yet been live-verified.

Planned workflow

  • Create and edit recipes in Tools; drafts are private by default.
  • Choose a meal category (such as soup or main course) and dietary tags (such as LCHF).
  • Preserve original notes. AI suggestions are optional; review proposed ingredients and steps before saving.
  • Publish manually with private, unlisted, or public visibility. AI never publishes automatically.
  • Retain an editable revision history.

Microsoft To Do import

Import is the final workflow step. The user explicitly chooses a To Do list and then selects tasks; no list is chosen automatically.

Status

The public welcome page at /recipes lists only explicitly published public recipes. Personal management lives at /me/recipes with creation at /me/recipes/create and To Do import at /me/recipes/import. Legacy editor GET URLs redirect and legacy mutations remain accepted behind authentication. AI suggestions, public links and explicitly selected To Do import are now implemented in code, but runtime verification is pending. The JSON API exists in code but is not yet live-verified.

JSON API (pending live verification)

Uses the same authenticated web session or API bearer-token mechanism as the Microsoft To Do integration. Endpoints are unversioned:

  • GET /api/recipes: paginated private recipe list; optional category or diet filters
  • POST /api/recipes: create private recipe
  • GET /api/recipes/{recipe}: show owned recipe with ingredients and steps
  • PUT /api/recipes/{recipe}: update owned recipe
  • DELETE /api/recipes/{recipe}: delete owned recipe

Create/update accept title, category, dietary_tags[], description, source_notes, servings, prep_minutes, cook_minutes, ingredients[] (name, quantity, unit, note), and steps[] (instruction). Each write produces a revision. Unauthenticated requests return 401; inaccessible IDs return 404. These endpoints cannot publish.

AI draft assistance

Hide or clear previous detailed recipe generation

Completed recipe progress and temporary draft versions can be stowed with Lägg undan körningen, including across reloads of the same browser tab. Visa undanlagd körning restores private previews while the 60-minute server progress remains available. Rensa arbetsytan och börja om clears the current tab's temporary reference, old form values and selected photos after confirmation, without deleting saved recipes or sharing links. Active generation cannot be stowed or cleared.

Reusing a draft no longer carries a previous AI reviewer's objections as freshly specified dietary, nutrition or grocery price requirements. Those notes remain visible in the original draft version.

What causes independent review rejection

The reviewer must identify an observable, material defect before rejecting a recipe: unsafe preparation, excluded ingredients, genuinely inconsistent ingredients/steps/shopping lists, incorrect requested servings or times, or a breached explicit composition requirement. Grocery prices and per-serving nutrition are labelled approximate. Different plausible estimates or an inability to verify a live store price are not rejection reasons when the user set no corresponding requirement. A standalone snack does not need an invented main course or accompanying side.

Specific reviewer reasons and suggested corrections appear directly on the affected draft card as well as under the expanded Visa hela utkastet (view complete draft). A user can explicitly retain or personally accept the rejected private draft without another provider call; neither action turns it into an AI-approved or published recipe.

Use Suggest from notes in the recipe editor after supplying original notes, category and optional dietary tags such as LCHF. The internal OpenAI client recipes is invoked only on request, subject to user AI permission and provider availability. The result is a reviewable suggestion, never automatically persisted, and original notes remain unchanged.

Publishing

Saved recipes can be private, unlisted, or public. Only the owner can change visibility. Unlisted and public recipes have read-only URLs under /recipes/p/{slug}. Editing a published recipe does not silently unpublish it.

Microsoft To Do import

Open /me/recipes/import, explicitly select a To Do list and then select individual tasks. The selected tasks are copied into private recipe drafts with their original notes. Source tasks remain unchanged.

Editing existing recipes and pasted cooking conversations

When two or three detailed alternatives are requested, each failed alternative receives its own safe, intelligible status. A substantive reviewer rejection includes concrete findings and suggested fixes; missing actionable findings are classified as a technical review failure instead. If none passes, every draft version actually produced is still shown in private expandable cards, with the last version expanded on failure. Draft previews belong only to the originating browser session, expire within 60 minutes, and may be reused as input to a new independently reviewed request. They are never saved, shared, or published as approved recipes merely because they exist. If review succeeds but storage fails, the storage failure is explained separately and available reviewed drafts remain private.

When the single free-text field contains a complete recipe, including cooking instructions, the AI workflow treats it as an edit: retain ingredient identity, preparation order and later explicit corrections from a pasted conversation. Proposed quantities for missing amounts are marked as estimates. One recipe is selected by default in the detailed form; you may still explicitly request up to three alternatives. A rejected draft can receive at most two corrections, each followed by independent AI review, and remains unsaved if still rejected. Ordinary completeness, dietary, portion and safety checks remain required. Production verification has not been completed.

Using a recipe draft even after review rejection

Accept a recipe personally without AI approval

When you want to keep a draft regardless of the AI review result, click Godkänn själv - behåll receptet (approve it myself - keep this recipe) on the completed version card. After an explicit acknowledgement, the exact recipe version is saved privately and marked Approved by owner for personal use - not AI-approved. No new AI request is made. You can also save it first and use Godkänn själv för eget bruk on the owner-only reader, and later withdraw your personal acceptance without deleting the draft.

This remains possible without special dietary requirements or when starting from an existing recipe. The original AI reviewer outcome, findings and draft warnings remain visible. Personal acceptance is not AI endorsement, normal moderation, or permission to publish in the public recipe catalog. Shared read-only viewers still see the independent-review warning.

You can explicitly use an actual generated version even when AI review fails, including when you supplied no special diet or other constraints, or used a complete recipe as input. After the run finishes, choose Använd receptet ändå - spara privat (use anyway - save privately) on the version you want. This stores that exact sanitized preview in a separate private draft collection and opens a read/copy/print view without calling the AI again. Försök granska om receptet (retry review) remains optional and starts a new AI run only when you choose it.

Your private draft reader is /recipes/unapproved/{id} and the private list is /recipes/unapproved. Signed-in owners can reopen their drafts, while guest drafts remain scoped to the original browser session. To share one unapproved draft, explicitly acknowledge the warning and generate a separate revocable read-only link under /recipes/unapproved/share/{token}. The link may be read by anyone holding it. Saved draft copies are persistent, whereas unsaved AI preview history expires after at most 60 minutes. These versions always display an unapproved, safety-not-verified label and remain outside normal recipe moderation, publication and share flows. Check ingredients, allergens, cooking temperatures and time before use.

Detailed generator source types

The detailed public form now presents one free-text field for meal ideas, available ingredients, complete recipes with cooking instructions, rough notes, or a public recipe URL. No input-mode selector or second URL field is needed. It sends input_style=auto plus notes (3-12,000 characters) to the existing CSRF-protected, unversioned POST /recipes/suggest. An HTTP(S) URL placed alone on one line (up to 2,048 characters) is detected server-side, optionally alongside cooking requests on other lines, and routed through the existing secured recipe importer. The remaining text is interpreted as recipe requirements, preserving explicit ingredients and cooking steps. Legacy API modes standard, ingredients, full_recipe, freeform, and recipe_url with separate source_url remain supported. External pages are fetched only on submission, with public-IP, redirect, response-size and timeout protections. Unreadable or oversized recipes fail rather than being fabricated or truncated. Drafts remain private and can be created from the same web-backed Android recipe form.

Recipe suggestions and exclusions

The public /recipes page offers guest AI suggestions from a short idea or ingredients, dietary preferences and an explicit list of ingredients to exclude. Guests cannot save recipes; requests use a server-managed OpenAI credential, fixed model and prompt, CSRF validation and a 3/minute request throttle. The provider must be configured; failures return a safe error. AI suggestions are not guaranteed to be allergen-free or zero-carb. Signed-in editors can also specify excluded ingredients when requesting suggestions.

Relaxed mode and follow-up questions

Guests and signed-in owners can use an optional fast recipe guide. It collects maximum total time (including preparation), people eating, and extra lunchbox portions. Four people plus four lunchboxes means eight servings. The fixed low-cost gpt-5-nano intake model asks at most four short questions, one at a time, and may finish sooner. Skipping questions directly adds the structured summary to the recipe notes; normal generation remains separate. Sessions are cached for ten minutes, bound to account/IP, and not accessible by session ID alone. Backend caps calls at six/minute, 24/day, and four per session, with a fixed prompt and model. Intake does not use web search.

The recipe UI presents Swedish meal labels for breakfast, lunch, dinner, supper and Snacks, with Snacks also available as a food category. A standalone recipe such as air-fried chickpeas does not need to become a complete dinner. Existing English category values are retained internally for backwards compatibility.

Restored reviewed recipe generation after merge

Guest and authenticated generation support Adapt and WILD. Generation requires actual web research for quantity calibration, followed by drafting and a separate AI review of quantities, instructions, exclusions, numeric requirements, shopping lists and approximate nutrition. Successfully reviewed guest recipes are stored privately as unpublished candidates. Responses include WordPress-friendly Markdown. Retailer price estimates and brand examples are not live-verified. Relaxed mode and Swedish meal labels are preserved. Failed research/review must not persist a guest candidate.

Time caps and batch cooking in the recipe maker

Both guests and signed-in users can specify maximum total time (prep plus cooking), diners, and additional lunchbox portions directly in the maker without using the optional Relaxed guide. Four diners plus eight extra lunchboxes means twelve total servings. The AI is instructed to scale ingredients and shopping lists for the full batch; server-side checks reject reviewed recipes with mismatched servings or exceeded time caps.

The time limit is optional in guest, owner and Relaxed recipe forms. Leaving it blank imposes no maximum cooking duration, and the intake assistant should not require a time limit.

Guest generation failures log safe request ID, stage and error class/message. Persistence failures are reported separately from research/generation/review failures. No recipe content or secrets are logged.

Clearer question guide

Follow-up questions are optional. Create recipe directly is the primary action, while Get help with follow-up questions opens the AI guide. Questions appear above a separate answer field with progress for up to four questions and automatic focus. The recipe generator and guide API remain unchanged.

Ingredient photo analysis

On the public recipe page, users can photograph or upload a JPG, PNG or WebP image (up to 6 MB) of their refrigerator, freezer or pantry. AI identifies visible ingredients, separates uncertain items and presents editable suggestions. Users explicitly approve insertion into the recipe notes. The feature does not persist the photo. Requests require CSRF and are limited to three per minute. Guide handoff focuses the recipe field and synchronizes time and serving controls.

Recipe generation progress

Recipe suggestions show server-reported stages for web research, drafting, review, validation and saving. Percentages are approximate stage markers, not time estimates. Individual search queries are not streamed live.

Quick-start meal ideas

Enter a meal preference and choose Visa receptidéer (Show recipe ideas). Three brief AI suggestions appear. Välj och anpassa (Select and customize) transfers the selected idea into the regular recipe form for adjusting servings and dietary requirements before generating a complete recipe. Follow-up questions remain optional.

Recipe generation status

The generator shows a short summary of the submitted request, continuously updated elapsed time, and actual server-side stages for research, drafting, review, validation and saving. Errors identify the failed stage. Individual external web-search queries cannot be streamed unless exposed by the provider during the request.

Robust web research

A verified provider web-search call remains mandatory. Readable research prose can be used when the model does not return JSON. Empty or incomplete results produce structured safe diagnostics and a failure rather than fabricated research.

During long AI calls the UI shows elapsed time in the current stage and whether the server progress endpoint responds. This is a connectivity check, not evidence that the provider is making progress. Poll failures are shown explicitly.

Recipe suggestions allow up to 10 starts per minute and progress polling up to 180 requests per minute. HTTP 429 shows a localized retry message and the Retry-After delay when available.

If OpenAI returns incomplete during web research, one retry uses an alternate model. A verified web search is still required, and a second failure remains an error.

Model routing: recipe research, drafting and review use GPT-5.4 nano with no reasoning effort. Incomplete research retries once with GPT-5.4 mini. The policy prioritizes cost per successful recipe and still requires verified web search.

Recipe review retries once with GPT-5.4 mini and a smaller input if the first review fails. Review is never skipped; provider diagnostics are logged safely.

The reviewer now returns a compact structured JSON verdict with approval and any actionable issues. A rejected draft triggers one full corrective generation and an independent confirmation review; the corrected recipe is not saved unless approval and all mandatory serving, time, exclusion and numeric checks pass. A further validation repair also requires renewed review. Syntactically valid reviewer findings are not treated as malformed JSON. Actual invalid JSON or unsupported formats get at most one alternate-model review retry. Runtime provider verification is pending.

The landing page now separates Quick recipe ideas (standalone guide) from Create a detailed AI recipe (full form). Guide answers can still optionally be transferred into the detailed form.

Meal type (breakfast/lunch/dinner/supper/Snacks) is an optional generation preference, separate from multi-label food categories such as poultry, fish, beef and soup. Selecting Snacks may also classify the resulting recipe as Snack. Dietary tags remain independent. Legacy category values remain supported.

AI suggestions are persisted as unpublished candidates in recipe_guest_suggestions (recipe JSON and Markdown). Acknowledged admins can edit, approve or reject candidates at /admin/recipes/suggestions. Only approved and explicitly public candidates appear at /recipes/c/{publicId}. The result has a bordered, copy-friendly layout. Multiple food categories are persisted for candidates and owned recipes and can be used in filters; the legacy category remains for compatibility.

Saved recipe checking and follow-ups

The browser session that created a private guest recipe candidate can reopen it, request an advisory plausibility review, ask questions, and request diet-appropriate side dishes or other revisions. AI never saves a suggested revision without a separate explicit acceptance. Accepted changes are recorded in a revision history. An ID alone does not allow access to the candidate outside the original session. Nutrition and grocery costs remain unverified estimates.

See the beginner guide for the step-by-step workflow.

Saved drafts and orphan candidate list

Every new detailed AI guest recipe is saved as an unpublished candidate. /recipes lists drafts accessible to the active browser session or signed-in account; account-linked drafts are also listed in /me/recipes across logins. A guest may explicitly link a draft to an account while still authorized by the same session. Another account cannot claim or read it. Administrators can filter all, unpublished, and unclaimed orphan guest candidates for moderation. Knowing a private recipe ID does not grant access.

Multiple detailed recipe alternatives

On /recipes, choose 1, 2 or 3 detailed recipe suggestions before clicking Föreslå recept. All suggestions use the same verified web research but receive separate drafting and review passes. The suggestions appear as mobile-friendly selectable tabs. Each successful suggestion is saved as a separate private candidate and is also accessible from the saved draft list after refresh. If an alternative fails, the page reports how many suggestions were saved; other successful recipes are retained. Without an explicit selection, older clients still request a single recipe. Exclusions, serving counts and optional cooking time are checked independently for every suggestion. These checks do not certify product labels, nutrition or allergens.

Standalone saved drafts, completeness and explicit sharing

Saved AI drafts now open on /recipes/draft/{publicId} as a focused recipe reader rather than showing the full generator. This page still requires the owning account or original guest session. Older incomplete drafts are retained and identified with a warning; use the existing recipe follow-up/change approval workflow to supply missing instructions.

New detailed drafts must contain meaningful cooking instructions, ingredients and a shopping list. Reviewed corrections and explicitly approved saved changes are checked again before storage. Where a low-carb main course excludes rice, pasta or potatoes, an actually included suitable accompaniment must be represented in the ingredients, preparation instructions and shopping list; extra compatible sides may be proposed.

Sharing is separate from publication. A draft remains private until its owner presses Skapa delningslänk. The owner can create one link for a single candidate or another link for a whole set of up to three successful suggestions. After reloading, mark up to three cards under Sparade AI-utkast and choose Skapa delningslänk för markerade recept to build a combined link from previously saved drafts. The recipient opens /recipes/share/{token} to read exactly those recipes without the generation form, without needing a Tools account. Treat the link like a private document: anyone who receives it can read it. The owner can find previously created encrypted-at-rest links on the standalone draft page and revoke them; revoked links stop working. Share links do not grant editing rights or publish anything to the public recipe catalogue. Guest drafts should be attached to an account explicitly if cross-session editing is needed.

Freeform input, moderation and notices

Choose Fritext in the detailed recipe form and paste rough cooking notes, for example bacon, mince, mushrooms and basil tomato sauce. The generator retains named ingredients and brands, fills in missing amounts and steps, and marks any invented/estimated details. Freeform input uses the same web research, constraints, independently reviewed alternatives and persisted drafts.

Every newly saved AI suggestion or manually authored/imported recipe starts as awaiting moderation, unless an authenticated creator with recipes.publish_without_approval explicitly opts to publish directly. New candidates and existing pending drafts appear in the admin action inbox and in /admin/recipes/suggestions, and assigned moderators with recipes.moderate receive Tools user notifications. Admins may assign/revoke the two distinct permissions in the Recipe permissions section of that view. Moderators can review the full recipe and approve/reject it but may not grant permissions unless they are acknowledged administrators.

On the first transition to approved, the recipe's linked account receives a persistent Tools notification with a link. Unclaimed guest drafts have no account mailbox, so they must be explicitly linked to an account for user notifications. Rejected recipes do not become public. Approved AI candidates explicitly marked public appear in the public recipe catalogue, while private and pending candidates do not. Manual recipes require approval before public or unlisted publication, except for explicit direct publication by a privileged author. Editing a previously approved recipe without direct-publication permission moves it back to a private pending state. Privileged publication does not waive the food-safety/completeness checks.

Import a recipe screenshot

On the recipe page choose Recept från skärmdump eller foto, select up to four JPG, PNG or WebP images (up to 6 MB each), analyze it and review the extracted title, ingredients and instructions. Correct the text before adding it to the recipe notes. Nothing is published automatically.

Quick recipe idea progress

Selecting Visa receptidéer now shows a progress bar, actual server stage, elapsed time and connection status. While the AI provider is working, the bar is indeterminate because no reliable percentage or completion estimate is available. On success it reaches 100% and the user can select an idea. Errors are actionable, and rate-limit retry delays are displayed when supplied by the server. Quick ideas do not create or persist full recipes.

Detailed recipe AI review failures

Stand-alone snacks are reviewed for quantities, meaningful instructions, shopping-list consistency, food safety and actual selected constraints, without requiring a full main meal or an invented side. A negative reviewer verdict that supplies no actionable issue is treated as technical output failure and gets at most one alternate-model review retry. A substantive rejection still cannot become a saved or published recipe.

A transient technical reviewer error triggers at most one alternate-model retry per review stage. The independent review is never bypassed. If the corrected recipe still fails substantive checks after the chosen bounded corrections, no rejected draft becomes a saved or shareable recipe candidate. The page keeps every available version as a session-private, time-limited preview for up to one hour and explains the rejection. Technical errors have a distinct message. Errors include a support reference so the user need not send the full recipe to identify the failure. Exhausted credits, rate limits and authentication failures are not retried automatically.

Expanded planning brief and rejected recipes

During detailed generation the page shows a short summary and an expandable full submitted request, including source notes, diners plus extra portions, meal, diet, exclusions, requirements, time limit and mode. After the existing mandatory verified AI web search it displays the actual brief research findings and any tentative dish/ingredient/cooking outline from that same response. No separate provider call is used for the progress display; the outline is not a verified recipe.

The UI lets the user choose 3-5 substantive recipe correction attempts, default 3. The existing unversioned POST /recipes/suggest accepts optional review_repair_attempts from 2 to 5; omitted values keep the legacy default of 2. Every corrected draft must pass independent review and normal requirements validation before being saved. Final substantive rejection returns HTTP 422 with error_code=recipe_review_rejected, safe bounded review_issues, an optional preview_draft and the original request reference. The user can inspect the last rejected draft or edit the original request. Each generated version also appears in Receptutkast från denna körning during review and remains available after an all-rejected request, including after refreshing the same tab for up to one hour. Välj som nytt receptunderlag copies an explicitly selected version and its issues back into the form for a new independent review. The existing draft_versions array is returned in progress and detailed result/error responses, restricted to the originating session. These previews are never regular saved candidates, shared or published. Progress research remains request scoped and private text is not sent to the operational log.