How to get an API key
An API key lets LockSet talk to an AI provider on your account. You pay the provider directly; LockSet never sees the bill.
About the AI assistant
LockSet’s AI assistant is optional and off by default. It reads your plan and the training you log, answers questions, and suggests changes you approve one by one. It uses your own key, sends requests straight from your phone to the provider you pick, and asks for your consent before anything is sent. There’s no LockSet server in between. The assistant is free on every plan.
Want to see it first? Settings › AI assistant › Try a sample conversation works without a key: the replies are made up on your phone and nothing is sent.
OpenAI
Steps
- Sign in or create an account at platform.openai.com. OpenAI may ask you to verify a phone number.
- Open API keys and choose Create new secret key. Give it a name, like “LockSet”, and pick a project.
- Add a payment method or prepaid credit under Billing. You can also set a monthly budget for the project.
- Copy the key (it starts with
sk-) straight away, since it’s shown only once, and paste it in Settings › AI assistant.
What it costs
Pay as you go: each request is billed by the tokens it uses, and smaller models cost less. You can set a monthly limit in your OpenAI account.
Anthropic (Claude)
Steps
- Sign in or create an account in the Claude Console at platform.claude.com.
- Open API keys and choose Create key. Name it, pick an expiration, and choose a workspace (the Default workspace is fine).
- Add credit under Billing.
- Copy the key (it starts with
sk-ant-) straight away: it’s shown only once. Paste it in Settings › AI assistant.
Choose a workspace for the key. Anthropic refuses a key without one unless every request names a workspace, which LockSet doesn’t do. When a key expires, the assistant stops until you paste a new one.
What it costs
Each request is billed by the tokens it uses, from the credit on your account. Smaller models (Haiku, Sonnet) cost less than Opus.
Google Gemini
Steps
- Sign in with your Google account at aistudio.google.com and accept the terms. AI Studio creates a Google Cloud project for you. If you already use Google Cloud, import a project first (Dashboard › Projects › Import projects).
- Open Get API key and choose Create API key. New keys work only with the Gemini API, which is all LockSet needs.
- Have an older key marked Unrestricted? Choose Add restrictions › Restrict to Gemini API only: the Gemini API no longer accepts unrestricted keys.
- Copy the key and paste it in Settings › AI assistant.
What it costs
Google offers a free tier with lower limits, and paid use once you turn billing on. Read Google’s terms on how free-tier requests may be used.
Your own server
- Run a model server with an OpenAI-style API, like Ollama or LM Studio, or use a gateway like OpenRouter.
- Make it reachable over HTTPS, for example with a reverse proxy or Tailscale HTTPS. Phones block plain
http://. - Choose OpenAI-compatible in Settings › AI assistant, enter its Endpoint URL, and a key if it needs one.
What it costs
Your own server costs nothing per request (it uses your hardware). A gateway bills you itself.
Add the key to LockSet
- Open Settings › AI assistant and pick the provider.
- Paste the key and tap Check connection. That lists the models your key can use; only the key is sent, no workout data.
- Pick a model and tap Turn on the AI assistant.
- Before the first request, LockSet shows exactly what it sends and to whom. Nothing goes out until you agree.
How much one answer uses
One answer from the assistant is one request of about 15,000 tokens. Most of it is the exercise list and instructions, which stay the same between requests, so a follow-up within a few minutes bills them at a fraction of the price. LockSet also stops at a daily number of messages, a guard against surprise costs (Settings › AI assistant › Daily limit).
Keep it safe
Treat the key like a password. LockSet keeps it in the device’s secure storage (Keychain or Keystore) and sends it only to the provider, in a request header. It’s never in backups or exports. If it ever leaks, delete it in your provider account and create a new one.
What the assistant sends
Your plan, the last 12 weeks of training, body weight, your message and a few preferences, and only after you agree. Never your name, photos, measurements, gym cards, heart rate or body fat. Details in the privacy policy.
Steps checked against each provider’s pages on October 27, 2026. Providers change their consoles from time to time; if a label differs, look for “API keys”.