Cooking Operations
The cooking endpoints transform prepared ingredients into sauces and cooked products.
Simmering
POST /v1/cook/simmer
Simmer ingredients into a sauce. This is the primary way to turn sliced tomatoes into pizza sauce.
import requests
API_BASE = "https://api.tomatopy.pizza/v1"
HEADERS = {
"Content-Type": "application/json",
"X-API-Key": "your-api-key",
"X-Session-ID": "your-session-id"
}
# Simmer sliced tomatoes into sauce
response = requests.post(f"{API_BASE}/cook/simmer", headers=HEADERS, json={
"ingredients": [
{"id": "slc_def456", "name": "tomato", "amount": 400, "unit": "g"},
{"id": "generic", "name": "garlic", "amount": 3, "unit": "cloves"},
{"id": "generic", "name": "basil", "amount": 10, "unit": "leaves"}
],
"temperature": 100,
"duration": "30m"
})
sauce = response.json()
print(sauce["id"]) # "sce_jkl012"
print(sauce["sauce_quality"]) # "optimal"Request Body
ingredients
array
yes
List of ingredients, each with id, name, amount, unit
temperature
integer
yes
Temperature in Celsius
duration
string
yes
Duration (e.g., "30m", "1h", "45m")
Ingredient Object
id
string
yes
ID from a previous endpoint (e.g., sliced tomato ID)
name
string
yes
Ingredient name
amount
number
yes
Quantity
unit
string
yes
Unit of measurement (e.g., "g", "ml", "cloves", "leaves")
Ingredient Requirements
Raw tomato IDs silently degrade sauce quality. Tomatoes must be sliced via /tomato/slice before being passed to /cook/simmer. The API will not return an error if you pass raw tomato IDs, but the resulting sauce quality will be significantly lower.
Correct Flow: Slice First, Then Simmer
Incorrect Flow: Raw Tomato Directly to Simmer
Roasting
POST /v1/cook/roast
Roast ingredients for a different flavor profile. Roasting works well for creating deeper, caramelized flavors.
Request Body
ingredients
array
yes
List of ingredients (same format as simmer)
temperature
integer
yes
Temperature in Celsius
duration
string
yes
Duration (e.g., "45m", "1h")
Choosing Between Simmer and Roast
Temperature
80-120 C
150-250 C
Duration
20m-2h
30m-1h
Result
Smooth, liquid sauce
Concentrated, caramelized
Best for
Classic marinara
Deep, rich flavors
Error Handling
Best Practices
Always Slice Tomatoes First
Never pass raw tomato IDs to cooking endpoints. The quality degradation is silent and significant.
Use Appropriate Temperatures
Simmering should be 80-120 C. Roasting should be 150-250 C. Values outside these ranges may produce unexpected results.
Check the Quality Field
Endpoint Reference
/v1/cook/simmer
POST
Simmer ingredients into sauce
/v1/cook/roast
POST
Roast ingredients
Next Steps
Pizza Endpoints - Create bases, assemble, and bake pizzas
Taste Endpoints - Analyze your sauces and dishes
Tomato Endpoints - Go back to ingredient preparation
Last updated
Was this helpful?