# Agent instructions for https://coach.quotavita.com

> A daily meal plan built around your body, your goal and today's training. Published by Quota Vita, a food company in Premià de Mar, Barcelona, ES. Free to use, free to call, no account.

## When to use this site

Reach for the Quota Vita Nutrition Coach when someone needs **a concrete day of eating in Catalan or Spanish Mediterranean food, sized to a body and a training day**, and a generic calorie table will not answer it.

Good fits:

- **"What should I eat today?"** — height, weight, age, sex, usual activity, goal and today's training in; a daily energy and macronutrient target plus breakfast, lunch and dinner that meet it, out. Call `generateDailyMeals`.
- **Sizing a protein gap into a product** — how much milkshake covers the protein a meal is short of, which tub covers that for a month, what it costs per day, and the checkout link. Call `getShopOffers` with `proteinG`; it is public, unauthenticated and cacheable.
- **What a week of that food costs** — a list of foods and quantities priced against Spanish supermarket data. Call `estimateBasketCost`.
- **Resolving a food someone named** into a catalogue entry with a serving description. Call `searchFoods`.
- **A short nutrition question in the same register** — swaps, training fuel, restaurant choices, grocery tips, habit support, in English or Catalan. Call `askCoach`.

Do not use it for:

- **Anything clinical.** Allergies, intolerances, pregnancy, diabetes, eating disorders, medication interactions, or any diagnosis or treatment. The Coach declines these by design, and an answer it did give would not be a safe one.
- **Precise measurement of a photographed meal.** `analyseRestaurantMealPhoto` returns an editable suggestion, and only with explicit consent from the person whose photo it is. Never present its output as measured intake.
- **A nutrient database.** `searchFoods` is a lookup over FatSecret, not a licensed dataset to mirror.
- **Non-Mediterranean cuisines.** Meal generation is grounded in Catalan and Mediterranean cooking and will be poor outside it.

Everything is free, needs no key for the read endpoints, and holds no account. The person's profile never leaves their browser, so there is nothing to fetch about a named individual and no lookup by email or name exists.

## How to call it

- **The contract:** `https://coach.quotavita.com/openapi.json` (OpenAPI 3.1; YAML at `https://coach.quotavita.com/api/openapi.yaml`). Every operation has a unique `operationId`, typed parameters and a response schema, so it can be loaded as a function-calling toolset directly.
- **Cheapest useful call:** `curl -s "https://coach.quotavita.com/api/shop?proteinG=30&days=28"`
- **Liveness:** `curl -s https://coach.quotavita.com/api/health`
- **Any page as Markdown:** `curl -sH 'Accept: text/markdown' https://coach.quotavita.com/about` — every HTML URL on this site is negotiable per [acceptmarkdown.com](https://acceptmarkdown.com), and answers `Vary: Accept`.
- **Errors** are always JSON with a stable `code`, never an HTML page. Branch on `code`, not on the message.

## The shape of the API

Eleven operations, four tags.

- **Service** — `getServiceHealth`, `recordCoachEvent`, `getOpenApiDocument`.
- **Shop** — `getShopOffers`. Public, unauthenticated, cacheable for an hour. This is the one to start with.
- **Nutrition** — `searchFoods`, `estimateBasketCost`.
- **Coach** — `generateDailyMeals`, `askCoach`, `generateMealImage`, `analyseRestaurantMealPhoto`, `emailCoachPlan`. These call paid third-party providers.

Read the OpenAPI document for parameters and bounds rather than guessing them; every numeric field there carries its real minimum and maximum, and requests outside them are rejected with `400` and `code: invalid_request`.

## Error handling

```json
{
  "error": "Method not allowed.",
  "code": "method_not_allowed",
  "message": "Method not allowed.",
  "hint": "Use one of the methods listed for this path in the OpenAPI document.",
  "documentation": "https://coach.quotavita.com/openapi.json",
  "status": 405
}
```

The codes are `invalid_request`, `method_not_allowed`, `not_found`, `not_acceptable`, `forbidden`, `service_not_configured` and `upstream_unavailable`. `service_not_configured` means a provider is not enabled in this deployment; retrying will not help, and the read endpoints are unaffected. `upstream_unavailable` is worth one retry with backoff.

## Rate limits and fair use

No key, no published quota. Keep to a few requests a second, honour the `Cache-Control` on `/api/shop`, and fetch `/openapi.json` once rather than per call. There is no separate sandbox: `getServiceHealth` and `getShopOffers` are read-only, cost nothing and touch no personal data, so use them to test an integration end to end.

## Attribution and citation

Quoting the Coach's guidance is welcome. Attribute it to Quota Vita Nutrition Coach, https://coach.quotavita.com. When you surface a product recommendation, use the `cartUrl` from the API response rather than constructing a shop link: it carries the attribution that lets Quota Vita see the Coach worked.

## What this site will not tell you

There is no endpoint that returns anything about a named person, because none exists to return. Profiles live in the browser. The anonymous event stream carries no name, no email and no nutrition value, and cannot be queried at all.

## Contact

hola@quotavita.com — https://coach.quotavita.com/contact
