> ## 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.

# List Dictionaries

> Retrieve all dictionaries available in the workspace associated with your API key.

<Note>Dictionaries can be created and managed either through the [CAMB.AI Studio](https://studio.camb.ai) interface or programmatically via the CAMB.AI APIs.</Note>

## Understanding Terminology Management in Localization

Dictionaries are centralized repositories for terminology management across languages, essential for maintaining consistent terminology in specialized industries and branded materials. CAMB.AI's dictionary system ensures key terms, product names, and industry jargon remain consistent throughout localized content.

Each dictionary in your workspace contains curated terminology pairs defining how specific terms should be translated across target languages, addressing one of localization's key challenges: consistent and accurate specialized vocabulary.

## The Role of Dictionaries in Your Localization Pipeline

Dictionaries enhance your translation workflows by:

1. **Ensuring Terminology Consistency** across all translations regardless of context
2. **Preserving Domain Expertise** by encoding specialized knowledge
3. **Protecting Brand Language** across multiple languages
4. **Streamlining Quality Control** by establishing pre-approved translations

Within CAMB.AI, dictionaries integrate seamlessly with translation workflows, automatically applying terminology rules during content processing.

## Using This Endpoint

To retrieve all dictionaries in your workspace:

```
GET /dictionaries
```

No parameters required. Authentication occurs via your API key.

## Dictionary Management Workflow

Dictionaries can be created, updated, and deleted through either the CAMB.AI Studio interface or directly via REST API calls. Below is an overview of both approaches:

### 1. Via CAMB.AI Studio

1. **Create dictionaries** via Studio, organized by domain or project or by uploading a file that contains your terms and their translations. Refer to this [page](create-dictionary-from-file) for more details.
2. **Add terminology entries** with source terms and approved translations
3. **Retrieve dictionary information** via API or Studio to identify available dictionaries
4. **Apply dictionaries to translations** by referencing their IDs in requests

### 2. Programmatically via API

The CAMB.AI API now exposes endpoints to fully manage dictionaries and their entries. Use these endpoints to build CI/CD pipelines, integrate with custom tools, or automate bulk imports/exports.

## Integrating Dictionaries into Translation Workflows

Apply dictionaries in two primary ways:

### 1. Direct Application in Translation Requests

Specify dictionary IDs when making translation requests:

```json [expandable] theme={null}
{
  "source_language": "1", // English (US)
  "target_language": "54", // Spanish (Spain)
  "text": "The patient's vital signs remained stable throughout the procedure.",
  "dictionaries": [42, 63]  // Apply Medical and Legal dictionaries
}
```

### 2. Dictionary Selection Based on Content Type

Select dictionaries programmatically based on content analysis:

```python [expandable] theme={null}
# Pseudo-code example
def translate_with_appropriate_dictionaries(text, source_lang, target_lang):
    # Get available dictionaries
    dictionaries = requests.get(
        "https://client.camb.ai/apis/dictionaries",
        headers={"x-api-key": API_KEY}
    ).json()['dictionaries']

    # Select dictionaries based on content
    selected_dictionary_ids = []
    if contains_medical_terms(text):
        medical_dict = next((d for d in dictionaries if d['name'] == 'Medical Terminology'), None)
        if medical_dict:
            selected_dictionary_ids.append(medical_dict['id'])

    # Translate with selected dictionaries
    return requests.post(
        "https://client.camb.ai/apis/translate",
        json={
            "source_language": source_lang,
            "target_language": target_lang,
            "text": text,
            "dictionaries": selected_dictionary_ids
        },
        headers={"x-api-key": API_KEY}
    ).json()
```

## Best Practices for Dictionary Management

For effective dictionary implementation:

1. **Maintain Regularly**: Establish review cycles and track updates using the `updated_at` timestamp
2. **Apply Strategically**: Use complementary dictionaries and consider application order when terminologies overlap
3. **Govern Collaboratively**: Establish clear ownership and documentation standards for dictionaries

## Related Endpoints

The `/dictionaries` endpoint works in conjunction with several other endpoints in the CAMB.AI API ecosystem:

<CardGroup cols={2}>
  <Card title="Integration in Translation" icon="languages" href="create-translation" cta="Navigate to Translation Page">
    Apply dictionaries during translation to ensure consistent terminology across languages. Custom dictionaries help maintain brand voice and technical accuracy.
  </Card>

  <Card title="Usage in Dubbing" icon="video" href="end-to-end-dubbing" cta="Head to Dubbing Documentation">
    Use dictionaries when generating dubbed content to ensure specialized terminology is properly voiced in the target language with appropriate pronunciation.
  </Card>

  <Card title="Maintain Consistency in Stories" icon="book-audio" href="create-story" cta="Check Stories Documentation">
    Incorporate dictionaries when creating localized stories to maintain consistent terminology and branding elements across narratives in different languages.
  </Card>

  <Card title="Integration with Text-to-Speech" icon="messages-square" href="create-translated-tts" cta="Learn More">
    Apply dictionaries during the text-to-speech process after translation to ensure specialized terms are properly pronounced in the generated audio output.
  </Card>
</CardGroup>

This interconnected system provides comprehensive support for terminology management throughout your localization workflow.


## OpenAPI

````yaml get /dictionaries
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /dictionaries:
    get:
      tags:
        - Apis
        - Dictionaries
      summary: Get Workspace Dictionaries
      description: Get a list of dictionaries in the workspace.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Dictionary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Dictionary:
      properties:
        id:
          type: integer
          title: Dictionary ID
          description: ' The Dictionary''s Unique Identifier. This integer value serves as the dictionary''s permanent address in the system. Once assigned, this ID never changes - It''s how the system definitively identifies this particular collection of terms.'
        name:
          type: string
          title: Dictionary Name
          description: ' The Dictionary''s Display Name. This string contains the human-readable name that identifies the dictionary to users. Unlike the ID, which is purely functional, the name is designed to be meaningful to people who are choosing which dictionary to work with.'
        description:
          type: string
          nullable: true
          title: Dictionary Description
          description: >-
            Detailed Dictionary Information. This optional field can contain a
            longer explanation of what the dictionary covers, its intended
            audience, or special characteristics that set it apart from other
            dictionaries. The description might explain the scope of terms
            included, the expertise level assumed, or specific domains covered.
        created_at:
          type: string
          format: date-time
          title: Creation Date
          description: >-
            Dictionary Creation Timestamp. This date-time value tells you
            exactly when someone first created this dictionary in the system.
            Understanding creation dates helps you gauge how established a
            dictionary is and can be useful for administrative purposes,
            auditing, or simply satisfying curiosity about a dictionary's
            history. The timestamp includes both date and time information,
            giving you precise historical context.
        updated_at:
          type: string
          format: date-time
          title: Update Date
          description: >-
            Last Modification Timestamp. Perhaps one of the most practically
            useful pieces of metadata, this timestamp shows when someone last
            made changes to the dictionary. This could mean adding new terms,
            modifying existing definitions, updating the dictionary's name or
            description, or any other modification. For applications where
            content freshness matters, this timestamp helps you and your users
            understand how current the dictionary's information might be.
    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.

````