How it works
The Cloud API is fully managed and handles:- Authentication: User registration, login, JWT token management
- Project data: Projects, API keys, user memberships
- AI features: Image generation, content processing
- File storage: Image uploads and management
Configuration
Your application connects via environment variables in.env.local:
.env.local
Making API calls
From Server Components
Use the deployment config helper:app/dashboard/page.tsx
From Server Actions
Create reusable server actions:app/actions.ts
From Client Components
Use hooks to access configuration:components/data-fetcher.tsx
Available endpoints
Common Cloud API endpoints you’ll use: Authentication:POST /api/v1/auth/register- Register end usersPOST /api/v1/auth/login- User loginGET /api/v1/auth/me- Get current user
GET /api/v1/projects- List projects (developer only)GET /api/v1/projects/{id}- Get project details
POST /api/v1/generation/generate-v2- Generate AI imagesGET /api/v1/generation/list- List user generations
See the Cloud API Reference for complete endpoint documentation.
Error handling
Always handle API errors gracefully:Rate limits
The Cloud API enforces rate limits per project:- Authentication: 10 requests per minute
- Data endpoints: 100 requests per minute
- AI generation: 10 requests per minute
Next steps
API Reference
Complete endpoint documentation
Authentication
Implement user authentication

