Home
Public API · v1

Cook with the API

Generate four equipment-aware, food-waste-conscious recipes from a confirmed ingredient list.

Authentication

An administrator creates keys in the app’s Administration page. Send the key as a Bearer token. The full value is shown once, so store it securely.

Authorization: Bearer alc_live_YOUR_KEY

Never embed a key in browser or mobile-app code. Call this API from your own server.

Quickstart

POST /api/public/v1/recipes/generate

curl -X POST "https://your-domain.example/api/public/v1/recipes/generate" \
+  -H "Authorization: Bearer alc_live_YOUR_KEY" \
+  -H "Content-Type: application/json" \
+  -d '{   "foodType": "leftover",   "diet": "veg",   "ingredients": ["cooked rice", "peas", "curd"],   "equipment": ["stovetop", "frying pan"],   "preferences": ["mild spice"],   "servings": 2 }'

Request fields

FieldRequiredLimits
foodTypeYesleftover or raw
dietYesveg, nonveg, or mix
ingredientsYes1–30 items
servingsNo1–12; default 2
preferencesNoUp to 10
equipmentNoUp to 30
cookingMaterialsNoUp to 30
ingredientDetailsNoQuantity, state, opened status, use-by and priority
instructionsNoUp to 600 characters
{
  "foodType": "leftover",
  "diet": "veg",
  "ingredients": ["cooked rice", "peas", "curd"],
  "equipment": ["stovetop", "frying pan"],
  "preferences": ["mild spice"],
  "servings": 2
}

Response

Successful calls return four recipes under data.recipes, plus an API version and request ID. Each recipe includes timings, ingredients, steps, approximate nutrition, serving suggestion, storage guidance, consumption window, and a food-safety warning.

{
  "data": { "recipes": [/* four recipe objects */] },
  "version": "2026-09-16",
  "requestId": "..."
}

Errors use error.code, error.message, and error.requestId. Common status codes: 400 invalid input, 401 invalid/inactive key, 403 missing scope, 429 allowance reached, and 502 generation unavailable.

Limits & food safety

Each key has an administrator-set daily allowance. Remaining requests are returned in X-RateLimit-Remaining. Nutrition, storage, and consumption windows are estimates—not guarantees. Follow labelled expiry dates and discard food showing spoilage.