Getting Started
Go from zero to a fully functional backend in under five minutes. This guide walks you through creating an organization, launching a project, and making your first API call.
Prerequisites
1. Create an organization
Organizations are the top-level container for everything in DYPAI. They hold your projects, team members, billing, and settings.
Sign in
Go to dypai.ai and sign in with your account (email/password or OAuth).
Create a new organization
Click New Organization on the dashboard. Give it a name that identifies your company or team. You'll be assigned the Owner role automatically.
Invite your team (optional)
Go to Members in the sidebar and invite collaborators by email. Assign them Admin or Normal roles depending on the level of access they need. See Organization Members for details.
2. Create a project
Each project is an isolated environment with its own database, API endpoints, storage buckets, authentication, and deployment pipeline.
New project
From your organization dashboard, click New Project. Choose a name and select a plan (Free is perfect for getting started).
Automatic provisioning
DYPAI automatically provisions a dedicated PostgreSQL 15 database, a storage system, and a unique API endpoint for your project. This takes a few seconds.
Get your API credentials
Once the project is ready, navigate to Settings to find your project URL and API keys. You'll need the anon key for client-side requests and the service_role key for server-side operations.
3. Create your first table
Head to the Database section in the project sidebar. The Visual Editor lets you create tables without writing SQL.
Add a table
Click New Table, name it todos, and add these columns:
| Column | Type | Default | Notes |
|---|---|---|---|
id | uuid | gen_random_uuid() | Primary key (auto-created) |
title | text | β | Required |
completed | bool | false | β |
created_at | timestamptz | now() | β |
Save the table
Click Save. DYPAI generates the SQL migration, runs it, and immediately creates REST API endpoints for this table.
4. Make your first API call
Every table automatically gets REST endpoints. You can start querying data immediately:
// Insert a todo
const response = await fetch(
'https://your-project.dypai.ai/api/todos',
{
method: 'POST',
headers: {
'Authorization': 'Bearer ' + ANON_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'My first todo'
})
}
);
const todo = await response.json();
// { id: "a1b2c3...", title: "My first todo", completed: false, created_at: "..." }// List all todos
const response = await fetch(
'https://your-project.dypai.ai/api/todos?order=created_at.desc',
{
headers: {
'Authorization': 'Bearer ' + ANON_KEY
}
}
);
const todos = await response.json();
// [{ id, title, completed, created_at }, ...]5. Add authentication (optional)
To protect your API and identify users, enable authentication:
Enable a provider
Go to Auth > Providers and enable Email/Password. You can also enable OAuth providers like Google or GitHub.
Register a user
Use the auth API to create a new user account:
const response = await fetch(
'https://your-project.dypai.ai/auth/register',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'user@example.com',
password: 'securepassword123'
})
}
);
const { user, token } = await response.json();Use the token
Include the JWT token in subsequent requests to authenticate as that user. The token is used in the Authorization: Bearer header.
6. Secure with Row Level Security
Row Level Security (RLS) ensures users can only access their own data. Enable it in the Database section and add a policy:
-- Enable RLS on the todos table
ALTER TABLE todos ENABLE ROW LEVEL SECURITY;
-- Users can only see their own todos
CREATE POLICY "Users see own todos"
ON todos FOR SELECT
USING (user_id = auth.uid());
-- Users can only insert their own todos
CREATE POLICY "Users insert own todos"
ON todos FOR INSERT
WITH CHECK (user_id = auth.uid());7. Deploy
Your project is live from the moment you create it. Every table, endpoint, and configuration change is applied instantly. For production readiness:
- Versions β Use the Versions section to track builds and rollback if needed
- Custom domain β Configure a custom domain in Settings
- Environment variables β Store secrets securely in Settings > Environment Variables
- Monitoring β Use Metrics and Console to monitor performance and debug issues
Project structure
Here's what your project includes after setup:
| Section | What it does | Learn more |
|---|---|---|
| Database | PostgreSQL tables, SQL editor, backups | Database docs |
| API Builder | REST endpoints, Flow Editor, API keys | API docs |
| Auth | Users, providers, roles, JWT tokens | Auth docs |
| Storage | File buckets, uploads, CDN delivery | Storage docs |
| Edge Functions | Python & Rust serverless functions | Edge Functions docs |
| AI | MCP protocol, agents, LLM integration | AI docs |
Next steps
You now have a working project with a database, API, and optional authentication. Here's where to go from here:
- Deep dive into the database β Visual editor, SQL console, data types
- Build custom APIs β Flow Editor for complex logic, rate limiting
- Set up authentication β OAuth, email/password, SMS, JWT
- Manage files β Buckets, image transforms, signed URLs
- Write edge functions β Python or Rust serverless compute
- Integrate AI β MCP tools, agents, multi-model support