GET
/
dictionaries
Get Workspace Dictionaries
curl --request GET \
  --url https://client.camb.ai/apis/dictionaries \
  --header 'x-api-key: <api-key>'
[
  {
    "id": 123,
    "name": "<string>",
    "description": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]
Dictionaries can be created and managed either through the CAMB.AI Studio interface or programmatically via the CAMB.AI APIs.

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 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:
{
  "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:
# 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
The /dictionaries endpoint works in conjunction with several other endpoints in the CAMB.AI API ecosystem: This interconnected system provides comprehensive support for terminology management throughout your localization workflow.

Authorizations

x-api-key
string
header
required

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.

Response

Successful Response

id
integer

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
string

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
string | null

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
string<date-time>

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
string<date-time>

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.