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

# Create Model Instances Bulk

> Create many model instances in a single request.

Partial-success semantics: each item is created independently and per-item
failures are returned in `failed` rather than aborting the whole batch.
Use this from UIs that let users select N models from a discovered list to
avoid N HTTP round-trips.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/model-instances/bulk
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/model-instances/bulk:
    post:
      tags:
        - v1
        - protected
        - model-instances
      summary: Create Model Instances Bulk
      description: >-
        Create many model instances in a single request.


        Partial-success semantics: each item is created independently and
        per-item

        failures are returned in `failed` rather than aborting the whole batch.

        Use this from UIs that let users select N models from a discovered list
        to

        avoid N HTTP round-trips.
      operationId: create_model_instances_bulk_v1_model_instances_bulk_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelInstanceBulkCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelInstanceBulkCreateResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ModelInstanceBulkCreateRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ModelInstanceCreate'
          maxItems: 500
          minItems: 1
          title: Items
          type: array
      required:
        - items
      title: ModelInstanceBulkCreateRequest
      type: object
    ModelInstanceBulkCreateResponse:
      properties:
        failed:
          items:
            $ref: '#/components/schemas/ModelInstanceBulkFailure'
          title: Failed
          type: array
        failed_count:
          title: Failed Count
          type: integer
        succeeded:
          items:
            $ref: '#/components/schemas/ModelInstanceResponse'
          title: Succeeded
          type: array
        succeeded_count:
          title: Succeeded Count
          type: integer
      required:
        - succeeded
        - failed
        - succeeded_count
        - failed_count
      title: ModelInstanceBulkCreateResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ModelInstanceCreate:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        is_public:
          default: false
          title: Is Public
          type: boolean
        model_spec_id:
          format: uuid
          title: Model Spec Id
          type: string
        name:
          title: Name
          type: string
        provider_config_id:
          format: uuid
          title: Provider Config Id
          type: string
      required:
        - provider_config_id
        - model_spec_id
        - name
      title: ModelInstanceCreate
      type: object
    ModelInstanceBulkFailure:
      properties:
        error:
          title: Error
          type: string
        index:
          title: Index
          type: integer
        model_spec_id:
          title: Model Spec Id
          type: string
      required:
        - index
        - model_spec_id
        - error
      title: ModelInstanceBulkFailure
      type: object
    ModelInstanceResponse:
      properties:
        config_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Config Name
        created_at:
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          title: Id
          type: string
        is_active:
          title: Is Active
          type: boolean
        is_public:
          title: Is Public
          type: boolean
        model_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Display Name
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
        model_spec_id:
          title: Model Spec Id
          type: string
        name:
          title: Name
          type: string
        provider_config_id:
          title: Provider Config Id
          type: string
        provider_icon_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Icon Url
        provider_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Key
        provider_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Name
        updated_at:
          title: Updated At
          type: string
      required:
        - id
        - provider_config_id
        - model_spec_id
        - name
        - description
        - is_active
        - is_public
        - created_at
        - updated_at
      title: ModelInstanceResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````