# Start Here



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.

<Callout title="You need an API key">
  Sign up at [bettermenu.live](https://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>`.
</Callout>

How do I authenticate a request? [#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`.

```bash
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`](/docs/api/entitlements/getEntitlementStatus) to confirm your account's plan and access before building further.

How do I create my first recipe? [#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.

```bash
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](/docs/api/studio/createRecipe) for the full request and response schema.

How do I resolve ingredients to nutrition data? [#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.

1. Start a session — [`POST /studio/recipes/{recipe_id}/ingredient-resolutions`](/docs/api/studio/startIngredientResolutionSession)
2. Confirm the matches — [`POST /studio/recipes/{recipe_id}/ingredient-resolutions/{session_id}/confirm`](/docs/api/studio/confirmIngredientResolutionSession)

You can fetch the most recent session at any time with [`GET .../ingredient-resolutions/latest`](/docs/api/studio/getLatestIngredientResolutionSession) to resume where you left off.

How do I compute nutrition and generate a label? [#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.

1. Compute recipe nutrition — [`POST /studio/recipes/{recipe_id}/nutrition/compute`](/docs/api/studio/computeRecipeNutrition)
2. Read the analysis — [`GET /studio/recipes/{recipe_id}/nutrition/analysis`](/docs/api/studio/getRecipeNutritionalAnalysis)
3. Compute serving nutrition facts — [`POST /studio/recipes/{recipe_id}/servings/{serving_id}/nutrition-facts/compute`](/docs/api/studio/computeNutritionFacts)
4. Generate the label — [`GET /studio/recipes/{recipe_id}/servings/{serving_id}/nutrition-label`](/docs/api/studio/getRecipeNutritionLabel)

What should I explore next? [#what-should-i-explore-next]

Browse the full [Studio API reference](/docs/api/studio) 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](/docs/guide).
