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

# Create Collection

> Create a new collection to organize videos

Collections organize your media files and provide a scope for search and other operations.

<CodeGroup>
  ```python Python theme={null}
  import videodb

  conn = videodb.connect(api_key="your_api_key")
  coll = conn.create_collection(
      name="Product Demos",
      description="Demo videos for Q1 2024"
  )
  print(f"Created collection: {coll.id}")
  ```

  ```javascript Node.js theme={null}
  import { connect } from 'videodb';

  const conn = connect({ apiKey: 'your_api_key' });
  const coll = await conn.createCollection(
      'Product Demos',
      'Demo videos for Q1 2024'
  );
  console.log(`Created collection: ${coll.id}`);
  ```
</CodeGroup>

<Note>
  * Collection IDs have a `c-` prefix (e.g., `c-a1b2c3d4`)
  * Use `is_public=True` to make collections accessible via ID without authentication
  * Each account has a "default" collection created automatically
</Note>

<CardGroup cols={2}>
  <Card title="Collection Management Guide" icon="book" href="/pages/ingest/files-and-collections/create-collection">
    Complete guide to creating and managing collections
  </Card>

  <Card title="Upload Media" icon="upload" href="/api-reference/collections/upload_to_collection">
    Add videos, audio, or images to your collection
  </Card>
</CardGroup>


## OpenAPI

````yaml POST /collection
openapi: 3.0.3
info:
  title: VideoDB Server API
  description: >
    VideoDB Server API for video, audio, and image processing with AI
    capabilities.

    This API provides comprehensive video management, search, indexing, and
    AI-powered features.
  version: 1.0.0
  contact:
    name: VideoDB Support
    url: https://videodb.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.videodb.io
    description: Production server
  - url: https://staging-api.videodb.io
    description: Staging server
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: User authentication and API key management
  - name: Collections
    description: Collection management operations
  - name: Videos
    description: Video upload, processing, and management
  - name: Audio
    description: Audio management operations
  - name: Images
    description: Image management operations
  - name: Search
    description: Content search and indexing
  - name: AI Generation
    description: AI-powered content generation
  - name: Billing
    description: Billing and usage management
  - name: RTStream
    description: Real-time streaming operations
  - name: Utilities
    description: Utility endpoints
  - name: Meeting
    description: Meeting recording and management
  - name: Capture
    description: Capture session management for recording streams
  - name: Editor
    description: Timeline editor operations
  - name: Transcode
    description: Media transcoding operations
  - name: Assets
    description: Cross-collection asset listing
paths:
  /collection:
    post:
      summary: Create new collection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: My New Collection
                description:
                  type: string
                  example: Collection for my videos
                is_public:
                  type: boolean
                  example: false
      responses:
        '200':
          description: Collection created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Collection'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Collection:
      type: object
      properties:
        id:
          type: string
          example: default
        name:
          type: string
          example: My Collection
        description:
          type: string
          example: Collection description
        is_public:
          type: boolean
          example: false
        owner:
          type: string
          example: u-12345
        created_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: API key for authentication (sk-xxx format)

````