OpenAPI 3.1 Specification

MottoLogic.ai AI Applications at Scale

Enterprise-ready backend infrastructure with built-in authentication, role-based access control, and multi-tenancy. Deploy secure, scalable AI applications with clean architecture and industry best practices.

authentication-flow.ts
Multi-TenantRBAC
// Secure multi-tenant authentication with RBAC
const authenticateUser = async (credentials: LoginDto) => {
  const user = await userRepository.findByEmail(
    credentials.email,
    credentials.tenantId
  );
  
  // Verify permissions with role-based access control
  const permissions = await rbacService.getUserPermissions(
    user.id,
    user.tenantId
  );
  
  return {
    token: generateJWT(user),
    permissions,
    tenant: user.tenant
  };
};

Enterprise Features Built for Scale

Everything you need to build secure, multi-tenant AI applications with confidence.

Multi-Tenancy

Complete tenant isolation with row-level security, ensuring data privacy and compliance across organizations.

Authentication & Authorization

JWT-based authentication with comprehensive RBAC system for granular permission management.

Role-Based Access Control

Flexible RBAC with modules, menus, features, and actions for fine-grained access control.

Clean Architecture

Domain-driven design with clear separation of concerns following SOLID principles and best practices.

Enterprise Database

PostgreSQL with Prisma ORM, migration tracking, and optimized queries for high-performance operations.

Production-Ready

Built with TypeScript, Express, and Inversify IoC for maintainable, scalable enterprise applications.

From Spec to Production in Minutes

Our OpenAPI specification serves as the single source of truth. Generate SDKs, validate requests, and build integrations with confidence.

1

Download OpenAPI Spec

Get the complete API specification in YAML or JSON

2

Generate Client SDKs

Use OpenAPI Generator for your preferred language

3

Test with Swagger UI

Interactive testing before writing any code

Schema Definition
components:
  schemas:
    AnalysisResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum: [success, error]
        data:
          type: object
          properties:
            id:
              type: string
              example: "req_abc123"
            result:
              $ref: '#/components/schemas/Result'
            processing_time:
              type: string
              example: "87ms"

Interactive API Explorer

Try our API endpoints directly from the documentation with Swagger UI.

POST/v1/analyze
Analyze content with AI

Request Body

{
  "text": "string",
  "options": {
    "sentiment": true,
    "entities": true,
    "summary": true
  }
}
200 OK401 Unauthorized429 Rate Limited
Authentication: Bearer Token
GET/v1/models

List available AI models

POST/v1/generate

Generate AI content

GET/v1/usage

Check API usage stats