Overview
Beta TypeScript SDK for browser apps: food search, restaurants, food analysis, food, water, and weight logs, glucose prediction, and in-browser voice capture. Code that holds your sk-… API key runs on your server, for example with the Node.js SDK, @januaryai/server.
Start here
Check where your January calls can run. A browser can call January only from origins January has enabled: Runtime and security boundaries.
Add a backend token endpoint, or run the token relay until you have one.
Connect the client and make the first request.
Load foods and servings: Food discovery and servings.
How authentication works
Your browser code gets a short-lived client token (ct-…) from an endpoint on your backend, and the SDK sends it to January. The SDK caches the token in memory and asks for a new one before it expires. The SDK always calls January's production API; you supply only the function that fetches the token. See How authentication works.
Supported runtimes and browsers are listed in Compatibility.
Last updated
Was this helpful?