Getting Started with DreamAPI
From zero to a fully secured API gateway in under 5 minutes. Follow the steps below or jump to any section.
Jump to
1. Create a Project
Click "+ New Project" from your dashboard or the nav bar.
Give it a name (e.g. "My SaaS App") and an optional description.
Each project is a self-contained workspace — its own integrations, keys, and billing scope.
Free tier: 1 project. Upgrade to Builder ($15/mo) for unlimited projects.
2. Connect Integrations
Inside your project, go to the Integrations tab.
Toggle on the services you need — OpenAI, Stripe, Neon, Vercel, etc.
For each integration, you can optionally store your API key in the encrypted vault (AES-256-GCM).
Track your monthly costs per integration with the built-in burn rate tracker.
Free tier: 3 integrations. Builder plan: unlimited.
3. The Encrypted Vault
When you add a key, it is encrypted server-side before being stored in the database.
Keys are locked to your project's Dream Key — they can't be read by anyone, including DreamAPI admins.
You can view, update, or remove vault keys at any time from the integration panel.
A green "Vault" badge indicates a key is securely stored.
Keys are encrypted with AES-256-GCM using a server-side master key. Each encrypted payload includes a unique IV (initialization vector).
4. Generate a Dream Key
Go to the Keys section of your project.
Click "Generate Dream Key" — you'll get a single token like dpk_live_abc123....
This key is your master gateway token. Use it in your .env file instead of individual API keys.
Copy it immediately — for security, the full key is only shown once.
Free tier: 1 key per project. Builder plan: unlimited keys.
5. Gateway Checkout & Webhooks
Use the gateway checkout endpoint to create Stripe checkout sessions through DreamAPI:
POST /api/gateway/checkout with your Dream Key in the Authorization header.
Set up webhook receivers at /api/gateway/webhook/[projectId]/[provider] to capture events from Stripe, Clerk, GitHub, and more.
All webhook events are logged in your project for debugging.
The gateway validates your Dream Key and routes requests to the right provider using your vault credentials.
6. Download Your .env
From the project overview, download a .env file with your Dream Key pre-configured.
Drop it into your project root and your app connects to all services through one token.
When you rotate keys, just download a fresh .env — no need to update 10 different dashboards.
The .env file never contains raw third-party API keys — only your encrypted Dream Key.
7. Rotate & Revoke
From the Keys panel, click "Revoke" on any active key to instantly disable it.
Generate a new key to replace it — all your integrations continue working with the new token.
Rotation is instant with zero downtime for your services.
Rotate your keys regularly as a security best practice. Revoked keys can never be reactivated.
Plans at a Glance
Free
$0/mo
- ✓ 1 project
- ✓ 3 integrations
- ✓ 1 Dream Key
- ✓ Encrypted vault
Builder
$15/mo
- ✓ Unlimited projects
- ✓ Unlimited integrations
- ✓ Unlimited Dream Keys
- ✓ Priority support