Local API + AI

Apple Health + AI: Chat With Your Health Data (Local API)

Turn years of Apple Health exports into targeted queries (sleep, steps, workouts, heart rate) that Claude, OpenAI, or Gemini can analyze-without uploading a 1GB file.

Export → AirDrop → Analyze with Claude, ChatGPT, or any AI.

Prerequisite: to use this API, you need the Mac app installed (Mac Health Analyzer / Health Data Export AI Analyzer). The API runs locally while the app is running.

The core idea: LLMs are great at reasoning, but they’re not built to ingest your entire Apple Health export. A local API lets you fetch only the metric slice you need (date range + aggregation), then send that small result to your model.

  • Base URL: http://127.0.0.1:8765
  • Auth header (most routes): X-Health-Analyzer-Token: <token>
  • Token file path: returned by GET /status

Start here: Apple Health Local API

Pick your integration

Why a local API beats uploading an export

Apple Health exports are time-series heavy: heart rate samples, sleep stages, workouts, steps, glucose, and more. That means tons of rows and a file that quickly becomes too big for an LLM context window.

Instead of "upload everything", do:

  1. Ask a question (e.g., "How did my resting HR trend over the last 90 days?")
  2. Call a single API endpoint for the metric + date range
  3. Send the compact JSON to the model for analysis

Useful endpoints (examples)

Security model

Most routes require:

X-Health-Analyzer-Token: <token>

You can discover the token file path via GET /status.

OpenClaw-specific routes are read-only and do not require the token:

Compatibility routes

Compatibility endpoints also exist under /health/*, for example:

Want to talk to your health data?

Start with the Local API docs, then pick your AI integration.