Skip to main content

Instant Postgres

Create a Postgres 18 database with pgvector in about 7 seconds, connect with psql or run SQL over HTTPS, and pay only while it is awake.

Databases2 min read

Instant Postgres is a Postgres 18 database of your own, created with one call and reachable from anywhere over TLS. It is separate from the managed PostgreSQL plans, which sit on a private IP and renew monthly.

Create one

  • MCP: instantdb_create (optional name, ttl_hours, allowed_cidrs).
  • REST: POST /v1/hosting/instant-databases with your X-API-Key.

The response has a url like postgresql://postgres:PASSWORD@HOST:5432/postgres?sslmode=require. It is shown once. You need a hosting balance of at least $1; top it up first from the hosting dashboard.

Connect

bash
psql "postgresql://postgres:PASSWORD@HOST:5432/postgres?sslmode=require"

A sleeping database wakes on the first connection, which can take up to 20 seconds. Set a connect timeout of 45 seconds.

Run SQL without a driver

instantdb_query (or POST /v1/hosting/instant-databases/{id}/query) runs one statement with $1 parameters, or a script of several statements without parameters. Limits: 10 second timeout, 1000 rows, 1 MB response.

Pricing

  • <!-- truth:hosting_instant_db_hour -->$0.15/active hour<!-- /truth -->, billed per active second.
  • <!-- truth:hosting_instant_db_storage -->$0.50/GB-month<!-- /truth -->, up to 20 GB per database.
  • $0 while asleep. Data out is included.
  • The first database on your account gets one active hour free.

Holds and deletion

Usage is charged every 10 minutes. If the balance cannot pay, the database is held: connections are refused until you top up. A database held for <!-- truth:hosting_instant_db_hold_days -->7 days<!-- /truth --> is deleted, as is one past its ttl_hours. Deleting is permanent.

See the Instant Postgres skill for every error code.

Was this article helpful?

← More Managed Databases articles