> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dalus.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new model

> Creates a new model within a team workspace. Models can only be created when associated with a specific team, and only by users with Admin or Owner roles.



## OpenAPI

````yaml post /api/models
openapi: 3.0.0
info:
  title: Dalus Public API Documentation
  version: 1.0.0
  description: Public API documentation for Dalus application
servers:
  - url: http://localhost:3000
    description: Dalus API Server
security:
  - bearerAuth: []
tags:
  - name: models
    description: AI model management endpoints
  - name: models/requirements
    description: Requirements management for models
  - name: models/actions
    description: Action management for models
  - name: models/parts
    description: Part management for models
  - name: models/states
    description: State management for models
  - name: models/transitions
    description: Transition relationship management for models
  - name: models/signals
    description: Signal relationship management for models
  - name: models/interfaces
    description: Interface relationship management for models
  - name: models/ports
    description: Port management for models
paths:
  /api/models:
    post:
      tags:
        - models
      summary: Create a new model
      description: >-
        Creates a new model within a team workspace. Models can only be created
        when associated with a specific team, and only by users with Admin or
        Owner roles.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - team_id
              properties:
                name:
                  type: string
                  description: Name of the model
                team_id:
                  type: string
                  description: ID of the team workspace where the model will be created
      responses:
        '200':
          description: Model created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        '400':
          description: Bad request - missing team_id or invalid data
        '401':
          description: Not authenticated
        '403':
          description: >-
            Not authorized - user not member of team or insufficient permissions
            (requires Admin or Owner role)
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the model
        user_id:
          type: string
          description: ID of the user who owns this model
        name:
          type: string
          description: Name of the model
        access_control_list:
          type: array
          items:
            type: object
            properties:
              user_id:
                type: string
              group_id:
                type: string
              invite_id:
                type: string
              email:
                type: string
                format: email
              roles:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    permissions:
                      type: array
                      items:
                        type: object
                        properties:
                          action:
                            type: string
                            enum:
                              - View
                              - Edit
                              - Comment
                              - Invite Collaborator
                              - Manage Model
                          scopes:
                            type: array
                            items:
                              type: string
                        required:
                          - action
                          - scopes
                  required:
                    - name
                    - permissions
            required:
              - roles
          description: Access control list for the model
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
      required:
        - id
        - user_id
        - name
        - access_control_list
        - created_at
    Error:
      type: object
      description: Standard error response
      properties:
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Application-specific error code
        details:
          description: Additional error details (optional)
      required:
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````