Opened from the FitBuddy app

Onboarding guide:
API keys without the stress

FitBuddy is free and open source, but meal photos and smart estimates need an AI provider you control. This page walks you through the whole first-run flow — especially creating and pasting API keys safely.

Recommended for most people: OpenRouter — free vision models, optional one-tap sign-in in the app, or a pasted API key.

What you’ll do

  1. Open FitBuddy and choose Start fresh or restore a backup.
  2. Connect an AI provider (this is the step that needs an API key or sign-in).
  3. Enter age, height, weight, goal, and activity.
  4. Optional crash-reporting choice (F-Droid / debug builds).
  5. Pick your region pack for food language and portion priors.
  6. Land on Today and log your first meal.

Needs Android 10+. Install from F-Droid, OpenAPK, or GitHub — pick one channel and stick to it.

Fresh start or restore

On the first screen you can:

  • Start fresh — continue to Connect an AI.
  • Restore from cloud — enter your Support ID + backup password (if you used FitBuddy cloud backup before).
  • Restore from local backup — pick an encrypted JSON export from Files.

After a restore, FitBuddy may ask only for AI credentials again if keys weren’t in the backup. Your food log stays intact.

Pick a provider

On Connect an AI, choose one platform. FitBuddy never creates an account for you — you bring a key (or OpenRouter sign-in) from that provider.

ProviderBest when…Jump to
OpenRouter You want free vision models with the least friction Setup
Gemini You already use Google AI Studio Setup
Ollama You run models on your LAN, or want Ollama Cloud Setup
OpenAI-compatible Official OpenAI, LM Studio, Groq, Together, vLLM, … Setup

Photos always need a configured provider. Without a key, FitBuddy can still demo the UI with the offline simulator — but real food analysis won’t run.

OpenRouter — create a key

OpenRouter is the easiest free path for FitBuddy. You can either tap Continue with OpenRouter in the app (browser sign-in, no paste) or create an API key and paste it.

Option A — Sign in from the app (no key paste)

  1. In FitBuddy, select OpenRouter.
  2. Tap Continue with OpenRouter.
  3. Create an account or sign in (Google / email) in the browser tab that opens.
  4. Approve access. FitBuddy receives a key automatically when the tab finishes.

Official OAuth docs: openrouter.ai/docs/…/oauth.

Option B — Create an API key yourself (recommended if sign-in fails)

  1. Open openrouter.ai → Sign up (Google is fine).
  2. Go to openrouter.ai/keys (also linked as Get API Key after login).
  3. Click Create Key. Name it something like FitBuddy.
  4. Copy the key immediately — OpenRouter shows the full secret only once. Store it in a password manager if you like.
  5. Back in FitBuddy → OpenRouter → expand API keys → paste → add the chip.
  6. Tap Continue. FitBuddy validates by listing models.

Video — How to get an OpenRouter API key (2026)

Extra walkthrough (free models overview): Integrate AI for free with OpenRouter.

Free models are enough for FitBuddy. You don’t need to add billing unless you choose paid models later. Keep Auto failover on so FitBuddy can rotate free models when one is rate-limited.

Gemini — Google AI Studio key

FitBuddy talks to Gemini through Google’s OpenAI-compatible endpoint. You need an API key from Google AI Studio (same Google account is fine).

  1. Open aistudio.google.com and sign in with Google.
  2. Accept the Terms of Service if prompted.
  3. Open the API Keys page (or use Get API key in the sidebar).
  4. New accounts often get a default project + key automatically — copy it. Otherwise click Create API key, pick or import a Cloud project, create, copy.
  5. In FitBuddy → Gemini → paste into API keys → Continue.

Video — Get your Gemini API key in Google AI Studio

Free Gemini quotas can rate-limit. If analysis fails, wait a bit, add a second key, or switch to OpenRouter. Never share your key or commit it to a repo.

Ollama — local or cloud

In FitBuddy, toggle Local or Cloud under Ollama.

Local (LAN)

  1. Install Ollama on a computer from ollama.com/download or follow docs.ollama.com/quickstart.
  2. Pull a vision-capable model you intend to use (see Ollama’s model library).
  3. Make sure the phone can reach the machine (same Wi‑Fi). Enter the base URL in FitBuddy, typically http://<computer-lan-ip>:11434 — FitBuddy uses the OpenAI-compatible /v1 paths on that host.
  4. Local Ollama usually needs no API key. Leave keys empty and Continue.

Android blocks cleartext HTTP unless the app allows it — FitBuddy does for local AI hosts. Prefer a stable LAN IP; VPNs and guest Wi‑Fi often break reachability.

Cloud

  1. Create an account at ollama.com.
  2. Open ollama.com/settings/keys and create an API key. Copy it once.
  3. In FitBuddy → Ollama → Cloud → paste the key → Continue.

Video — Install Ollama locally (+ cloud overview)

OpenAI-compatible

One FitBuddy option covers official OpenAI and any host that speaks OpenAI’s /v1/models + /v1/chat/completions API (LM Studio, vLLM, LocalAI, Together, Groq, gateways, …).

Official OpenAI (paid)

  1. Create / sign in at platform.openai.com.
  2. Open API keys → Create new secret key → name it → copy once.
  3. Add billing / credits under Billing if the account is new — keys alone aren’t enough without usage credit.
  4. In FitBuddy, leave Base URL as https://api.openai.com (default), paste the key, Continue.

Video — Create an OpenAI key, billing & spending limits

Shorter key-only clip: OpenAI: How To Generate API Keys.

Other compatible hosts

  1. Change Base URL to your host (no trailing path beyond the API root FitBuddy expects — usually the host that serves /v1/…).
  2. Paste a key if the host requires one; many local servers leave this empty.
  3. Continue — FitBuddy lists models from GET {url}/v1/models.

Paste into FitBuddy & verify

  1. Return to the Connect an AI step (don’t close the app while copying if you can help it).
  2. Paste the key into the chips field and confirm it appears as a chip (not left half-typed).
  3. Tap Continue. FitBuddy calls the provider’s model list to validate.
  4. On success you move to profile. On failure, read the red error — wrong key, no network, or rate limit are the usual causes.

Never screenshot your full key into chat apps or GitHub Issues. If a key leaks, revoke it on the provider’s site and create a new one.

Profile, crash opt-in, region

  1. About you — age, height, weight, sex (optional), goal, activity. These feed on-device calorie targets (see methodology).
  2. Crash reports (F-Droid / debug) — optional anonymous Sentry. Off by default; you can change later in Settings.
  3. Region pack — picks staples, portion language, and AI food priors. Change anytime under Settings → Preferences.

First meal log

  1. On Today, tap the log / + action → food.
  2. Photo of the whole plate or a freeform description (hints match your region).
  3. Wait for analysis → review ingredients → tweak weights → Save.
  4. Bookmark as a preset if you’ll eat it again.

More day-to-day tips: Beginner guide · FAQ.

Where your key and meals go

  • API keys live in on-device DataStore. FitBuddy does not upload them to a FitBuddy server.
  • When you analyze a meal, the photo/text (and needed profile bits) go only to the provider you selected.
  • Logs, presets, and body readings stay on the phone unless you export a backup or enable optional cloud backup.

Full details: Privacy · Encryption.

Stuck?

“Couldn’t list models” / validation failed
Double-check the key has no spaces, the phone is online, and (for OpenAI) billing is set up. For local Ollama, confirm the LAN URL from the phone’s browser.
OpenRouter sign-in didn’t return to the app
Use Option B — create a key at openrouter.ai/keys and paste it instead.
Rate limited
Wait, try another free model, or add a second key. Auto failover helps on OpenRouter/Gemini.
Still blocked?
Settings → optional diagnostic AI log (no meals/keys) · GitHub Issues. Include your Support ID if crash reporting is on.

Get FitBuddy · Full guide · FAQ