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

# Add Item

> Add an item to a collection.

The file runs on the collection's provider. Returns the provider-side
ids of the indexed items (one image can yield several, e.g. faces).



## OpenAPI

````yaml https://api.edenai.run/v3/docs/openapi.json post /v3/universal-ai/collections/{collection_id}/items
openapi: 3.1.0
info:
  title: Eden AI API V3
  version: 3.0.0
servers:
  - url: https://api.edenai.run
    description: Production server
security: []
paths:
  /v3/universal-ai/collections/{collection_id}/items:
    post:
      tags:
        - collections
      summary: Add Item
      description: |-
        Add an item to a collection.

        The file runs on the collection's provider. Returns the provider-side
        ids of the indexed items (one image can yield several, e.g. faces).
      operationId: add_item_v3_universal_ai_collections__collection_id__items_post
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddItemRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - AuthBearer: []
components:
  schemas:
    AddItemRequest:
      properties:
        file:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: File
          description: >-
            File to add, as a file id from /v3/upload or a URL. Accepted MIME
            types depend on the collection's subfeature (images for
            image/face_recognition).
      type: object
      required:
        - file
      title: AddItemRequest
      description: Body for adding an item to a collection.
    ItemsResponse:
      properties:
        collection_id:
          type: string
          format: uuid
          title: Collection Id
        item_ids:
          items:
            type: string
          type: array
          title: Item Ids
          description: Provider-side item ids (face ids for image/face_recognition).
      type: object
      required:
        - collection_id
        - item_ids
      title: ItemsResponse
      description: Item ids stored in a collection (provider-side ids, passed through).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    AuthBearer:
      type: http
      scheme: bearer

````