curl --request POST \
--url https://app.skcal.fit/api/nutrition/analyze \
--header 'Content-Type: multipart/form-data' \
--cookie __Secure-better-auth.session_token= \
--form 'photos[0]=@plate.jpg' \
--form 'photos[1]=@plate-side.jpg' \
--form 'note=the white sauce is toum, and that'\''s a 12oz steak' \
--form photos.items='@example-file'import requests
url = "https://app.skcal.fit/api/nutrition/analyze"
files = { "photos.items": ("example-file", open("example-file", "rb")) }
payload = {
"photos[0]": "@plate.jpg",
"photos[1]": "@plate-side.jpg",
"note": "the white sauce is toum, and that's a 12oz steak"
}
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('photos[0]', '@plate.jpg');
form.append('photos[1]', '@plate-side.jpg');
form.append('note', 'the white sauce is toum, and that's a 12oz steak');
form.append('photos.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {cookie: '__Secure-better-auth.session_token='}};
options.body = form;
fetch('https://app.skcal.fit/api/nutrition/analyze', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.skcal.fit/api/nutrition/analyze",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.skcal.fit/api/nutrition/analyze"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-better-auth.session_token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.skcal.fit/api/nutrition/analyze")
.header("cookie", "__Secure-better-auth.session_token=")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.skcal.fit/api/nutrition/analyze")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"ok": true,
"mealId": "3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071",
"items": [
{
"name": "grilled chicken breast",
"kcal": 284,
"proteinG": 53.4
},
{
"name": "toum",
"kcal": 90,
"proteinG": 0.4
}
],
"totalKcal": 374,
"totalProteinG": 54,
"note": "assumed a single chicken breast and one tablespoon of toum",
"photoKeys": [
"nick@mintlify.com/2026-06-29/3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071"
]
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}Log a meal from photos
Uploads 1–5 photos of a single meal, sends them to Claude vision for per-item calorie and protein estimates, stores the photos plus a meal, and returns the analysis.
curl --request POST \
--url https://app.skcal.fit/api/nutrition/analyze \
--header 'Content-Type: multipart/form-data' \
--cookie __Secure-better-auth.session_token= \
--form 'photos[0]=@plate.jpg' \
--form 'photos[1]=@plate-side.jpg' \
--form 'note=the white sauce is toum, and that'\''s a 12oz steak' \
--form photos.items='@example-file'import requests
url = "https://app.skcal.fit/api/nutrition/analyze"
files = { "photos.items": ("example-file", open("example-file", "rb")) }
payload = {
"photos[0]": "@plate.jpg",
"photos[1]": "@plate-side.jpg",
"note": "the white sauce is toum, and that's a 12oz steak"
}
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('photos[0]', '@plate.jpg');
form.append('photos[1]', '@plate-side.jpg');
form.append('note', 'the white sauce is toum, and that's a 12oz steak');
form.append('photos.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {cookie: '__Secure-better-auth.session_token='}};
options.body = form;
fetch('https://app.skcal.fit/api/nutrition/analyze', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.skcal.fit/api/nutrition/analyze",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.skcal.fit/api/nutrition/analyze"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-better-auth.session_token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.skcal.fit/api/nutrition/analyze")
.header("cookie", "__Secure-better-auth.session_token=")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.skcal.fit/api/nutrition/analyze")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B0%5D\"\r\n\r\n@plate.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos%5B1%5D\"\r\n\r\n@plate-side.jpg\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\nthe white sauce is toum, and that's a 12oz steak\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photos.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"ok": true,
"mealId": "3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071",
"items": [
{
"name": "grilled chicken breast",
"kcal": 284,
"proteinG": 53.4
},
{
"name": "toum",
"kcal": 90,
"proteinG": 0.4
}
],
"totalKcal": 374,
"totalProteinG": 54,
"note": "assumed a single chicken breast and one tablespoon of toum",
"photoKeys": [
"nick@mintlify.com/2026-06-29/3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071"
]
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}Authorizations
Better Auth session. Signing in (Google or email magic link) sets an HttpOnly session cookie that scopes every request to that account. The web app and CLI use this; agents use the OAuth 2.1 flow of the MCP server.
Query Parameters
Day to log against (YYYY-MM-DD). Defaults to the server's current UTC date.
Body
The meal photos (multipart field photos), plus an optional note caption for context.
1–5 photos of a single meal, possibly from multiple angles (JPEG, PNG, WebP, or GIF; max 8MB each).
["@plate.jpg", "@plate-side.jpg"]
Optional caption to disambiguate the photo; passed to the model and stored as the meal note.
2000"the white sauce is toum, and that's a 12oz steak"
Response
The meal was analyzed and logged.
Result of logging a meal from photos or a text description.
Always true once analysis succeeds.
true
Identifier of the created meal.
"3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071"
Estimated food items.
Show child attributes
Show child attributes
[
{
"name": "grilled chicken breast",
"kcal": 284,
"proteinG": 53.4
},
{
"name": "toum",
"kcal": 90,
"proteinG": 0.4
}
]
Summed calories across items.
374
Summed protein in grams across items.
54
The model's one-line assumptions note.
"assumed a single chicken breast and one tablespoon of toum"
R2 object keys of stored photos (empty for text descriptions).
[
"nick@mintlify.com/2026-06-29/3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071"
]