{
  "openapi": "3.1.0",
  "info": {
    "title": "PlateHerder API",
    "version": "1.2.0",
    "description": "Private cooking library engine. User-scoped OAuth access tokens or manual account tokens. OAuth linking guide: https://plateherder.com/oauth-integration.md. Server-to-server integration; no browser CORS contract. Google OAuth verification is pending.",
    "termsOfService": "https://plateherder.com/terms"
  },
  "servers": [
    {
      "url": "https://plateherder.com/api/v1"
    }
  ],
  "security": [
    {
      "accountToken": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "getIdentity",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Stable PlateHerder user ID for this token. No email or Google credential. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "token_expires_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quotas": {
                      "type": "object",
                      "properties": {
                        "extracts": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number"
                            },
                            "remaining": {
                              "type": "number"
                            },
                            "resets_at": {
                              "type": "string"
                            },
                            "global_safety_limit": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "limit",
                            "remaining",
                            "resets_at",
                            "global_safety_limit"
                          ]
                        },
                        "library_cap": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "extracts",
                        "library_cap"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "token_expires_at",
                    "scopes",
                    "quotas"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/foods": {
      "get": {
        "operationId": "searchFoods",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Search USDA SR Legacy reference descriptions. Results are candidates, not automatic food matches. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "foods": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Food"
                      }
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 120
            }
          }
        ]
      }
    },
    "/foods/{food_id}": {
      "parameters": [
        {
          "name": "food_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^usda:[0-9]+$"
          }
        }
      ],
      "get": {
        "operationId": "getFood",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Read reference nutrients per 100 edible grams in the stated preparation state. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Food"
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/extracts": {
      "post": {
        "operationId": "createExtract",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "extract:create"
            ]
          }
        ],
        "description": "Queue one extraction. Exactly one of url or text. Jobs expire after 24 hours; do not retry POST automatically after an uncertain network result. Required scope: extract:create.",
        "x-required-scopes": [
          "extract:create"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "url"
                    ],
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048,
                        "pattern": "^https?://"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "text"
                    ],
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 10,
                        "maxLength": 30000
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "status": {
                      "type": "string",
                      "const": "pending"
                    },
                    "claim_token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "claim_token"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/extracts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "getExtract",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "extract:create"
            ]
          }
        ],
        "description": "Poll every 2-3 seconds. Stop at ready, needs_review or failed; save only terminal ready/needs_review. Failed jobs still return HTTP 200. Required scope: extract:create.",
        "x-required-scopes": [
          "extract:create"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Extract"
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/plates": {
      "get": {
        "operationId": "listPlates",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Search own library. format=summary omits ingredients, steps and notes and returns PlateSummary cards. Default full responses remain compatible. Default summary browsing uses keyset pagination; filtered searches scan at most 500 metadata records. Cursors are opaque; restart when filters/sort change. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "plates": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/Plate"
                          },
                          {
                            "$ref": "#/components/schemas/PlateSummary"
                          }
                        ]
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "plates",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "full",
                "summary"
              ],
              "default": "full"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ingredient",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "diet_tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "plate",
                "shake",
                "component"
              ]
            }
          },
          {
            "name": "max_kcal",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Per serving. Unknown, incomplete and stale nutrition excluded."
          },
          {
            "name": "min_protein_g",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Per serving. Unknown, incomplete and stale nutrition excluded."
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "kcal",
                "minutes",
                "protein_per_kcal"
              ],
              "default": "created"
            }
          },
          {
            "name": "max_minutes",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Uses known total_minutes; unknown times are excluded."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque to clients; pass next_cursor unchanged."
          }
        ]
      },
      "post": {
        "operationId": "savePlate",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:write"
            ]
          }
        ],
        "description": "Save a full draft or an extraction. Saving the same extract_id is idempotent and returns the existing plate with 201; corrections on subsequent saves are ignored. Use PATCH to edit it. Required scope: plates:write. Save one recipe from an owned group with collection_id and zero-based recipe_index. Repeated saves return the same independently editable plate.",
        "x-required-scopes": [
          "plates:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PlateInput"
                  },
                  {
                    "type": "object",
                    "required": [
                      "extract_id"
                    ],
                    "properties": {
                      "extract_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "plate": {
                        "$ref": "#/components/schemas/PlatePatch"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "collection_id",
                      "recipe_index"
                    ],
                    "properties": {
                      "collection_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "recipe_index": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 11
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plate"
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/plates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "getPlate",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Read own saved plate. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plate"
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updatePlate",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:write"
            ]
          }
        ],
        "description": "Partial top-level update. Arrays and source replace the entire corresponding value; omitted fields remain. Last write wins; no conditional-write support. Required scope: plates:write.",
        "x-required-scopes": [
          "plates:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatePatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plate"
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePlate",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:write"
            ]
          }
        ],
        "description": "Delete own saved plate. Existing shopping/household snapshots are separate; deletion does not remove those snapshots. Required scope: plates:write.",
        "x-required-scopes": [
          "plates:write"
        ],
        "responses": {
          "204": {
            "description": "Deleted; no response body."
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/plates/{id}/ingredients": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "getIngredients",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Read ingredients. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingredients": {
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "raw": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "qty": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 80
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 200
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "grams": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 10000000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "food_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^usda:\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "food_name": {
                            "type": "string"
                          },
                          "per_100g": {
                            "type": "object",
                            "properties": {
                              "kcal": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "protein_g": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "carbs_g": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fat_g": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fiber_g": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "kcal",
                              "protein_g"
                            ]
                          },
                          "match_method": {
                            "type": "string",
                            "enum": [
                              "user_selected",
                              "exact",
                              "unmatched"
                            ]
                          },
                          "grams_method": {
                            "type": "string",
                            "enum": [
                              "user",
                              "mass_unit",
                              "unknown"
                            ]
                          }
                        },
                        "required": [
                          "raw",
                          "qty",
                          "unit",
                          "item"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ingredients"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/plates/{id}/steps": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "getSteps",
        "security": [
          {
            "accountToken": []
          },
          {
            "plateherderOAuth": [
              "plates:read"
            ]
          }
        ],
        "description": "Read steps. Timestamps can be null or estimated. Required scope: plates:read.",
        "x-required-scopes": [
          "plates:read"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "timestamp_seconds": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 86400
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "timestamp_status": {
                            "type": "string",
                            "enum": [
                              "unverified",
                              "model_checked",
                              "user_corrected"
                            ]
                          },
                          "duration_seconds": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 604800
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "position",
                          "text",
                          "timestamp_seconds",
                          "duration_seconds"
                        ]
                      }
                    }
                  },
                  "required": [
                    "steps"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "See error.message. 401: missing session; 403: token invalid, expired, revoked or insufficient scope; 404: absent or not owned; 409: not ready, full library or claim conflict; 429: extraction quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "accountToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "ph_ bearer token: one-hour OAuth access token or manual 90-day account token. Each operation declares x-required-scopes. See /oauth-integration.md for linking and refresh."
      },
      "plateherderOAuth": {
        "type": "oauth2",
        "description": "Registered public clients with mandatory PKCE S256, state and exact callback URLs. Token endpoint auth method none. Resource scopes are declared by x-required-scopes.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://plateherder.com/oauth/authorize",
            "tokenUrl": "https://plateherder.com/api/oauth/token",
            "refreshUrl": "https://plateherder.com/api/oauth/token",
            "scopes": {
              "plates:read": "Read private plates, nutrition, notes, tags and source details",
              "plates:write": "Save, edit and delete plates",
              "extract:create": "Create and poll extraction jobs"
            }
          }
        }
      }
    },
    "schemas": {
      "Plate": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "plate",
              "shake",
              "component"
            ]
          },
          "source_nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kcal": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "protein_g": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carbs_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fat_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiber_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kcal",
                  "protein_g"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "youtube",
                  "web",
                  "paste"
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "video_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[\\w-]{11}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "channel": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "orientation": {
                "type": "string",
                "enum": [
                  "portrait",
                  "landscape",
                  "unknown"
                ]
              }
            },
            "required": [
              "type",
              "url",
              "video_id",
              "channel",
              "title"
            ]
          },
          "servings": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "prep_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "cook_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "total_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "equipment": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "diet_tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "ingredients": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "qty": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "item": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grams": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^usda:\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_name": {
                  "type": "string"
                },
                "per_100g": {
                  "type": "object",
                  "properties": {
                    "kcal": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "protein_g": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "carbs_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fat_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fiber_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kcal",
                    "protein_g"
                  ]
                },
                "match_method": {
                  "type": "string",
                  "enum": [
                    "user_selected",
                    "exact",
                    "unmatched"
                  ]
                },
                "grams_method": {
                  "type": "string",
                  "enum": [
                    "user",
                    "mass_unit",
                    "unknown"
                  ]
                }
              },
              "required": [
                "raw",
                "qty",
                "unit",
                "item"
              ]
            }
          },
          "steps": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "timestamp_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 86400
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp_status": {
                  "type": "string",
                  "enum": [
                    "unverified",
                    "model_checked",
                    "user_corrected"
                  ]
                },
                "duration_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 604800
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "text",
                "timestamp_seconds",
                "duration_seconds"
              ]
            }
          },
          "warnings": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "yield_grams": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "serving_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "nutrition": {
            "type": "object",
            "properties": {
              "per_serving": {
                "type": "object",
                "properties": {
                  "kcal": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "protein_g": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carbs_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fat_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiber_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kcal",
                  "protein_g"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "unknown",
                  "estimated",
                  "user_confirmed"
                ]
              },
              "method": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "ingredients",
                      "user",
                      "creator",
                      "label"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "computed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serving_size": {
                "type": "object",
                "properties": {
                  "grams": {
                    "anyOf": [
                      {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "label": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "grams",
                  "label"
                ]
              },
              "missing_ingredients": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "complete": {
                "type": "boolean"
              },
              "stale": {
                "type": "boolean"
              }
            },
            "required": [
              "per_serving"
            ]
          },
          "tags": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "notes": {
            "default": "",
            "type": "string",
            "maxLength": 4000
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "extract_status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "failed",
              "ready",
              "needs_review"
            ]
          },
          "extract_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipes": {
            "type": "array",
            "maxItems": 12,
            "items": {
              "$ref": "#/components/schemas/RecipePart"
            },
            "description": "Empty or 2?12 separate recipes sharing the parent source. Groups have no combined nutrition."
          },
          "brand": {
            "type": "string",
            "maxLength": 120,
            "description": "Optional preferred brand or variety."
          },
          "food_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Saved grocery display name, independent of nutrition serving quantities."
          },
          "favorite": {
            "type": "boolean"
          },
          "collections": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "food_category": {
            "type": "string",
            "enum": [
              "Produce",
              "Dairy & eggs",
              "Meat & fish",
              "Pantry",
              "Snacks",
              "Drinks",
              "Frozen",
              "Other"
            ]
          }
        },
        "required": [
          "title",
          "source",
          "servings",
          "prep_minutes",
          "cook_minutes",
          "total_minutes",
          "equipment",
          "diet_tags",
          "ingredients",
          "steps",
          "nutrition",
          "id",
          "created_at",
          "updated_at",
          "extract_status"
        ]
      },
      "PlateSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "plate",
              "shake",
              "component"
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "youtube",
                  "web",
                  "paste"
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "video_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[\\w-]{11}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "channel": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "orientation": {
                "type": "string",
                "enum": [
                  "portrait",
                  "landscape",
                  "unknown"
                ]
              }
            },
            "required": [
              "type",
              "url",
              "video_id",
              "channel",
              "title"
            ]
          },
          "servings": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "total_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "per_serving": {
                    "type": "object",
                    "properties": {
                      "kcal": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "protein_g": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "carbs_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fat_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fiber_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kcal",
                      "protein_g"
                    ]
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "unknown",
                      "estimated",
                      "user_confirmed"
                    ]
                  },
                  "method": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ingredients",
                          "user",
                          "creator",
                          "label"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computed_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serving_size": {
                    "type": "object",
                    "properties": {
                      "grams": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "grams",
                      "label"
                    ]
                  },
                  "missing_ingredients": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "stale": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "per_serving"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "diet_tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ingredient_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "recipe_count": {
            "type": "integer",
            "minimum": 0
          },
          "brand": {
            "type": "string",
            "maxLength": 120,
            "description": "Optional preferred brand or variety."
          },
          "food_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Saved grocery display name, independent of nutrition serving quantities."
          },
          "favorite": {
            "type": "boolean"
          },
          "collections": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "food_category": {
            "type": "string",
            "enum": [
              "Produce",
              "Dairy & eggs",
              "Meat & fish",
              "Pantry",
              "Snacks",
              "Drinks",
              "Frozen",
              "Other"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "source",
          "servings",
          "total_minutes",
          "nutrition",
          "diet_tags",
          "created_at",
          "updated_at",
          "ingredient_count"
        ]
      },
      "Food": {
        "type": "object",
        "properties": {
          "food_id": {
            "type": "string"
          },
          "food_name": {
            "type": "string"
          },
          "per_100g": {
            "type": "object",
            "properties": {
              "kcal": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "protein_g": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "carbs_g": {
                "default": null,
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "fat_g": {
                "default": null,
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "fiber_g": {
                "default": null,
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kcal",
              "protein_g"
            ]
          },
          "source": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          }
        },
        "required": [
          "food_id",
          "food_name",
          "per_100g"
        ]
      },
      "PlateInput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "plate",
              "shake",
              "component"
            ]
          },
          "source_nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kcal": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "protein_g": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carbs_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fat_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiber_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kcal",
                  "protein_g"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "youtube",
                  "web",
                  "paste"
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "video_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[\\w-]{11}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "channel": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "orientation": {
                "type": "string",
                "enum": [
                  "portrait",
                  "landscape",
                  "unknown"
                ]
              }
            },
            "required": [
              "type",
              "url",
              "video_id",
              "channel",
              "title"
            ]
          },
          "servings": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "prep_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "cook_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "total_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "equipment": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "diet_tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "ingredients": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "qty": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "item": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grams": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^usda:\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_name": {
                  "type": "string"
                },
                "per_100g": {
                  "type": "object",
                  "properties": {
                    "kcal": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "protein_g": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "carbs_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fat_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fiber_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kcal",
                    "protein_g"
                  ]
                },
                "match_method": {
                  "type": "string",
                  "enum": [
                    "user_selected",
                    "exact",
                    "unmatched"
                  ]
                },
                "grams_method": {
                  "type": "string",
                  "enum": [
                    "user",
                    "mass_unit",
                    "unknown"
                  ]
                }
              },
              "required": [
                "raw",
                "qty",
                "unit",
                "item"
              ]
            }
          },
          "steps": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "timestamp_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 86400
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp_status": {
                  "type": "string",
                  "enum": [
                    "unverified",
                    "model_checked",
                    "user_corrected"
                  ]
                },
                "duration_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 604800
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "text",
                "timestamp_seconds",
                "duration_seconds"
              ]
            }
          },
          "warnings": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "yield_grams": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "serving_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "per_serving": {
                    "type": "object",
                    "properties": {
                      "kcal": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "protein_g": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "carbs_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fat_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fiber_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kcal",
                      "protein_g"
                    ]
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "unknown",
                      "estimated",
                      "user_confirmed"
                    ]
                  },
                  "method": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ingredients",
                          "user",
                          "creator",
                          "label"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computed_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serving_size": {
                    "type": "object",
                    "properties": {
                      "grams": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "grams",
                      "label"
                    ]
                  },
                  "missing_ingredients": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "stale": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "per_serving"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "notes": {
            "default": "",
            "type": "string",
            "maxLength": 4000
          },
          "recipes": {
            "type": "array",
            "maxItems": 12,
            "items": {
              "$ref": "#/components/schemas/RecipePart"
            },
            "description": "Empty or 2?12 separate recipes sharing the parent source. Groups have no combined nutrition."
          },
          "brand": {
            "type": "string",
            "maxLength": 120,
            "description": "Optional preferred brand or variety."
          },
          "food_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Saved grocery display name, independent of nutrition serving quantities."
          },
          "favorite": {
            "type": "boolean"
          },
          "collections": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "food_category": {
            "type": "string",
            "enum": [
              "Produce",
              "Dairy & eggs",
              "Meat & fish",
              "Pantry",
              "Snacks",
              "Drinks",
              "Frozen",
              "Other"
            ]
          }
        },
        "required": [
          "title",
          "source",
          "servings",
          "prep_minutes",
          "cook_minutes",
          "total_minutes",
          "equipment",
          "diet_tags",
          "ingredients",
          "steps"
        ]
      },
      "PlatePatch": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "plate",
              "shake",
              "component"
            ]
          },
          "source_nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kcal": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "protein_g": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carbs_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fat_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiber_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kcal",
                  "protein_g"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "youtube",
                  "web",
                  "paste"
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "video_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[\\w-]{11}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "channel": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "orientation": {
                "type": "string",
                "enum": [
                  "portrait",
                  "landscape",
                  "unknown"
                ]
              }
            },
            "required": [
              "type",
              "url",
              "video_id",
              "channel",
              "title"
            ]
          },
          "servings": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "prep_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "cook_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "total_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "equipment": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "diet_tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "ingredients": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "qty": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "item": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grams": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^usda:\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_name": {
                  "type": "string"
                },
                "per_100g": {
                  "type": "object",
                  "properties": {
                    "kcal": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "protein_g": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "carbs_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fat_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fiber_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kcal",
                    "protein_g"
                  ]
                },
                "match_method": {
                  "type": "string",
                  "enum": [
                    "user_selected",
                    "exact",
                    "unmatched"
                  ]
                },
                "grams_method": {
                  "type": "string",
                  "enum": [
                    "user",
                    "mass_unit",
                    "unknown"
                  ]
                }
              },
              "required": [
                "raw",
                "qty",
                "unit",
                "item"
              ]
            }
          },
          "steps": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "timestamp_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 86400
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp_status": {
                  "type": "string",
                  "enum": [
                    "unverified",
                    "model_checked",
                    "user_corrected"
                  ]
                },
                "duration_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 604800
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "text",
                "timestamp_seconds",
                "duration_seconds"
              ]
            }
          },
          "warnings": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "yield_grams": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "serving_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "per_serving": {
                    "type": "object",
                    "properties": {
                      "kcal": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "protein_g": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "carbs_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fat_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fiber_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kcal",
                      "protein_g"
                    ]
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "unknown",
                      "estimated",
                      "user_confirmed"
                    ]
                  },
                  "method": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ingredients",
                          "user",
                          "creator",
                          "label"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computed_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serving_size": {
                    "type": "object",
                    "properties": {
                      "grams": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "grams",
                      "label"
                    ]
                  },
                  "missing_ingredients": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "stale": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "per_serving"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "notes": {
            "type": "string",
            "maxLength": 4000
          },
          "recipes": {
            "type": "array",
            "maxItems": 12,
            "items": {
              "$ref": "#/components/schemas/RecipePart"
            },
            "description": "Empty or 2?12 separate recipes sharing the parent source. Groups have no combined nutrition."
          },
          "brand": {
            "type": "string",
            "maxLength": 120,
            "description": "Optional preferred brand or variety."
          },
          "food_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Saved grocery display name, independent of nutrition serving quantities."
          },
          "favorite": {
            "type": "boolean"
          },
          "collections": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "food_category": {
            "type": "string",
            "enum": [
              "Produce",
              "Dairy & eggs",
              "Meat & fish",
              "Pantry",
              "Snacks",
              "Drinks",
              "Frozen",
              "Other"
            ]
          }
        }
      },
      "PlateDraft": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "plate",
              "shake",
              "component"
            ]
          },
          "source_nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kcal": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "protein_g": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carbs_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fat_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiber_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kcal",
                  "protein_g"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "youtube",
                  "web",
                  "paste"
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "video_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[\\w-]{11}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "channel": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "orientation": {
                "type": "string",
                "enum": [
                  "portrait",
                  "landscape",
                  "unknown"
                ]
              }
            },
            "required": [
              "type",
              "url",
              "video_id",
              "channel",
              "title"
            ]
          },
          "servings": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "prep_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "cook_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "total_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "equipment": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "diet_tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "ingredients": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "qty": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "item": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grams": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^usda:\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_name": {
                  "type": "string"
                },
                "per_100g": {
                  "type": "object",
                  "properties": {
                    "kcal": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "protein_g": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "carbs_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fat_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fiber_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kcal",
                    "protein_g"
                  ]
                },
                "match_method": {
                  "type": "string",
                  "enum": [
                    "user_selected",
                    "exact",
                    "unmatched"
                  ]
                },
                "grams_method": {
                  "type": "string",
                  "enum": [
                    "user",
                    "mass_unit",
                    "unknown"
                  ]
                }
              },
              "required": [
                "raw",
                "qty",
                "unit",
                "item"
              ]
            }
          },
          "steps": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "timestamp_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 86400
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp_status": {
                  "type": "string",
                  "enum": [
                    "unverified",
                    "model_checked",
                    "user_corrected"
                  ]
                },
                "duration_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 604800
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "text",
                "timestamp_seconds",
                "duration_seconds"
              ]
            }
          },
          "warnings": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "yield_grams": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "serving_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "per_serving": {
                    "type": "object",
                    "properties": {
                      "kcal": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "protein_g": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "carbs_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fat_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fiber_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kcal",
                      "protein_g"
                    ]
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "unknown",
                      "estimated",
                      "user_confirmed"
                    ]
                  },
                  "method": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ingredients",
                          "user",
                          "creator",
                          "label"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computed_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serving_size": {
                    "type": "object",
                    "properties": {
                      "grams": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "grams",
                      "label"
                    ]
                  },
                  "missing_ingredients": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "stale": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "per_serving"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "notes": {
            "default": "",
            "type": "string",
            "maxLength": 4000
          },
          "recipes": {
            "type": "array",
            "maxItems": 12,
            "items": {
              "$ref": "#/components/schemas/RecipePart"
            },
            "description": "Empty or 2?12 separate recipes sharing the parent source. Groups have no combined nutrition."
          },
          "brand": {
            "type": "string",
            "maxLength": 120,
            "description": "Optional preferred brand or variety."
          },
          "food_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Saved grocery display name, independent of nutrition serving quantities."
          },
          "favorite": {
            "type": "boolean"
          },
          "collections": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "food_category": {
            "type": "string",
            "enum": [
              "Produce",
              "Dairy & eggs",
              "Meat & fish",
              "Pantry",
              "Snacks",
              "Drinks",
              "Frozen",
              "Other"
            ]
          }
        },
        "required": [
          "title",
          "source",
          "servings",
          "prep_minutes",
          "cook_minutes",
          "total_minutes",
          "equipment",
          "diet_tags",
          "ingredients",
          "steps"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "required": [
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Extract": {
        "type": "object",
        "required": [
          "id",
          "status",
          "stage",
          "preview",
          "error",
          "draft",
          "expires_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "ready",
              "needs_review",
              "failed"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "preview": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlateDraft"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RecipePart": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "plate",
              "shake",
              "component"
            ]
          },
          "source_nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kcal": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "protein_g": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "carbs_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fat_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiber_g": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kcal",
                  "protein_g"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "servings": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "prep_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "cook_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "total_minutes": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "equipment": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "diet_tags": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 60
            }
          },
          "ingredients": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "qty": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "item": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grams": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^usda:\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "food_name": {
                  "type": "string"
                },
                "per_100g": {
                  "type": "object",
                  "properties": {
                    "kcal": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "protein_g": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "carbs_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fat_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fiber_g": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kcal",
                    "protein_g"
                  ]
                },
                "match_method": {
                  "type": "string",
                  "enum": [
                    "user_selected",
                    "exact",
                    "unmatched"
                  ]
                },
                "grams_method": {
                  "type": "string",
                  "enum": [
                    "user",
                    "mass_unit",
                    "unknown"
                  ]
                }
              },
              "required": [
                "raw",
                "qty",
                "unit",
                "item"
              ]
            }
          },
          "steps": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "timestamp_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 86400
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp_status": {
                  "type": "string",
                  "enum": [
                    "unverified",
                    "model_checked",
                    "user_corrected"
                  ]
                },
                "duration_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 604800
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "text",
                "timestamp_seconds",
                "duration_seconds"
              ]
            }
          },
          "warnings": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "yield_grams": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000000
              },
              {
                "type": "null"
              }
            ]
          },
          "serving_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "nutrition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "per_serving": {
                    "type": "object",
                    "properties": {
                      "kcal": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "protein_g": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "carbs_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fat_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fiber_g": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kcal",
                      "protein_g"
                    ]
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "unknown",
                      "estimated",
                      "user_confirmed"
                    ]
                  },
                  "method": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ingredients",
                          "user",
                          "creator",
                          "label"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computed_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serving_size": {
                    "type": "object",
                    "properties": {
                      "grams": {
                        "anyOf": [
                          {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "grams",
                      "label"
                    ]
                  },
                  "missing_ingredients": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "stale": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "per_serving"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "notes": {
            "default": "",
            "type": "string",
            "maxLength": 4000
          }
        },
        "required": [
          "title",
          "servings",
          "prep_minutes",
          "cook_minutes",
          "total_minutes",
          "equipment",
          "diet_tags",
          "ingredients",
          "steps"
        ]
      }
    }
  }
}
