For the complete documentation index, see llms.txt. This page is also available as Markdown.

API overview

The January Nutrition Intelligence API provides food search, meal analysis, food logging, restaurant discovery, and sensor-free glucose prediction through one versioned HTTP API.

Base URL

https://partners.january.ai

Send your credential on every request:

Authorization: Bearer YOUR_API_KEY

Credentials

January accepts two kinds of bearer credential, and both travel in the same Authorization header:

  • An API key (sk-…) identifies your account. Create one in the January Developer Dashboard and use it only from your backend, where it can call every endpoint.

  • A client token (ct-…) is a short-lived credential your backend mints from its API key for one signed-in end user, so a mobile or browser app can call January directly without shipping the key. The token acts only as that user, and only within the scopes it was granted.

Applications running on an end-user device should use a client token, never an account API key. Authentication walks through the token flow, and Authentication and client tokens documents the endpoints that mint and revoke tokens.

End-user identity

The food-logs operations read and write one end user's diary. Say whose with the January-End-User-ID header, set to the stable, opaque id your own system already uses for that person:

January-End-User-ID: YOUR_END_USER_ID
  • With an API key, a food-logs request without the header fails with 400 end_user_id_required.

  • With a client token, the end user comes from the token. The header is optional, and a value naming a different end user fails with 403 end_user_id_mismatch.

  • On every other endpoint the header is optional. They do not read it today, and they do not reject it.

Endpoint groups

  • Food analysis — analyze a meal photo, a nutrition label, or a description, and correct the result.

  • Foods — autocomplete, search, barcode lookup, hydration, and alternatives.

  • Food logs — create, list, update, and delete diary entries.

  • Glucose — predict a meal's glucose response without a sensor.

  • Restaurants — discover restaurants and menu items near a location.

  • Authentication — mint and revoke device-safe client tokens.

  • Credits — inspect the current monthly API allowance.

You can also use the full interactive OpenAPI reference or download the OpenAPI specification.

Last updated

Was this helpful?