Skip to content

Nutrition API for AI agents

Nutrition numbers for AI agents, coaching bots and health assistants

When a user asks your agent about a meal, the model should call a tool, not guess. NutriScan reads the text or photo and returns each food with its portion in grams, 21 nutrients and a NutriScore grade, as JSON the agent can quote and store.

Use the MCP server from an agent client, or the REST API from your own backend. Same key, same credits.

Grilled chicken breast with a grain side and broccoli on a wooden board

analyze_meal result

Grilled chicken with quinoa and broccoli

A

501kcal

Protein today112 of 140 g

An example. The tool returns the meal, 57.1 g of protein and the grade; your agent adds it to the user's day and writes the reply.

Why not let the model estimate the nutrition itself?

Because a model answering from memory has no fixed source for its numbers. Ask twice about the same plate and you can get two answers, and neither comes with portions you can store.

Teams building agents describe it in three ways.

"The bot gives a different calorie count each time."

A tool call returns one result per scan, with an id. The agent quotes it, and get_scan brings the same numbers back later.

"Users send photos and the model guesses the portion."

NutriScan reads the photo and returns each item with its portion in grams, so the agent can say what it counted and the user can correct it.

"We need numbers we can store, not a paragraph."

The result is JSON: calories, macros, 13 micronutrients and a grade per item. Your backend saves the fields and the model writes the words.

MCP or REST: which route fits our agent?

Use the MCP server when the agent runs in a client such as Claude Code, the Claude desktop app or Codex. Use the REST API when your own backend runs the model and calls tools in code.

RouteMCP serverREST API
FitsAgents in MCP clients: Claude Code, the Claude desktop app, Codex and other clients that speak Streamable HTTP.Your own app or bot backend, with any model and any tool-calling setup.
Addresshttps://platform-api.nutriscan.app/mcphttps://platform-api.nutriscan.app/v1
CallsTools analyze_meal, get_scan and get_usage.POST /scans, GET /scans/{id} and GET /usage.
PhotosA public https URL.A public https URL or base64 image data.
WaitingNo streaming. A scan can take up to 95 seconds.Streaming is available, or poll the scan by id.
Sign-in and costYour API key in an Authorization: Bearer header. Credits per scan, 60 requests a minute per account.The same key, the same credits per scan and the same limit.

For your developers

One command connects an MCP client. One request works from any backend.

Both routes return the same JSON. Build against a test key, which returns a fixed sample and uses no credits, then swap in a live key.

MCP, in Claude Code

claude mcp add --transport http nutriscan \
  https://platform-api.nutriscan.app/mcp \
  --header "Authorization: Bearer $NUTRISCAN_KEY"

REST, from your backend

curl https://platform-api.nutriscan.app/v1/scans \
  -H "Authorization: Bearer $NUTRISCAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "type": "text", "text": "2 eggs and a slice of toast" }'

What can an agent do with one result?

Log the meal, answer the question the user asked and keep a running total for the day, all from the same fields.

Log a meal from a chat message

A user types "a cheeseburger and fries" or "Schnitzel mit Kartoffelsalat". The agent sends it as text with the user's language and gets each item back with grams and nutrients.

Read a meal photo

The user shares a photo of the plate. The agent passes its link and replies with what it found and the portions it assumed.

Read a nutrition label

A photo of the table on a pack comes back as fields, so the agent can answer how much sugar is in one serving.

Coach with a grade

Each meal gets a NutriScore grade from A to E and a one-line reason, which gives a health assistant something specific to say.

Watch its own spend

get_usage returns credits left and used, for free, so the agent or your backend can stop before the balance runs out.

Example, worked from our public pricing

What does a coaching bot cost per user?

About $5.40 a month for a user who logs 3 meals a day by text.

1,000active users

3text logs a day

30days

$0.06about 60 credits a log

$5,400a month

That is 90,000 scans and about 5,400,000 credits. A meal photo uses about 65 credits and a big plate more, so your real figure shows up in credits_used after the first live scans. Calls to get_scan and get_usage cost nothing, and there is no extra fee for MCP.

Ten Scale packs ($5,990, 5,990,000 credits) cover that month. Credits you do not use stay in your balance.

Pack prices

How can we try it before we commit?

Sign in with your email and you get a test key on the spot. Wire the agent to it and pay nothing until you go live.

A test key at sign-up

A test key returns a fixed sample result in the live JSON shape and uses no credits, through MCP and REST alike. An agent stuck in a loop during development costs nothing.

No subscription and no seats

You buy a credit pack once, by card. Nothing renews, and every agent on the account uses the same balance.

Credits never expire

A quiet month costs nothing extra. Purchases are final, so start with the $49 Starter pack and buy more once you know your volume.

Failed scans cost nothing

A scan that fails on our side uses no credits, and every result reports exactly what it cost.

Questions from teams building agents

Anything else, the MCP docs and the API docs cover every field and error.

Should our agent use the MCP server or the REST API?

Use the MCP server when the agent runs in an MCP client such as Claude Code, the Claude desktop app or Codex. Use the REST API when your own backend runs the model and calls tools in code. Both take the same key, cost the same credits and return the same JSON.

Can we use NutriScan with a model from any provider?

Yes, through the REST API. Define a tool in your own code that sends the meal to POST /v1/scans and hands the JSON back to the model. The MCP server works with any client that speaks Streamable HTTP and can send an Authorization header.

How do we stop an agent from spending too many credits?

Build with a test key, which uses no credits. With a live key, an agent in a loop can spend credits fast, so check get_usage, which is free, and stop when the balance gets low. Credits are prepaid, so spend can never go past what you bought.

Does the MCP server work in claude.ai or the Claude mobile apps?

Not yet. Those need an OAuth sign-in, and the server signs in with an API key in a header. Claude Code, the Claude desktop app and Codex can connect today.

Can users send photos to the agent?

Yes. Through MCP, the photo goes in as a public https URL. Through the REST API, your backend can also send the image as base64. Meal photos and nutrition label photos both work.

Which languages can the results come back in?

12 languages: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Russian, Turkish, Hindi and Arabic. The agent sets the language on each call, so food names match the language the user writes in.

Let your agent call for the numbers

Sign in with your email, connect the agent with a test key, and buy credits when it is ready for real users.

  • Test key at sign-up
  • Packs from $49
  • No subscription
  • Credits never expire
A breaded pork schnitzel with a lemon wedge
Example resultSchweineschnitzel, paniert1 Schnitzel, 150 g420 kcal
NutriScan app meal screen listing calories, macros, vitamins and minerals for one logged meal