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

# Create a Dictionary From File

> This endpoint empowers you to build custom pronunciation and terminology dictionaries by uploading structured data files directly into your CAMB.AI workspace.

What makes this file-based approach particularly valuable is its ability to scale dictionary creation efficiently. Rather than manually entering individual terms one by one, you can prepare comprehensive terminology collections offline using tools your team already knows, then upload complete dictionaries in a single operation. This batch approach becomes essential when working with specialized vocabularies, client-specific terminology, or industry jargon that requires precise handling across multiple audio processing tasks.

## When to Use This Endpoint

Dictionary creation from files serves multiple strategic purposes in your content processing workflow. During project initialization phases, you might upload industry-specific glossaries that ensure consistent pronunciation of technical terms throughout your audio processing operations. When onboarding new clients, their existing terminology databases can be quickly transformed into CAMB.AI dictionaries that maintain brand consistency and domain expertise across all subsequent processing tasks.
The file-based approach excels when you're working with collaborative teams where subject matter experts can contribute terminology knowledge without needing direct access to the CAMB.AI platform. Rather than recreating extensive vocabulary collections manually, you can preserve existing organizational knowledge by transforming it into CAMB.AI-compatible formats and uploading it as structured dictionary resources.

## File Format Requirements and Structure

The endpoint accepts both CSV and Excel file formats, providing flexibility for teams that work with different data preparation tools. Understanding the required structure becomes crucial for successful dictionary creation, as the system expects specific column arrangements and data formatting that enable proper term recognition and pronunciation guidance.

<Note>
  Your dictionary file must follow a structured [format](https://storage.googleapis.com/cambai-prod-public/dictionary/sample.xlsx) where each row represents a distinct term or pronunciation rule, and specific columns contain the information necessary for the AI systems to understand how to process that term.
</Note>

## Long-term Dictionary Management Considerations

File-based dictionary creation establishes the foundation for ongoing terminology resource management that evolves with your organizational needs and processing experience. Understanding how initial dictionary creation connects to long-term maintenance workflows helps you make strategic decisions about file organization and content structure that support sustainable terminology management practices.


## OpenAPI

````yaml post /dictionaries/create-from-file
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /dictionaries/create-from-file:
    post:
      tags:
        - Apis
        - Dictionaries
      summary: Create Dictionary From File
      operationId: create_dictionary_from_file_dictionaries_create_from_file_post
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateDictionaryFromFileRequestBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DictionaryCreated'
                description: >-
                  A `201` status code indicates that your dictionary was created
                  successfully and all terminology content from your uploaded
                  file was processed and integrated into the CAMB.AI system.
                  This represents the ideal outcome where file parsing, content
                  validation, and dictionary population all completed without
                  issues, resulting in a fully functional dictionary ready for
                  immediate use across your audio processing tasks.
        '206':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DictionaryCreated'
                description: >-
                  A `206` status code indicates a more complex outcome where the
                  dictionary container was created successfully, but some
                  terminology entries from your uploaded file could not be
                  processed or integrated. This partial success scenario
                  reflects the reality that large terminology collections often
                  contain edge cases or formatting variations that require
                  individual attention, even when the majority of content
                  processes correctly.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateDictionaryFromFileRequestBody:
      properties:
        dictionary_file:
          type: string
          format: binary
          title: Dictionary File
          description: CSV or Excel Sheet Matching the required structure for a dictionary.
        dictionary_name:
          type: string
          maxLength: 100
          title: Dictionary Name
          description: >-
            The name of the dictionary to be created. This is mainly used for
            organizational purposes.
        dictionary_description:
          type: string
          maxLength: 1000
          nullable: true
          title: Dictionary Description
          description: >-
            The description of the dictionary to be created. This is an optional
            field that is used to help you provide some info about your
            dictionaries for better organization.
      type: object
      required:
        - dictionary_file
        - dictionary_name
      title: CreateDictionaryFromFileRequestBody
    DictionaryCreated:
      properties:
        message:
          type: string
          title: Message
          description: >-
            Human-readable feedback that communicates the outcome of the
            dictionary operation with actionable context for your application
            users. This message provides essential information about operation
            success, partial completion scenarios, or guidance for addressing
            any issues that occurred during processing.
        status:
          type: string
          title: Status
          description: >-
            Standardized operation outcome indicator that enables programmatic
            response handling across all dictionary management workflows. This
            status field provides consistent, machine-readable confirmation of
            operation results, allowing your application logic to branch
            appropriately between success scenarios, partial completion cases,
            and error conditions.
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The `x-api-key` is a custom header required for authenticating requests
        to our API. Include this header in your request with the appropriate API
        key value to securely access our endpoints. You can find your API key(s)
        in the 'API' section of our studio website.

````