Portal
SandboxAPI v1Not signed inExternal user: —

Authentication

Pick the trust model that matches what you are building.

REST / SDK

When: Server apps, backends, scripts

How: Developer API key via X-API-Key

SDKs: api_key / apiKey. Never ship production keys to browsers.

Create API key

Developer portal

When: Keys, billing, team, MCP apps

How: Logged-in developer session (cookie)

Account APIs under /v1/developer/*. Not a substitute for product API keys.

Log in

MCP hosts

When: Cursor, Claude, custom agents

How: MCP application OAuth

App-scoped MCP URL + end-user consent. Do not paste API keys into MCP client JSON for interactive hosts.

MCP authentication

Your end users

When: Multi-user pantry / recipes

How: X-External-User-ID (+ optional OIDC for MCP)

Opaque id you choose. FoodAPI does not store passwords or profiles.

External user context

API key header

X-API-Key: foodapi_sb_…

Sandbox vs production

  • Sandbox — docs, playground, rate-limited
  • Production — request access, then use production keys

Docs explorer sessions (when signed in) are short-lived sandbox tokens — not your API keys. Rate limits

Troubleshooting

  • 401/403 — wrong environment or inactive key
  • Include X-Request-Id when contacting support
  • Troubleshooting

Next

Make your first request with the auth model you chose.

Normalize an ingredient with your API key.

Continue to Quickstart →