For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Field
Type
Required
Description

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

Field
Type
Required
Description

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

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

Field
Type
Required
Description

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

Aspect
Simmer
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

  1. Always Slice Tomatoes First

    Never pass raw tomato IDs to cooking endpoints. The quality degradation is silent and significant.

  2. Use Appropriate Temperatures

    Simmering should be 80-120 C. Roasting should be 150-250 C. Values outside these ranges may produce unexpected results.

  3. Check the Quality Field

Endpoint Reference

Endpoint
Method
Description

/v1/cook/simmer

POST

Simmer ingredients into sauce

/v1/cook/roast

POST

Roast ingredients

Next Steps

Last updated

Was this helpful?