Deploy a standard data lakehouse for each customer
# spicepod.yaml: one template for every customerversion: v1kind: Spicepodname: customer-dataruntime: auth: api_key: enabled: true keys: - ${secrets:SPICE_API_KEY}datasets: - from: postgres:public.accounts name: accounts params: pg_host: ${secrets:PG_HOST} # Set for each customer pg_db: ${secrets:PG_DB} pg_user: ${secrets:PG_USER} pg_pass: ${secrets:PG_PASS} acceleration: enabled: true$ PROJECT=$(curl -s -X POST https://api.spice.ai/v1/projects \ -H "Authorization: Bearer $SPICE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "customer-a", "region": "us-west-2"}' | jq -r .id)# The PG_* variables and SPICE_API_KEY hold customer-a values$ for name in PG_HOST PG_DB PG_USER PG_PASS SPICE_API_KEY; do curl -X POST https://api.spice.ai/v1/projects/$PROJECT/secrets \ -H "Authorization: Bearer $SPICE_TOKEN" \ -H "Content-Type: application/json" \ -d "$(jq -n --arg name "$name" --arg value "$(printenv "$name")" \ '{name: $name, value: $value}')" done$ curl -X PUT https://api.spice.ai/v1/projects/$PROJECT \ -H "Authorization: Bearer $SPICE_TOKEN" \ -H "Content-Type: application/json" \ -d "$(jq -n --rawfile spicepod spicepod.yaml '{spicepod: $spicepod}')"$ curl -X POST https://api.spice.ai/v1/projects/$PROJECT/deployments \ -H "Authorization: Bearer $SPICE_TOKEN"sql> -- the same query runs for every customer SELECT plan, COUNT(*) AS accounts FROM accounts GROUP BY plan;# example output for customer-aenterprise 42team 318Define your template
Write one Spicepod with the datasets, acceleration, and API keys that each agent needs. Use secrets for each customer's credentials.
Create the customer project
Call the Management API to create a project, store the customer's secrets, set the Spicepod, and deploy.
Connect your agent
Each customer's agent calls a dedicated runtime over MCP or SQL, with that project's API key.


