/** * January AI - Nutrition Intelligence APIs * Build food and metabolic intelligence into your product — one API for understanding what people eat and how food may affect them. **Clinical-grade precision, consumer-grade experiences.** January builds the infrastructure underneath the product: turning messy health and nutrition data into reliable intelligence, so your team spends its time on the experience instead of the foundation. **Security & compliance** — **SOC 2 Type II** · **HIPAA-aligned practices** · **BAA** and **Zero Data Retention (ZDR)** available **What you can build** - **Scan food** — photo and text food recognition: detect foods and nutrition, then correct results conversationally - **Search the food database** — by name or barcode — and get healthier alternatives for any food - **Log food, water and weight** — per-user diaries with day-range queries - **Predict glucose response** to any meal — no sensor required **Getting started** 1. Create an API key in the [Developer Dashboard](https://dashboard.january.ai) — the full key is shown once, at creation. 2. Send it as `Authorization: Bearer sk-…` — click **Authorize** here to make every example below a live request. 3. On the endpoints that read or write an end user\'s logs, say whose with the `January-End-User-ID` header — each one documents it. No other endpoint takes it: everything else either asks the shared food database a question or works on the body you send, and neither depends on who the food is for. **Calling from a mobile app** — your `sk-` key must never ship inside an app. Instead, exchange it on your backend for a *client token*: a credential that lasts up to two hours, acts as exactly one of your end users, and carries only the scopes you grant it (see the **authentication** section). Your app then calls these endpoints directly, with no proxy of your own in the request path. Both credentials travel in the same `Authorization: Bearer` header, and every endpoint below opens by saying which it accepts — **API key or client token**, or **API key only**. **Support** — [support@january.ai](mailto:support@january.ai) · [Discord community](https://discord.gg/cYQeh3UnC) · [docs.january.ai](https://docs.january.ai) * * The version of the OpenAPI document: 1.2 * Contact: support@january.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime.js'; import { type GetRestaurantMenuItemsResponse } from '../models/GetRestaurantMenuItemsResponse.js'; import { type SearchRestaurantMenuItemsResponse } from '../models/SearchRestaurantMenuItemsResponse.js'; import { type SearchRestaurantsResponse } from '../models/SearchRestaurantsResponse.js'; export interface GetRestaurantMenuItemsRequest { restaurantId: string; limit?: number; offset?: number; } export interface SearchRestaurantMenuItemsRequest { query: string; latitude: number; longitude: number; radiusMeters?: number; limit?: number; } export interface SearchRestaurantsRequest { query: string; latitude: number; longitude: number; radiusMeters?: number; limit?: number; } /** * */ export declare class RestaurantsApi extends runtime.BaseAPI { /** * Creates request options for getRestaurantMenuItems without sending the request */ getRestaurantMenuItemsRequestOpts(requestParameters: GetRestaurantMenuItemsRequest): Promise; /** * **API key or client token.** The menu of one restaurant, by the `id` a `GET /v1.2/restaurants` result carries — a listing, not a search. Items come ordered by name with the nutrition their menu source publishes; each carries one serving, and `GET /v1.2/foods/{food_id}` returns the complete list. Page a long menu with `limit` and `offset`: a page shorter than `limit` is the last one. To find dishes across restaurants near a location, use `GET /v1.2/menu-items`. Callable with a client token carrying the `restaurants:read` scope. * List a restaurant\'s menu items */ getRestaurantMenuItemsRaw(requestParameters: GetRestaurantMenuItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * **API key or client token.** The menu of one restaurant, by the `id` a `GET /v1.2/restaurants` result carries — a listing, not a search. Items come ordered by name with the nutrition their menu source publishes; each carries one serving, and `GET /v1.2/foods/{food_id}` returns the complete list. Page a long menu with `limit` and `offset`: a page shorter than `limit` is the last one. To find dishes across restaurants near a location, use `GET /v1.2/menu-items`. Callable with a client token carrying the `restaurants:read` scope. * List a restaurant\'s menu items */ getRestaurantMenuItems(requestParameters: GetRestaurantMenuItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for searchRestaurantMenuItems without sending the request */ searchRestaurantMenuItemsRequestOpts(requestParameters: SearchRestaurantMenuItemsRequest): Promise; /** * **API key or client token.** Search dishes across restaurants near (`latitude`, `longitude`), with the nutrition each menu source publishes. Use `radius_meters` to widen or narrow the search, e.g. `radius_meters=5000` for 5 kilometers; each result reports its own `distance_meters`. To find the restaurants themselves, use `GET /v1.2/restaurants`. Callable with a client token carrying the `restaurants:read` scope. * Search menu items near a location */ searchRestaurantMenuItemsRaw(requestParameters: SearchRestaurantMenuItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * **API key or client token.** Search dishes across restaurants near (`latitude`, `longitude`), with the nutrition each menu source publishes. Use `radius_meters` to widen or narrow the search, e.g. `radius_meters=5000` for 5 kilometers; each result reports its own `distance_meters`. To find the restaurants themselves, use `GET /v1.2/restaurants`. Callable with a client token carrying the `restaurants:read` scope. * Search menu items near a location */ searchRestaurantMenuItems(requestParameters: SearchRestaurantMenuItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for searchRestaurants without sending the request */ searchRestaurantsRequestOpts(requestParameters: SearchRestaurantsRequest): Promise; /** * **API key or client token.** Search restaurants matching `query` around (`latitude`, `longitude`), ranked by proximity. Every result is a restaurant — `type` is always `restaurant`. To search the dishes those restaurants serve, use `GET /v1.2/menu-items`. Callable with a client token carrying the `restaurants:read` scope. * Search restaurants near a location */ searchRestaurantsRaw(requestParameters: SearchRestaurantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * **API key or client token.** Search restaurants matching `query` around (`latitude`, `longitude`), ranked by proximity. Every result is a restaurant — `type` is always `restaurant`. To search the dishes those restaurants serve, use `GET /v1.2/menu-items`. Callable with a client token carrying the `restaurants:read` scope. * Search restaurants near a location */ searchRestaurants(requestParameters: SearchRestaurantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } //# sourceMappingURL=RestaurantsApi.d.ts.map