Advanced Flavor Profiling
This tutorial covers advanced techniques for analyzing and comparing flavor profiles using the PizzaStack taste endpoints.
Prerequisites
Before starting, make sure you have:
A PizzaStack API key
Python with the
requestslibrary installedSome dishes already created in a session (see Making Your First Sauce)
Setup
import requests
import uuid
API_BASE = "https://api.tomatopy.pizza/v1"
HEADERS = {
"Content-Type": "application/json",
"X-API-Key": "your-api-key",
"X-Session-ID": str(uuid.uuid4())
}
def api_post(endpoint, payload):
"""Helper to make API calls."""
response = requests.post(f"{API_BASE}{endpoint}", headers=HEADERS, json=payload)
response.raise_for_status()
return response.json()Step 1: Create Test Ingredients
Let's create several tomato varieties to compare:
Step 2: Basic Flavor Analysis
Analyze a single ingredient with comprehensive depth:
Step 3: Compare Tomato Varieties
Use /taste/compare to see how different varieties stack up:
Step 4: Track Flavor Through the Pipeline
Analyze how flavors change from raw tomato to finished sauce:
Step 5: Compare Raw vs Cooked
Use the compare endpoint to see the changes side by side:
Step 6: Analyze a Finished Pizza
Make a complete pizza and analyze it:
Step 7: Compare Multiple Finished Dishes
Compare sauce vs finished pizza to see how baking affects the flavor:
Best Practices
Use Comprehensive Depth for Final Products
For intermediate ingredients,
"basic"is usually sufficient. Save"comprehensive"with aroma and texture for finished dishes.Compare at the Same Pipeline Stage
Comparing a raw tomato to a baked pizza is possible but the results are more meaningful when comparing items at the same stage (e.g., two different sauces).
Check Response Quality Fields
Next Steps
API Usage Best Practices - Optimize your API usage
Session Management - Manage sessions effectively
Core API Endpoints - Explore all endpoints
Last updated
Was this helpful?