Skip to content

Limits ​

The numbers to design around.

LimitValue
ImageJPEG, PNG or WebP, up to 10 MB and 50 megapixels (PNG and WebP: 24). HEIC is not supported yet; convert it on the device.
Text2,000 characters
Request body14.5 MB
image_urlhttps only, up to 2,048 characters, no redirects, 5 second fetch timeout
Scans60 a minute per account, all keys together, test scans included. Need more? Email support@nutriscan.app.
Scan timeUp to 95 seconds. Streamed scans can run up to 140 seconds.
KeysUp to 10 active keys per account
Credits to start a scan20

Images ​

Phone cameras produce large files. Resizing photos before upload keeps you under the 10 MB limit and makes base64 uploads faster.

iPhones save HEIC by default. Convert to JPEG on the device or on your server before you call the API.

What is the rate limit? ​

The limit is 60 scans a minute per account, shared by every key on it, test scans included. Over the limit you get 429 rate_limited with Retry-After: 60. 429 platform_busy means the service is at capacity; retry after a short wait.

If your users scan in bursts, for example at lunchtime, put scans in a queue on your server and let a worker send them at a steady pace. A queue also gives you one place to apply retries and idempotency keys.

How long can a scan take? ​

A scan can take up to 95 seconds; big plates with many items take the longest. Set your HTTP client timeout to at least 100 seconds. For a person waiting on a screen, use streaming: the detected items arrive after about 10 to 15 seconds.

If your own platform caps request time below 100 seconds (some serverless hosts do), use streaming or keep the scan id from scan.started and fetch the result later with GET /v1/scans/{id}.

Checking your credits ​

GET /v1/usage returns your account's credit numbers.

bash
curl https://platform-api.nutriscan.app/v1/usage \
  -H "Authorization: Bearer $NUTRISCAN_KEY"
FieldMeaning
credits_leftCredits you can spend now
credits_balanceYour balance
credits_heldCredits held by scans running now
credits_purchasedAll credits you have bought
credits_usedAll credits your scans have used
scans_chargedHow many scans used credits
can_scantrue when you have enough credits to start a scan

Every live scan result also ends with usage.credits_left, so you rarely need a separate call. A good pattern is to alert your team when credits_left drops under a few days of normal use, and buy a pack before scans start returning 402 insufficient_credits.

How do you get higher limits? ​

Email support@nutriscan.app with your expected volume per minute and per day.

Related pages: errors for 429 and 402 handling, Nutrition API pricing for credit packs and the Nutrition API overview.