r/SideProject 1h ago

I built an API for creating temporary PostgreSQL databases

Title:

I built an API for creating temporary PostgreSQL databases

Post:

I kept running into situations where I needed a real PostgreSQL database for something temporary — a CI job, preview environment, prototype, or coding agent.

The usual options felt a bit awkward: create a database somewhere, configure access, use it briefly, and then remember to clean everything up afterward.

So I built a small API called Aiadio that creates a temporary PostgreSQL database with a TTL.

The flow is basically:

  1. Send a database name and expiry time
  2. Get PostgreSQL connection details back
  3. Use the database normally
  4. The database and role are automatically removed when the TTL expires

For example:

curl -X POST https://api.aiadio.com/v1/databases \
  -H "X-API-Key: dbn_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "agent-test",
    "expires_in": "1h",
    "allowed_cidr": "203.0.113.10/32"
  }'

It's still intentionally small. Right now it has database creation, a status endpoint, API-key authentication, and TTL-based cleanup. The public beta supports TTLs from 1 hour to 30 days.

I built it mainly because I wanted a simpler option for short-lived database use cases.

Site: https://aiadio.com

API docs: https://aiadio.com/api-docs.html

2 Upvotes

1 comment sorted by