Prepaid food scans, volume discounts.
One-time card payment through Stripe (tax included). Start at $5 for 500 scans, or save up to 38% with larger packs. Works across REST and MCP.
No subscription. Unused credits never expire. Failed and no-food scans return their credit automatically.
1. Choose a pack, save your key & buy
We generate a private 256-bit key in your browser and store only its SHA-256 hash on our servers. Back it up before paying – lost keys cannot be recovered.
Saved in this browser's local storage. Paste an existing funded key to check balance or top up.
Optional: tell us what you're building
Skip these if you prefer. Agents should not guess their owner's answers.
2. Copy & run your first call
Put your saved key in an environment variable or secrets manager (never in chat messages or URLs), then call REST or MCP:
Idempotency-Key, and streams JSON over stdinchmod 600 /private/path/kcalsnap-api-key-live.txt
KCALSNAP_API_KEY=$(tr -d '\r\n' < /private/path/kcalsnap-api-key-live.txt)
TMP=$(mktemp lunch.jpg.reqid.XXXXXX)
uuidgen > "$TMP" && ln "$TMP" lunch.jpg.reqid 2>/dev/null || true
rm -f "$TMP"
REQ_ID=$(cat lunch.jpg.reqid)
(printf '{"image_base64":"'; base64 < lunch.jpg | tr -d '\r\n'; printf '","mime_type":"image/jpeg"}') \
| curl -i https://kcalsnap.com/api/v1/analyze \
-H "Authorization: Bearer $KCALSNAP_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $REQ_ID" \
--data-binary @-
import base64, json, os, urllib.request, uuid
from pathlib import Path
photo = Path("lunch.jpg")
id_file = photo.with_suffix(photo.suffix + ".reqid")
if not id_file.exists():
tmp = id_file.with_name(f"{id_file.name}.{os.getpid()}.{uuid.uuid4().hex}.tmp")
tmp.write_text(str(uuid.uuid4()), encoding="ascii")
try:
os.link(tmp, id_file)
except FileExistsError:
pass
finally:
tmp.unlink(missing_ok=True)
request_id = id_file.read_text(encoding="ascii").strip()
b64 = base64.b64encode(photo.read_bytes()).decode("ascii")
req = urllib.request.Request(
"https://kcalsnap.com/api/v1/analyze",
data=json.dumps({"image_base64": b64, "mime_type": "image/jpeg"}).encode(),
headers={
"Authorization": f"Bearer {os.environ['KCALSNAP_API_KEY']}",
"Content-Type": "application/json",
"Idempotency-Key": request_id,
},
)
with urllib.request.urlopen(req, timeout=60) as res:
print("Credits left:", res.headers.get("X-Credits-Remaining"))
print(json.dumps(json.loads(res.read()), indent=2))
https://kcalsnap.com/mcp as a custom connector){
"mcpServers": {
"kcalsnap": {
"type": "http",
"url": "https://kcalsnap.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_SAVED_KEY"
}
}
}
}
KCALSNAP_API_KEY from your environment)codex mcp add kcalsnap --url https://kcalsnap.com/mcp --bearer-token-env-var KCALSNAP_API_KEY
curl --fail --output quickstart.mjs https://kcalsnap.com/developers/quickstart.mjs
chmod 600 /private/path/kcalsnap-api-key-live.txt
node quickstart.mjs balance --key-file=/private/path/kcalsnap-api-key-live.txt
node quickstart.mjs scan lunch.jpg --key-file=/private/path/kcalsnap-api-key-live.txt
Test a live scan in your browser (1 credit)
Try the saved example plate or upload any phone photo (JPEG, PNG, or WebP; oversized photos are resized automatically in your browser before sending). A new successful analysis uses 1 credit. Nothing runs until you press the button.
Leave empty to use the example plate (Nutrition5k, Thames et al., CC BY 4.0).
Fund your key or check its balance above to enable scanning.
Inspect response JSON
All credit packs include applicable tax calculated at checkout. Your bank may charge for currency conversion. Shared capacity: 5,000 new analyses per rolling day globally, 600 per hour, 2,000 per API key per day, and 20 concurrent scans (10 per key). Need higher volume or unused-credit refunds? Email hello@kcalsnap.com with your Stripe receipt, never your API key. Refunds and disputes pause the key for support review.
Stripe handles card details. KcalSnap stores only the key's SHA-256 fingerprint, credit balance, and order records. Privacy policy.