recipes

Draft a recipe from a description, for a curator to finish

Bounded AI assistance. The model writes a first draft; the ingredients it names go through the same catalogue matching as a photo scan or a CSV import, so they arrive unresolved and have to be reviewed before the recipe can be published. The draft is always private and unpublished, and the model never supplies nutrition, CC values or filter tags -- those come from the roll-up over matched foods. A failed draft returns 503 and persists nothing, so manual creation is never blocked by it. A request the model declines returns 400 with its reason, so the author can rewrite the description instead of guessing.

post/chefs/recipes/draft

Request body

descriptionstring required

What the recipe should be, in the author's own words. The model drafts text only: every ingredient it names is matched against the food catalogue like any scanned line, and nutrition, CC values and filter tags still come from the deterministic roll-up.

Response

a private draft recipe with ingredients awaiting review

authorstring nullable
calculated_servingsnumber nullable
calculation_versionstring nullable
cc_override_keysstring[] nullable
chef_idinteger nullable
curation_status'draft' | 'published' | 'archived'
custom_itemboolean nullable
filter_tagsstring[] nullable
food_namestring nullable
food_name_aliasstring nullable
food_name_alias_translationsobject nullable
food_name_translationsobject nullable
forked_from_recipe_idinteger nullable
idnumber required
image_urlstring nullable
ingredientsstring[] required
instructions_strstring nullable
internal_notesstring nullable
labelstring required
label_translationsobject nullable required
net_serving_size_gnumber nullable
notestring nullable
organizationstring nullable
patient_idinteger nullable
percent_eatennumber nullable
preparation_method'' | 'homemade' | 'restaurant' | 'cpg' | 'store_bought' | 'other'
serving_unit_amountnumber nullable
serving_unit_labelstring nullable
serving_unit_label_translationsobject nullable
servingsnumber nullable
source'user' | 'chef' | 'imported' | 'edamam' nullable
story_moderation_status'draft' | 'approved' | 'rejected' nullable

Curator-only; null in a patient response, which says nothing about editorial state.

tag_override_keysstring[] nullable
unresolved_ingredient_countinteger nullable
urlstring nullable required
variant_labelsstring[] nullable

How this copy differs from its original, e.g. vegan or gluten-free. Only set on recipes with forked_from_recipe_id.

visibility'private' | 'public' | 'shared'
yield_amountnumber nullable
yield_unit_labelstring nullable

Example response

{
  "author": "Jane Doe",
  "image_url": "https://example.com",
  "ingredient_groups": [
    {
      "ingredients": [
        {
          "description": "1 cup of milk",
          "food_name": "milk",
          "food_name_alias": "milk",
          "nutrient_overrides": {
            "aa_patient": {
              "ontology": {
                "id": 42,
                "levels": [
                  "food"
                ]
              }
            },
            "bb_reviewer": {
              "ontology": {
                "id": 42,
                "levels": [
                  "food"
                ]
              }
            },
            "cc_external": {
              "ontology": {
                "id": 42,
                "levels": [
                  "food"
                ]
              }
            },
            "dd_estimate": {
              "ontology": {
                "id": 42,
                "levels": [
                  "food"
                ]
              }
            },
            "ee_validation": {
              "ontology": {
                "id": 42,
                "levels": [
                  "food"
                ]
              }
            }
          },
          "serving_unit_label": "cup"
        }
      ]
    }
  ],
  "ingredient_responses": [
    {
      "description": "1 cup of milk",
      "food_name": "milk",
      "food_name_alias": "milk",
      "nutrient_overrides": {
        "aa_patient": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "bb_reviewer": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "cc_external": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "dd_estimate": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "ee_validation": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        }
      },
      "serving_unit_label": "cup"
    }
  ],
  "ingredients": [
    "1 cup milk"
  ],
  "instructions_str": "Some instructions",
  "label": "Quinoa Salad",
  "nutrient_overrides": {
    "aa_patient": {
      "ontology": {
        "id": 42,
        "levels": [
          "food"
        ]
      }
    },
    "bb_reviewer": {
      "ontology": {
        "id": 42,
        "levels": [
          "food"
        ]
      }
    },
    "cc_external": {
      "ontology": {
        "id": 42,
        "levels": [
          "food"
        ]
      }
    },
    "dd_estimate": {
      "ontology": {
        "id": 42,
        "levels": [
          "food"
        ]
      }
    },
    "ee_validation": {
      "ontology": {
        "id": 42,
        "levels": [
          "food"
        ]
      }
    }
  },
  "organization": "Diabetes Canada",
  "url": "https://example.com"
}

Changes