API Reference
Complete API reference for Wazza Engine. This documentation is automatically generated from our OpenAPI specification and stays in sync with the latest API changes.
Base URL
Authentication
All API requests require authentication using either JWT tokens or API keys.
JWT Authentication (User Sessions)
Authorization: Bearer YOUR_JWT_TOKENAPI Key Authentication (Service-to-Service)
X-API-Key: YOUR_API_KEYRate Limits
API requests are rate-limited based on your subscription tier:
| Tier | Requests/Hour | Credits/Month |
|---|---|---|
| Free | 50 | 50 |
| Pro | 500 | 500 |
| Team | 2,000 | Custom |
| Enterprise | 10,000+ | Custom |
API Endpoints
Browse all 97 available endpoints organized by category. Click any endpoint to view detailed documentation.
Infrastructure
Authentication
/v1/auth/registerRegister New User
Create a new user account
/v1/auth/loginLogin
Authenticate user and get JWT token
/v1/auth/refreshRefresh JWT Token
Refresh an expired JWT token using a valid refresh token
/v1/auth/logoutLogout
Logout user and invalidate refresh token
/v1/auth/googleInitiate Google OAuth
Redirect to Google OAuth consent screen with optional return URL. **Multi-Frontend Support**: Use the `state` parameter to specify where tokens should be delivered after authentication. **Example**: - Console: `GET /v1/auth/google?state=https://console.wazza.ai/dashboard` - Standalone App: `GET /v1/auth/google?state=https://app.wazza.ai/home` - No state: Redirects to `FRONTEND_URL` environment variable (default) **Security**: Only whitelisted URLs (configured in `ALLOWED_FRONTEND_URLS`) can receive tokens.
/v1/auth/githubInitiate GitHub OAuth
Redirect to GitHub OAuth consent screen with optional return URL. **Multi-Frontend Support**: Use the `state` parameter to specify where tokens should be delivered after authentication. **Example**: - Console: `GET /v1/auth/github?state=https://console.wazza.ai/dashboard` - Standalone App: `GET /v1/auth/github?state=https://app.wazza.ai/home` - No state: Redirects to `FRONTEND_URL` environment variable (default) **Security**: Only whitelisted URLs (configured in `ALLOWED_FRONTEND_URLS`) can receive tokens.
/v1/auth/forgot-passwordRequest Password Reset
Send password reset email to user
/v1/auth/reset-passwordReset Password
Reset password using token from email
/v1/auth/verify-emailVerify Email Address
Verify user email using token from verification email
User
/v1/user/profileGet User Profile
Get the current authenticated user profile
/v1/user/profileUpdate User Profile
Update the current authenticated user profile
/v1/user/passwordChange Password
Change the current authenticated user password
/v1/user/preferencesGet User Preferences
Get the current authenticated user preferences
/v1/user/preferencesUpdate User Preferences
Update the current authenticated user preferences
Providers
Models
Chat Orchestrator
/v1/chatSend Message to Claude AI
Send a natural language request to Claude AI which automatically routes to the appropriate provider/model
/v1/chat/sessionsGet Active Sessions
Get list of user's active chat sessions
/v1/chat/sessions/{sessionId}Get Session Information
Get details about a specific chat session
/v1/chat/sessions/{sessionId}Delete Session
Delete a chat session and all its history
/v1/chat/sessions/{sessionId}/historyGet Conversation History
Get full conversation history for a session
/v1/chat/sessions/{sessionId}/clearClear Conversation History
Clear all messages from a session while keeping the session active
/v1/chat/sessions/{sessionId}/statsGet Session Statistics
Get statistics and analytics for a chat session
/v1/chat/modelGet Model Information
Get information about the Claude orchestrator model being used
Generation
/v1/generateCreate Generation Job
Generate image, video, audio, or 3D content directly. **Two Modes**: 1. **Explicit Provider/Model**: Specify `provider` and `model` for direct control 2. **Auto-Routing**: Specify `capability` and `contentType` to let Wazza choose the best provider The job is processed asynchronously. Use the returned `jobId` to check status.
/v1/generate/{jobId}Get Job Status
Check the status of a generation job and retrieve outputs when completed. **Job Statuses**: - `pending`: Job is queued, waiting to be processed - `processing`: Job is currently being generated - `completed`: Job finished successfully, outputs available - `failed`: Job failed, check error message - `cancelled`: Job was cancelled by user
/v1/generate/{jobId}Cancel Job
Cancel a queued or processing job. **Restrictions**: - Cannot cancel completed or failed jobs - Credits reserved for the job will be refunded
Jobs
Training
/v1/trainList Trained Models
Get list of available trained LoRA models for inference
/v1/train/{id}Get Training Job Details
Get detailed information about a training job
/v1/train/{id}Delete Trained Model
Delete a trained model and its weights
/v1/train/{id}/inferRun Inference with Trained Model
Generate images using a trained LoRA model
/v1/train/{id}/progressGet Training Progress
Get real-time training progress and status
/v1/train/{id}/downloadDownload Trained Model
Get download URL for trained model weights
Workflows
/v1/workflowsList Workflows
Get list of workflows with optional filtering
/v1/workflowsCreate Workflow
Create a new multi-step AI workflow
/v1/workflows/{id}Get Workflow Details
Get detailed information about a specific workflow
/v1/workflows/{id}Update Workflow
Update an existing workflow
/v1/workflows/{id}Delete Workflow
Delete a workflow
/v1/workflows/{id}/executeExecute Workflow
Execute a workflow with provided inputs
/v1/workflows/searchSearch Workflows
Search workflows by query string and filters
/v1/workflows/{id}/publishPublish Workflow
Make a workflow public for other users
/v1/workflows/{id}/versionsCreate Workflow Version
Create a new version of a workflow
/v1/workflows/{id}/planPlan Workflow Execution
Analyze workflow and return execution plan without executing
/v1/workflows/{id}/validateValidate Workflow
Validate workflow configuration and dependencies
Payments
/v1/payments/subscriptionsCreate Subscription
Create a new subscription for the organization
/v1/payments/subscriptions/{id}Update Subscription
Update an existing subscription (change plan, billing cycle, etc.)
/v1/payments/subscriptions/{id}Cancel Subscription
Cancel an active subscription
/v1/payments/plansList Subscription Plans
Get all available subscription plans and pricing
/v1/payments/credits/packagesList Credit Packages
Get all available one-time credit packages
/v1/payments/credits/purchasePurchase Credits
Create a checkout session to purchase credits
/v1/payments/invoicesGet Invoices
Get list of invoices for the organization
/v1/payments/historyGet Payment History
Get payment and credit transaction history
/v1/payments/billing-portalCreate Billing Portal Session
Create a session for the Stripe billing portal where customers can manage subscriptions and payment methods
/webhooks/stripeStripe Webhook
Webhook endpoint for Stripe payment events (public, no auth required). Handled events: - checkout.session.completed - Checkout session completed (credit purchases) - payment_intent.succeeded - Payment intent succeeded - customer.subscription.created - Subscription created - customer.subscription.updated - Subscription updated - customer.subscription.deleted - Subscription cancelled - invoice.paid - Invoice paid - invoice.payment_failed - Invoice payment failed
API Keys
/v1/api-keysList all API keys
Get list of all API keys for the authenticated user's organization. **OPTIMIZED**: Server-side pagination with total count. Returns paginated results and accurate total count in a single optimized query.
/v1/api-keysCreate new API key
Generate a new API key for the organization. The full key is only shown once.
/v1/api-keys/{id}Get API key details
Get detailed information about a specific API key
/v1/api-keys/{id}Update API key
Update API key metadata (name, scopes, rate limit). Cannot update the key itself.
/v1/api-keys/{id}Revoke API key
Revoke an API key (soft delete). The key will no longer be valid for authentication.
/v1/api-keys/{id}/usageGet API key usage
Get detailed usage statistics for an API key
Credits
/v1/credits/balanceGet credit balance
Get current credit balance for the organization
/v1/credits/usageGet credit usage
Get credit usage analytics with breakdowns by date, provider, and capability
/v1/credits/transactionsGet credit transactions
Get paginated list of credit transactions (purchases, consumption, refunds)
Organization
/v1/organizationGet organization details
Get organization details with statistics
/v1/organizationUpdate organization
Update organization settings
/v1/organization/usageGet organization usage
Get organization-wide usage statistics aggregated by member, API key, and provider. Returns job statistics, credits consumed, and detailed breakdowns for the specified time period.
/v1/organization/limitsGet organization limits
Get rate limits and quotas for the organization based on plan tier
Webhooks
/v1/webhooksCreate webhook
Register a new webhook endpoint for receiving event notifications
/v1/webhooksList webhooks
Get list of all webhook endpoints for the organization
/v1/webhooks/{id}Get webhook details
Get detailed information about a specific webhook
/v1/webhooks/{id}Update webhook
Update webhook endpoint configuration
/v1/webhooks/{id}Delete webhook
Delete a webhook endpoint
/v1/webhooks/{id}/testTest webhook
Send a test payload to the webhook endpoint to verify it works
/v1/webhooks/{id}/deliveriesGet webhook deliveries
Get delivery logs for a webhook endpoint
Teams
/v1/teams/membersInvite team member
Send an invitation to join the organization
/v1/teams/membersList team members
Get list of all members in the organization
/v1/teams/members/{id}Update member role
Change the role of a team member
/v1/teams/members/{id}Remove team member
Remove a member from the organization
/v1/teams/invitationsList invitations
Get list of team invitations
/v1/teams/invitations/{id}Revoke invitation
Cancel a pending team invitation
/v1/teams/invitations/{token}/acceptAccept invitation
Accept a team invitation and join the organization. Requires the user to be authenticated with Bearer token.
Analytics
/v1/analytics/overviewGet analytics overview
Get high-level overview statistics for the dashboard
/v1/analytics/usageGet usage analytics
Get detailed usage analytics with time-series data
/v1/analytics/costsGet cost analytics
Get cost analysis and spending trends
/v1/analytics/errorsGet error analytics
Get error analytics and failure breakdown