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

Ingredient Manipulation

The tomato endpoints handle acquiring, slicing, and squeezing tomatoes in the PizzaStack API.

Acquiring Tomatoes

POST /v1/tomato/acquire

Acquire a new tomato to work with. Every tomato gets a unique ID within your session.

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"
}

# Acquire a San Marzano tomato
response = requests.post(f"{API_BASE}/tomato/acquire", headers=HEADERS, json={
    "variety": "San Marzano",
    "ripeness": 0.8,
    "weight": 150
})
tomato = response.json()

print(tomato["id"])        # "tom_abc123"
print(tomato["variety"])   # "San Marzano"
print(tomato["ripeness"])  # 0.8
print(tomato["weight"])    # 150
print(tomato["type"])      # "raw"

Request Body

Field
Type
Required
Description

variety

string

yes

Tomato variety (e.g., "San Marzano", "Roma", "Cherry")

ripeness

float

yes

Ripeness from 0.0 to 1.0

weight

integer

yes

Weight in grams

Acquiring Multiple Tomatoes

Slicing Tomatoes

POST /v1/tomato/slice

Slice one or more tomatoes. Slicing is required before tomatoes can be used in cooking operations for optimal quality.

Request Body

Field
Type
Required
Description

tomato_ids

array of strings

yes

IDs of tomatoes to slice

method

string

yes

Cutting method: "dice", "slice", "chop", "mince"

size

string

yes

Piece size: "small", "medium", "large"

consistency

string

no

"uniform" or "rough" (default: "uniform")

Slicing Multiple Tomatoes Together

Squeezing Tomatoes

POST /v1/tomato/squeeze

Extract juice from tomatoes. This produces a liquid ingredient that can be used differently from sliced tomatoes.

Request Body

Field
Type
Required
Description

tomato_ids

array of strings

yes

IDs of tomatoes to squeeze

pressure

float

yes

Pressure from 0.0 to 1.0 (higher = more juice, less pulp)

Error Handling

Best Practices

  1. Check Response Status Codes

  2. Always Slice Before Cooking

    Raw tomato IDs passed to /cook/simmer will silently degrade sauce quality. Always slice first.

  3. Store IDs for Later Use

Endpoint Reference

Endpoint
Method
Description

/v1/tomato/acquire

POST

Acquire a new tomato

/v1/tomato/slice

POST

Slice tomatoes

/v1/tomato/squeeze

POST

Extract juice from tomatoes

Next Steps

Last updated

Was this helpful?