All integrationsDatabase
Neon Integration
Serverless Postgres with branching — a drop-in DATABASE_URL swap.
Neon is standard PostgreSQL under the hood, including the pgvector extension. Point DATABASE_URL at your Neon connection string and SQLAlchemy, Alembic migrations, and the RAG pipeline all work exactly as they do against self-hosted Postgres.
Setup in 4 steps
- 1Create a Neon project and copy the pooled connection string
- 2Set DATABASE_URL to the Neon connection string in your .env
- 3Enable pgvector in Neon's SQL editor: CREATE EXTENSION vector
- 4Run alembic upgrade head — migrations apply exactly as they do locally
What's included
- Standard Postgres wire protocol — SQLAlchemy and Alembic work unchanged
- pgvector supported, so the RAG pipeline needs no adapter changes
- Database branching is useful for spinning up isolated preview environments
- Scales to zero on the free tier, useful for staging or low-traffic deployments
- Works with the kit's existing async SQLAlchemy engine configuration
Code example
# .env — Neon as a drop-in Postgres replacement
DATABASE_URL=postgresql+asyncpg://user:password@ep-xxxx.neon.tech/neondb?sslmode=require
# Enable pgvector once in Neon's SQL editor:
# CREATE EXTENSION IF NOT EXISTS vector;
$ alembic upgrade head
# ✓ Tables and vector indexes created — identical to self-hosted PostgresFull documentation: /docs/database
Neon integration pre-wired and ready.
FastAPI AI Kit ships with Neon configured out of the box. No manual setup required.
Ready to ship your AI backend this weekend?
Join developers who skipped weeks of boilerplate and went straight to building.
No subscriptions · One-time payment · Lifetime updates
