curl --request POST \
--url https://app.skcal.fit/api/agent \
--header 'Content-Type: application/json' \
--cookie __Secure-better-auth.session_token= \
--data @- <<EOF
{
"messages": [
{
"role": "user",
"content": "what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?"
}
],
"date": "2026-06-30"
}
EOFimport requests
url = "https://app.skcal.fit/api/agent"
payload = {
"messages": [
{
"role": "user",
"content": "what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?"
}
],
"date": "2026-06-30"
}
headers = {
"cookie": "__Secure-better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Secure-better-auth.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
messages: [
{
role: 'user',
content: 'what do you think of me eating a meat pie for breakfast? how\'s that gonna impact my plan?'
}
],
date: '2026-06-30'
})
};
fetch('https://app.skcal.fit/api/agent', 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/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messages' => [
[
'role' => 'user',
'content' => 'what do you think of me eating a meat pie for breakfast? how\'s that gonna impact my plan?'
]
],
'date' => '2026-06-30'
]),
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/agent"
payload := strings.NewReader("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?\"\n }\n ],\n \"date\": \"2026-06-30\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-better-auth.session_token=")
req.Header.Add("Content-Type", "application/json")
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/agent")
.header("cookie", "__Secure-better-auth.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?\"\n }\n ],\n \"date\": \"2026-06-30\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.skcal.fit/api/agent")
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["Content-Type"] = 'application/json'
request.body = "{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?\"\n }\n ],\n \"date\": \"2026-06-30\"\n}"
response = http.request(request)
puts response.read_body{
"reply": "A meat pie runs about 550 kcal and 15 g protein. That eats a big chunk of your 1850 kcal budget for little protein — skip it. Have three eggs and Greek yogurt instead to hit protein without blowing the day."
}{
"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"
}Ask the AI coach
Sends a short chat history to Claude with a system prompt grounded in the caller’s own targets, today’s logged calories and protein, and their latest weight and weekly trend. Use it before eating to get a blunt verdict on a food and how it fits the remaining budget. The client holds the conversation history and posts the whole thing each turn.
curl --request POST \
--url https://app.skcal.fit/api/agent \
--header 'Content-Type: application/json' \
--cookie __Secure-better-auth.session_token= \
--data @- <<EOF
{
"messages": [
{
"role": "user",
"content": "what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?"
}
],
"date": "2026-06-30"
}
EOFimport requests
url = "https://app.skcal.fit/api/agent"
payload = {
"messages": [
{
"role": "user",
"content": "what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?"
}
],
"date": "2026-06-30"
}
headers = {
"cookie": "__Secure-better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Secure-better-auth.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
messages: [
{
role: 'user',
content: 'what do you think of me eating a meat pie for breakfast? how\'s that gonna impact my plan?'
}
],
date: '2026-06-30'
})
};
fetch('https://app.skcal.fit/api/agent', 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/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messages' => [
[
'role' => 'user',
'content' => 'what do you think of me eating a meat pie for breakfast? how\'s that gonna impact my plan?'
]
],
'date' => '2026-06-30'
]),
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/agent"
payload := strings.NewReader("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?\"\n }\n ],\n \"date\": \"2026-06-30\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-better-auth.session_token=")
req.Header.Add("Content-Type", "application/json")
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/agent")
.header("cookie", "__Secure-better-auth.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?\"\n }\n ],\n \"date\": \"2026-06-30\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.skcal.fit/api/agent")
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["Content-Type"] = 'application/json'
request.body = "{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?\"\n }\n ],\n \"date\": \"2026-06-30\"\n}"
response = http.request(request)
puts response.read_body{
"reply": "A meat pie runs about 550 kcal and 15 g protein. That eats a big chunk of your 1850 kcal budget for little protein — skip it. Have three eggs and Greek yogurt instead to hit protein without blowing the day."
}{
"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 ground today's intake against (YYYY-MM-DD). Defaults to the server's current UTC date.
Body
The chat history to answer, oldest message first.
Body for asking the coach; the client sends the full running history each turn.
Conversation history, oldest message first (1–20 turns).
1 - 20 elementsShow child attributes
Show child attributes
[
{
"role": "user",
"content": "what do you think of me eating a meat pie for breakfast? how's that gonna impact my plan?"
}
]
Optional calendar day (YYYY-MM-DD) whose logged intake grounds the reply; the server's current UTC date is used when omitted.
"2026-06-30"
Response
The coach's reply.
The coach's plain-text reply, grounded in the caller's targets, intake, and weight trend.
The coach's answer — an estimate, a budget fit, a blunt verdict, and a better option if it's a poor fit.
"A meat pie runs about 550 kcal and 15 g protein. That eats a big chunk of your 1850 kcal budget for little protein — skip it. Have three eggs and Greek yogurt instead to hit protein without blowing the day."