Skip to content
opis.Nutrition API

Opis Nutrition API

The Opis Nutrition API turns meal photos into identified foods, portions and nutrients. It is an asynchronous REST API: you create a resource, and it moves through a small set of statuses until it settles. You can poll it, hold the request open for up to 25 seconds, or receive a signed webhook.

Base URL: https://platform.opis.health/v1 · Auth: Authorization: Bearer <api key> · Format: JSON (snake_case), RFC 3339 UTC timestamps, RFC 9457 problem details for errors.

The three capabilities

CapabilityWhat it doesResourceMeter
AnalysisUp to 4 photos of one meal → identified items with estimated grams, confidence and alternative namesmeal_analyses (mna_…), stage 1identification
Confirmation (optional)A person accepts, edits or rejects the identified items before nutrition runsPOST /v1/meal-analyses/{id}/confirmnot metered
NutritionItems + grams → 53 nutrients per item and per meal, with the matched food and its sourcemeal_analyses stage 3, or standalone nutrition_estimates (nue_…)nutrition

A meal analysis runs all three: identification, then confirmation (automatic by default), then nutrition. A nutrition estimate runs only the nutrition stage on items you supply.

Where to start

  • Quickstart — a test key, one photo and a result in five minutes.
  • Confirmation — decide whether a person reviews the items, and build the screen.
  • Webhooks — stop polling; verify signatures with the Standard Webhooks libraries.
  • Test mode — deterministic results and magic inputs for your CI.
  • API reference — every endpoint, generated from the OpenAPI document.

Principles you can rely on

  • Asynchronous by design. Every create returns 202 with a Location and a Retry-After. Nothing long-running happens inside your HTTP request unless you ask for it with Prefer: wait.
  • Pinned pipelines. Each workflow records the pipeline release and profile hash that produced it, and keeps using them even if it waits days for confirmation. See Pipelines & versioning.
  • Null is not zero. Unknown nutrient values are null, totals report completeness, and units are UCUM codes. See Nutrients.
  • Safe retries. Send an Idempotency-Key on every POST. See Idempotency.
  • Your data stays yours. opis acts as your processor; we never train on customer data. See Data handling.

The OpenAPI document at /v1/openapi.json is the source of truth for field-level details. These guides explain how the pieces fit together.