5-Minute Quickstart
5 min
The fastest way to get B2ALABS running and make your first API call.
From Zero to First API Call
Complete setup in under 5 minutes. Just copy, paste, and run!
Prerequisites
You'll need Docker & Docker Compose installed. If you don't have them, see installation guide.
1
Clone & Start
Clone repository and start all services with Docker Compose
1 min
git clone https://github.com/b2alabs/b2alabs.git
cd b2alabs
docker-compose up -d
2
Setup Database
Apply database migrations
30 sec
cd packages/gateway-core
make migrate-up
3
Register User
Create your first user account
30 sec
curl -X POST http://localhost:8080/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"you@email.com","password":"Pass123!","name":"Your Name"}'4
Get Token
Login and receive JWT token (copy the "token" value)
30 sec
curl -X POST http://localhost:8080/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"you@email.com","password":"Pass123!"}'5
Create API Key
Generate an API key for programmatic access
30 sec
curl -X POST http://localhost:8080/api/v1/auth/api-keys \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"name":"My Key","permissions":["ai_gateway","proxy"]}'6
Make First Request
Make your first AI Gateway request (requires OPENAI_API_KEY in .env)
1 min
curl -X POST http://localhost:8080/api/v1/ai/chat/completions \
-H "Authorization: YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5","messages":[{"role":"user","content":"Hello!"}]}'Your Services
Access your B2ALABS services at these URLs
What's Next?
Having Issues?
Was this page helpful?
