Scavory
cook with what you have
Back to Settings

Let your AI manage your pantry

Scavory exposes a small, friendly REST API so any assistant — Claude, ChatGPT, Alexa, a home-automation bot — can read your ingredients, suggest recipes, and update your shopping list. It's your pantry, your key, your bot.

1 · Get a key

Go to Settings → Connect your AI assistant and tap New key. Label it (e.g. "Claude", "Alexa skill"), copy the token — you'll only see it once — and paste it into your assistant.

2 · Authenticate every request

Send your key as a bearer token on every call:

Authorization: Bearer <YOUR_KEY>

Rate limit: 60 requests per minute per key. Revoked or missing keys return 401.

3 · Endpoints

GET/api/public/agent/pantry

List every ingredient in your pantry.

POST/api/public/agent/pantry

Add or update items (fuzzy dedupe by name).

Body
{ "items": [ { "name":"eggs", "quantity":6, "unit":"pcs", "expires_in_days":14 } ] }
POST/api/public/agent/pantry/remove

Remove one item by name (fuzzy match).

Body
{ "name": "milk" }
GET/api/public/agent/pantry/expiring?days=7

Items expiring within N days (default 7).

GET/api/public/agent/recipes?query=dinner,20+min,high-protein

Recipes you can cook now + almost-there (missing 1–2 items). Free-text query parses meal type, diet, and max minutes.

GET/api/public/agent/shopping

Read the current shopping list.

POST/api/public/agent/shopping

Add items (strings or objects).

Body
{ "items": [ "butter", { "name":"sugar", "quantity":"1kg" } ] }

4 · Try it (curl)

# Read your pantry
curl -H "Authorization: Bearer $PANTRY_KEY" \
  https://your-app.lovable.app/api/public/agent/pantry

# Add items
curl -X POST https://your-app.lovable.app/api/public/agent/pantry \
  -H "Authorization: Bearer $PANTRY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"name":"eggs","quantity":6},{"name":"milk","unit":"L","expires_in_days":7}]}'

# What can I cook for dinner in 20 minutes?
curl -H "Authorization: Bearer $PANTRY_KEY" \
  "https://your-app.lovable.app/api/public/agent/recipes?query=dinner,20+min,high-protein"

5 · Connect Claude, a Custom GPT, or any assistant

Claude (Projects, Desktop) or ChatGPT (Custom GPT): paste the snippet below into the assistant's system prompt or instructions. Replace YOUR_KEY with your actual key.

You have access to my Scavory pantry via a REST API.
Base URL: https://your-app.lovable.app/api/public/agent
Auth header on every request: Authorization: Bearer YOUR_KEY

Endpoints:
- GET  /pantry               → list my ingredients
- POST /pantry               → add items: {"items":[{"name":"eggs","quantity":6}]}
- POST /pantry/remove        → remove: {"name":"milk"}
- GET  /pantry/expiring?days=7
- GET  /recipes?query=...    → recipes I can cook now + almost-there
- GET  /shopping             → my shopping list
- POST /shopping             → add: {"items":["butter",{"name":"sugar","quantity":"1kg"}]}

Before suggesting a recipe, call /pantry to see what I actually have.
When I say "add X to my shopping list", call POST /shopping.
When I cook something, call POST /pantry/remove for each used item.

For a Custom GPT with a native Action, use the same base URL and set the auth to API Key → Bearer.

Response shapes

GET /pantry
→ { "items": [ {"name":"eggs","quantity":6,"unit":null,"expires_at":null} ] }

GET /recipes
→ {
    "pantry_size": 12,
    "filters": { "meal_type":"Dinner", "diets":[], "max_minutes":20 },
    "can_make_now": [ { "id","title","emoji","ingredients","steps",... } ],
    "almost_there": [ { ..., "missing":["butter"] } ]
  }

GET /shopping
→ { "items": [ {"id","name","quantity","checked","created_at"} ] }

Questions? The API is deliberately tiny — read a route file in src/routes/api/public/agent/ and you've seen it all.

For Brands