Skip to main content

Quickstart

1. Get your API key

Your own key: a key comes with any paid Saturday plan, member or coach. Sign in at saturday.fit/api and make it; it is shown once and emailed to you. It covers 10 athletes; to cover more, write to api@saturday.fit about what you’re building. Not sure which way in fits you? See Getting Access. Platform partners: keys come with your agreement. Contact api@saturday.fit. Keys carry an environment prefix. Production keys start with sk_live_, sandbox keys with sk_test_. Each environment keeps separate key records, so a key issued by the sandbox does not authenticate against production. See Authentication for what each environment does and which base URL it uses.
Treat your key like a password. It authenticates every request and spends your daily call allowance.
The examples below use the production base URL and read your key from SATURDAY_API_KEY. For sandbox work, use an sk_test_ key and the sandbox base URL, https://test-api.saturday.fit:

2. Create an athlete

Calculations are sized to an athlete. Store one with the answers Saturday needs for exact numbers: sex, year of birth, weight and the fueling profile.
The response is the stored athlete, with "profile_complete": true and an id:
external_id is your own user ID, so you can find the athlete again with GET /v1/athletes?external_id=user-42. The Onboarding guide covers collecting these answers from your users.

3. Calculate a session

Send the athlete’s id with the session. meal_before_min (minutes since the athlete’s last carb-rich meal) and is_race belong on every call: leave either out and the answer comes back as ranges.

4. Read the response

To store the session and size the athlete’s gels and drink mix against it, continue with Activities and Prep and Products.
Every response carries the full safety metadata, whatever the athlete’s subscription: overdrinking can cause hyponatremia, which can be fatal.

5. Ranges and what they ask for

An athlete whose profile is missing answers gets ranges and a list of what to ask. The same session for an athlete stored without carb_experience:
missing_fields arrives most impactful first. missing_profile_fields names the athlete’s answers to collect: ask those questions in your app, or, in the sandbox, send the athlete to precision.onboarding.url when the response carries one. A session input your request left out (meal_before_min, say) is listed in missing_fields too and in missing_session_inputs: it is yours to send. Check precision.profile_complete when the response carries precision, and the range fields when it does not, not tier, to tell exact numbers from ranges. trial_ends_at, like every time the API gives you, is in Unix seconds. After the trial, an athlete without a Saturday subscription gets "tier": "teaser": ranges and a subscription_cta with their subscribe link. See Freemium Model for how the tiers are decided.

6. Use an SDK

The TypeScript snippets in these guides use top-level await, so run them as ES modules: save them with an .mts extension, or set "type": "module" in your package.json.
Both SDKs default to https://api.saturday.fit and take a base URL (baseUrl in TypeScript, base_url in Python) for the sandbox. They return the API’s JSON as typed objects, raise typed errors, and retry short rate limits and server errors for you. Every method and its types: the TypeScript SDK and Python SDK READMEs.

Next steps

1

Collect profiles

Onboarding covers asking the profile questions in your app or sending athletes to the hosted page.
2

Store sessions and size products

Activities stores sessions and their prescriptions; Prep and Products sizes the athlete’s products against them.
3

Understand safety

Safety covers the safety model and what you are required to display.
4

Go to production

Authentication covers swapping a sk_test_ key and its sandbox base URL for a sk_live_ key against api.saturday.fit.