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

Pizza Creation System

The pizza endpoints handle creating bases, assembling pizzas, and baking them.

Creating a Base

POST /v1/pizza/base

Create a pizza base (dough). This is the foundation of your pizza.

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

# Create a Neapolitan-style base
response = requests.post(f"{API_BASE}/pizza/base", headers=HEADERS, json={
    "thickness": "medium",
    "size": "12inch",
    "style": "neapolitan",
    "hydration": 0.65
})
base = response.json()

print(base["id"])         # "bas_pqr678"
print(base["style"])      # "neapolitan"
print(base["thickness"])  # "medium"

Request Body

Field
Type
Required
Description

thickness

string

yes

"thin", "medium", or "thick"

size

string

yes

Pizza size (e.g., "10inch", "12inch", "14inch", "18inch")

style

string

yes

"neapolitan", "new_york", "chicago", "roman"

hydration

float

no

Dough hydration ratio, 0.0 to 1.0 (default: 0.6)

Different Base Styles

Assembling a Pizza

POST /v1/pizza/assemble

Assemble a pizza by combining a base, sauce, and toppings. This step is required before baking.

Request Body

Field
Type
Required
Description

base_id

string

yes

ID from /pizza/base

sauce_id

string

yes

ID from /cook/simmer or /cook/roast

toppings

array

yes

List of toppings, each with name, amount, unit

Assembly Required

Correct Flow: Assemble Then Bake

Incorrect Flow: Baking Without Assembly

Baking a Pizza

POST /v1/pizza/bake

Bake an assembled pizza. Returns the finished pizza with a quality score.

Request Body

Field
Type
Required
Description

pizza_id

string

yes

ID from /pizza/assemble

temperature

integer

yes

Baking temperature in Celsius

duration

string

yes

Baking duration (e.g., "2m", "90s", "3m")

The Full Assembly Flow

Here is the complete pizza creation pipeline in one script:

Error Handling

Best Practices

  1. Always Assemble Before Baking

    The /pizza/bake endpoint only accepts pizza_id values from /pizza/assemble. Passing a base_id will return a 400 error.

  2. Use Quality Sauce

    The sauce quality directly affects the final pizza score. Make sure you sliced your tomatoes before simmering.

  3. Check the Quality Score

Endpoint Reference

Endpoint
Method
Description

/v1/pizza/base

POST

Create a pizza base

/v1/pizza/assemble

POST

Assemble a pizza from base, sauce, and toppings

/v1/pizza/bake

POST

Bake an assembled pizza

Next Steps

Last updated

Was this helpful?