Start Here
Authenticate and make your first BetterMenu Studio API calls — create a recipe, resolve its ingredients, and generate an FDA nutrition label.
The BetterMenu Studio API turns a recipe into FDA-compliant nutrition data and labels. This quick start walks the full path: authenticate, create a recipe, resolve its ingredients to nutrition data, compute the nutrition facts, and generate a label — the same workflow the Studio app uses.
You need an API key
Sign up at bettermenu.live, open the API settings page, and generate a personal API key. Send it as a Bearer token on every request: Authorization: Bearer <your-api-key>.
How do I authenticate a request?
Every request must include your API key as a Bearer token in the Authorization header. Keep the key server-side — it grants full access to your account's recipes and nutrition data. The examples below use the production host https://api.bettermenu.io.
curl https://api.bettermenu.io/studio/recipes \
-H "Authorization: Bearer <your-api-key>"If a request is missing or has an invalid key, the API responds with 401 Unauthorized. Use GET /entitlements/status to confirm your account's plan and access before building further.
How do I create my first recipe?
A recipe is the core aggregate in Studio — it holds ingredients, servings, and the nutrition computed from them. Create one with a POST to /studio/recipes. The response returns the new recipe id plus a version_id, which is your edit token for safe concurrent updates.
curl -X POST https://api.bettermenu.io/studio/recipes \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{ "name": "Garden Salad" }'When you later edit the recipe, send the latest version_id as an If-Match header. If someone else changed the recipe first, the API returns 412 Precondition Failed with current_version_id so you can refetch and retry. See Create Recipe for the full request and response schema.
How do I resolve ingredients to nutrition data?
Studio resolves the free-text ingredients on a recipe to backing nutrition records through a resolution session. Start a session, review the candidate matches it proposes, then confirm the ones you want.
- Start a session —
POST /studio/recipes/{recipe_id}/ingredient-resolutions - Confirm the matches —
POST /studio/recipes/{recipe_id}/ingredient-resolutions/{session_id}/confirm
You can fetch the most recent session at any time with GET .../ingredient-resolutions/latest to resume where you left off.
How do I compute nutrition and generate a label?
Once ingredients are resolved, compute the recipe's nutrition and generate an FDA nutrition facts label for a serving. Computation is explicit so results stay reproducible.
- Compute recipe nutrition —
POST /studio/recipes/{recipe_id}/nutrition/compute - Read the analysis —
GET /studio/recipes/{recipe_id}/nutrition/analysis - Compute serving nutrition facts —
POST /studio/recipes/{recipe_id}/servings/{serving_id}/nutrition-facts/compute - Generate the label —
GET /studio/recipes/{recipe_id}/servings/{serving_id}/nutrition-label
What should I explore next?
Browse the full Studio API reference for every recipe, serving, ingredient-resolution, nutrition, and label endpoint. For background on the concepts behind these calls — recipes, nutrients, allergens, and serving sizes — see the BetterMenu Guide.