# Quick Start Guide

{% hint style="info" %}
[PizzaStack](https://tomatopy.pizza/docs) is TomatoPy's pizza-making HTTP API. Acquire, prepare, cook, and assemble virtual pizzas programmatically.
{% endhint %}

## Basic Usage

### Acquiring Your First Tomato

```python
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 fresh 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
```

### Slicing Your Tomato

Tomatoes must be sliced before they can be used in cooking operations.

```python
# Slice the tomato
response = requests.post(f"{API_BASE}/tomato/slice", headers=HEADERS, json={
    "tomato_ids": [tomato["id"]],
    "method": "dice",
    "size": "medium",
    "consistency": "uniform"
})
sliced = response.json()
```

### Simmering a Sauce

```python
# Simmer sliced tomatoes into a sauce
response = requests.post(f"{API_BASE}/cook/simmer", headers=HEADERS, json={
    "ingredients": [
        {"id": sliced["id"], "name": "tomato", "amount": 150, "unit": "g"}
    ],
    "temperature": 100,
    "duration": "30m"
})
sauce = response.json()
print(sauce["consistency"])  # "smooth"
```

### Creating a Pizza Base

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

### Assembling the Pizza

```python
# Assemble the pizza
response = requests.post(f"{API_BASE}/pizza/assemble", headers=HEADERS, json={
    "base_id": base["id"],
    "sauce_id": sauce["id"],
    "toppings": [
        {"name": "mozzarella", "amount": 200, "unit": "g"},
        {"name": "basil", "amount": 10, "unit": "leaves"}
    ]
})
pizza = response.json()
```

### Baking the Pizza

```python
# Bake the assembled pizza
response = requests.post(f"{API_BASE}/pizza/bake", headers=HEADERS, json={
    "pizza_id": pizza["id"],
    "temperature": 450,
    "duration": "2m"
})
baked = response.json()
print(baked["quality_score"])  # 0.92
```

## Taste Testing

```python
# Analyze the final product
response = requests.post(f"{API_BASE}/taste/analyze", headers=HEADERS, json={
    "dish_id": baked["id"],
    "depth": "comprehensive",
    "include_aroma": True,
    "include_texture": True
})
profile = response.json()

print(profile["acidity"])    # 0.7
print(profile["sweetness"])  # 0.3
print(profile["umami"])      # 0.8
```

## Next Steps

* [Basic Concepts](https://tomatopy.pizza/docs/readme-1/basic-concepts) - Learn about core PizzaStack API concepts
* [Making Your First Sauce](https://tomatopy.pizza/docs/tutorials/making-your-first-marinara) - Follow a complete tutorial
* [API Endpoints](https://tomatopy.pizza/docs/core-modules) - Explore the full API

## Tips and Tricks

> **Pro Tip**: Use the session debug endpoint to inspect the state of all objects in your session:
>
> ```bash
> curl -H "X-API-Key: your-api-key" \
>   https://api.tomatopy.pizza/v1/session/your-session-id/log
> ```

> **Note**: All measurements in the PizzaStack API use the metric system by default. Weights are in grams, temperatures in Celsius, and volumes in milliliters.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tomatopy.pizza/docs/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
