---
title: "Create custom food item with image"
method: POST
path: "/api/meals/foods"
tags: ["Meals"]
---

# Create custom food item with image

`POST /api/meals/foods`

## Request

- Base URL: `https://api.hiyd.ai`
- URL: `https://api.hiyd.ai/api/meals/foods`
- Auth: HTTP bearer

Creates a private custom food owned by the caller (created_by_user_id = current user, visibility = 'private'), so it only surfaces in the owner's searches. This endpoint is the seam for the future custom-foods/recipes and sharing feature (visibility 'private' | 'shared' | 'public').

## Request body `multipart/form-data`

- object
  - `name` string, required
  - `brand` string
  - `category` 'breakfast' | 'lunch' | 'dinner' | 'snack' | 'beverage', required
  - `food_type` string
  - `serving_size_g` number
  - `serving_size_unit` string
  - `calories` number, required
  - `protein_g` number
  - `carbs_g` number
  - `fat_g` number
  - `saturated_fat_g` number, nullable
  - `fiber_g` number
  - `sugar_g` number
  - `ingredients` string[]: List of ingredients in this food item
  - `prep_time_minutes` number: Food preparation time in minutes
  - `image` string, binary: Food image file (max 5MB)

## Response `201`

Food item created

---

[API](https://skmtc.dev/hiyd/apis/hiyd-backend-api.md) - [All operations](https://skmtc.dev/hiyd/apis/hiyd-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hiyd/apis/hiyd-backend-api/revisions/23598d347e1b?raw)
