--- title: database.pizza description: Build on database.pizza — a managed database service powered by the PizzaSQL engine, with a PostgreSQL-compatible wire protocol and an HTTP query API. --- database.pizza is a managed database service. You create an organization, create a database, and then talk to it two ways: over a **PostgreSQL-compatible wire protocol** using the client you already know, or over a simple **HTTP JSON API** from any language. Under the hood every database runs on [PizzaSQL](/internals/architecture/), a SQL engine built from scratch in Go. PizzaSQL speaks **SQLite-compatible SQL** through a PostgreSQL wire interface, so it looks like Postgres to your tools while using SQLite's forgiving type system. It is *not* PostgreSQL itself. ## Three ways in - **New here?** Follow the [Quickstart](/getting-started/quickstart/) — five minutes from empty account to your first query. - **Writing SQL?** Start with [SQL at a glance](/sql-reference/overview/) and keep the [compatibility notes](/sql-reference/compatibility/) close before generating production queries. - **Curious how it works?** The [Engine Internals](/internals/architecture/) section walks through the PizzaSQL architecture, query lifecycle, and storage model. ## What you get Every database gives you three access surfaces plus a dashboard: | Surface | Where | Best for | | --- | --- | --- | | PostgreSQL wire protocol | `db.database.pizza:5432` | Existing `psql`, `pg`, psycopg, ORM, and BI tools | | HTTP query API | `https://db.database.pizza///query` | Any language, serverless, and edge workloads | | Auto-generated REST API (preview) | `https://db.database.pizza///api/` | Single-table CRUD without writing SQL | | Dashboard | `app.database.pizza` | Schema browsing, query editor, API keys, metrics | All programmatic access is authenticated with **API keys**. Keys carry granular scopes — `read`, `write`, `alter_table`, `drop_table` — so you can issue a read-only key to a reporting job and a write key to an ingestion service. See [API keys & permissions](/clients/api-keys/). ## A taste Create a key in the dashboard, then query over HTTP: ```bash curl -s https://db.database.pizza/acme/production/query \ -H "Authorization: Bearer pz_live_REPLACE_ME" \ -H "Content-Type: application/json" \ -d '{"sql": "SELECT 1 + 1 AS answer"}' ``` Or with `psql`, using the key as the password: ```bash PGPASSWORD='pz_live_REPLACE_ME' psql \ "postgresql://u@db.database.pizza:5432/acme%2Fproduction?sslmode=disable" ``` Throughout these docs we use a fictional organization `acme` and database `production`, and the placeholder key `pz_live_REPLACE_ME`. Substitute your own values — and never paste a real key into anything you share. ## Getting started - [Quickstart](/getting-started/quickstart/) — create an org, database, and key; run your first query. - [Connect](/getting-started/connect/) — connection strings and parameters for every client. - [Your first schema](/getting-started/first-schema/) — tables, inserts, indexes, and queries. ## Use your database - [PostgreSQL clients](/clients/postgresql/) — `psql`, GUIs, and driver configuration. - [HTTP query API](/clients/http-api/) — the managed JSON endpoint. - [JavaScript](/clients/javascript/) and [Python](/clients/python/) — idiomatic examples. - [REST API](/clients/rest-api/) — auto-generated CRUD endpoints. - [API keys & permissions](/clients/api-keys/) — scopes, lifecycle, and security. ## Reference and guides - [SQL reference](/sql-reference/overview/) — types, statements, expressions, functions, and constraints. - [Import & export](/guides/import-export/) — move data in and out. - [Errors & troubleshooting](/guides/errors/) — understand failure responses. - [Limits & quotas](/guides/limits/) — what counts against your plan. ## The managed API vs. the engine It's worth drawing one distinction early. PizzaSQL, the engine, exposes its own raw HTTP API (`POST /query`, `GET /schema/tables`, and so on) and its own PostgreSQL listener. Those are **internal** to the platform. As a customer you never touch them directly. Instead, you talk to the **managed proxy** at `db.database.pizza`, which sits in front of your engine instance and adds authentication, per-organization routing (`/`), scope enforcement, quotas, and metrics. The endpoints look similar to the engine's, but they require a Bearer API key and a `/` path. The pages under [Use your database](#use-your-database) document the managed surface. ## Status database.pizza is under active development. Features, quotas, and exact response shapes may change; anything unstable is flagged inline. If something here disagrees with what you observe, trust the observed behavior and [open an issue](https://github.com/database-pizza/app/issues).