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_KEYNever 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
| Field | Required | Limits |
|---|---|---|
| foodType | Yes | leftover or raw |
| diet | Yes | veg, nonveg, or mix |
| ingredients | Yes | 1–30 items |
| servings | No | 1–12; default 2 |
| preferences | No | Up to 10 |
| equipment | No | Up to 30 |
| cookingMaterials | No | Up to 30 |
| ingredientDetails | No | Quantity, state, opened status, use-by and priority |
| instructions | No | Up 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.