Nutrition Calculation
This endpoint takes an activity description and returns a fuel prescription: carbohydrate, sodium, and fluid targets, with safety guardrails applied.Progressive enrichment
Saturday works with whatever data you have. More data narrows the prescription; minimal inputs still return a usable result.Minimal inputs
The bare minimum for a calculation:confidence_score. The numbers are based on population-level defaults for the given activity type and body weight.
Standard inputs
Add intensity and environmental conditions:Comprehensive inputs
For exact numbers, include an athlete reference and every session input:athlete_id, Saturday reads that athlete’s stored profile: sex, year of birth, body weight, sweat level, saltiness, carb experience, usual carb consumption, satiety level, fitness level, and fueling concerns. For an athlete linked to a Saturday account, any answer your record lacks comes from their Saturday app answers. Inline fields in the request body override the stored values for that one call.
Session inputs
All four belong on every call. An omitted one is an unanswered input: the session still computes (at effort 5, or 2 for
lift and hike; heat 5; fed; training), but the answer comes back as ranges even for a complete profile, with the input named in precision.missing_fields.
precision tells you what to do next, on every tier:
The two lists name inputs only and come with a partner API key on every tier, teaser included. Both empty is one condition of exact numbers; the other is the athlete’s access: a Saturday subscription, a seat license or the partner trial (Freemium Model).
An
athlete_id your account does not hold is refused with 404 and code athlete_not_found; leave athlete_id out for a range estimate.
Profile fields, at the top level of the request, stand in for a stored athlete or override one stored answer for that call: sex (male, female or intersex), age (years), athlete_weight_kg (20 to 250), sweat_level, satiety_level and fitness_level (1, 3, 5, 7 or 9), saltiness (1, 5 or 9), carb_experience and usual_carb_consumption (the values in Settings: the fueling profile), carb_upper_limit_override (50 to 150 g/hr in steps of 10), and concerns, one object of the eight flags performance, gut_distress, heat_tolerance, muscle_cramps, faintness, hunger, thirst and drinking_resistance.
The request may carry only the fields on this page. Any other field, at any depth, is refused with 400 and code unsupported_field, param naming it, and the message naming the field it was probably meant to be: meal_before_mins answers Did you mean "meal_before_min"?. A field spelled the way the athlete or activity request spells it gets that request’s spelling: weight_kg (send athlete_weight_kg), year_of_birth (send age), is_race_event (send is_race), type (send activity_type), duration (send duration_min) and settings (send the profile fields at the top level, or an athlete_id). See Error Handling.
Understanding the response
This example shows an exact full-tier response with complete inputs. Teaser responses and incomplete full-tier profiles contain range fields instead, even when the request succeeds.Per-hour figures
The per-hour figures are the ones the Saturday app shows on its Fuel card, so your athletes see the same numbers in both places. They are whole numbers, sodium and fluid in steps of 10, and they are not always the total divided by the session’s hours: show them as they come, and read thetotal_* fields for the amounts over the whole session.
Confidence score
Thesafety.confidence_score (0.0-1.0) is read from the width of the band: 1.0 when every profile field and every activity input for the call is answered (on the full tier the numbers are then exact), lower as unanswered fields widen the band. Activity inputs weigh heavily: a call that omits intensity_level and thermal_stress_level can score 0 with a complete stored profile. precision.missing_fields tells you which answers would raise it.
Comparing across conditions
To compare fueling across different conditions (a cool morning against a hot afternoon, say), callPOST /v1/nutrition/calculate once per scenario and diff the results yourself, or use POST /v1/nutrition/calculate/batch to submit up to 50 scenarios in a single request. Each scenario in a batch debits your quota individually.
Two prescription shapes. The
calculate endpoints return a flat response (carb_g_per_hr, sodium_mg_per_hr, … with a nested safety block). The stored-prescription read (GET /v1/athletes/{id}/activities/{id}/prescription) returns a wrapped response: { "prescription": { … }, "safety": { … } }. Read the fields according to the endpoint you called.Calculation timing
Every engine run carries a deliberate computation window, the same one athletes see in the Saturday app. Size your loading state around it:- Single calculation (
POST /v1/nutrition/calculate,POST .../activities/{id}/calculate): roughly 1 to 3 seconds, scaling with activity duration and shorter at low intensity. Recalculating an activity that has a prescription takes about half as long. - Batch (
POST /v1/nutrition/calculate/batch): each scenario adds about half a single calculation’s time. The response headers arrive immediately withX-Batch-Estimated-Ms, the expected total processing time, so you can size a progress indicator before the body lands. The completed body includesestimated_msandelapsed_ms. - Estimate without calculating: send the same batch payload with
"estimate_only": trueto getestimated_msback immediately, with no calculations run and no quota debited. Useful when your HTTP client can’t read streamed headers early. - Reads are instant. Fetching a stored prescription (
GET .../prescription) carries no computation window.
Teaser vs. full responses
Responses depend on the athlete’s Saturday subscription status:- Subscribed athletes with complete inputs get exact numbers:
"carb_g_per_hr": 72 - Subscribed athletes with incomplete inputs get ranges and a
precisionobject naming the missing fields - Free/teaser athletes get ranges:
"carb_range_g_per_hr": "60-90"
Safety
Every calculation response includes asafety block, on every tier. See Safety for the fields, the guardrails behind them, and what you are required to display.
Supported activity types
These seven sports, with
brick and triathlon (below), are the complete set, accepted in any letter case. Any other activity_type is refused with 400 and code invalid_value, on calculate, on each batch scenario and on activity create, so map your own sport names first: POST /v1/infer/activity-type does it from a title. GET /v1/activity-types returns the seven sports with descriptions in activity_types, and brick and triathlon with the rules for their legs in linked_session_types. An optional ?activity_type= narrows both lists to the one type named, so you can validate a single key.
Bricks and triathlons
A brick (two or more sports back to back) or a triathlon is one session made of legs. Send it as one request withactivity_type brick or triathlon and legs, never as one request per leg.
A brick or triathlon without
legs is refused with 400 missing_field on legs, and legs on a single sport with 400 invalid_value. A leg’s own error names its path, such as legs[1].duration_min.
An answer with exact numbers carries legs: each leg’s share, in the order sent, as the Saturday app’s leg cards show it.
Read
precision when the response carries it: profile_complete, missing_fields, and an onboarding invite. Exact numbers require a complete fueling profile; an incomplete one gets a band instead. See Athlete Onboarding.