> For the complete documentation index, see [llms.txt](https://docs.january.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.january.ai/rest-api/api-overview.md).

# 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:

```http
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](https://dashboard.january.ai) 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](/docs/authentication.md) walks through the token flow, and [Authentication and client tokens](/rest-api/authentication.md) documents the endpoints that mint and revoke tokens.

## End-user identity

The [food-logs](/rest-api/food-logs.md) 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:

```http
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](/rest-api/food-analysis.md) — analyze a meal photo, a nutrition label, or a description, and correct the result.
* [Foods](/rest-api/foods.md) — autocomplete, search, barcode lookup, hydration, and alternatives.
* [Food logs](/rest-api/food-logs.md) — create, list, update, and delete diary entries.
* [Glucose](/rest-api/glucose.md) — predict a meal's glucose response without a sensor.
* [Restaurants](/rest-api/restaurants.md) — discover restaurants and menu items near a location.
* [Authentication](/rest-api/authentication.md) — mint and revoke device-safe client tokens.
* [Credits](/rest-api/credits.md) — inspect the current monthly API allowance.

You can also use the [full interactive OpenAPI reference](https://partners.january.ai/v1.2/docs) or [download the OpenAPI specification](https://partners.january.ai/v1.2/openapi.json).
