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

# Get all Source Languages

> Retrieves a comprehensive list of all source languages supported by the platform, including their unique identifiers, language names, and corresponding short names.

This endpoint serves as your gateway to the multilingual capabilities of our platform, providing a complete catalog of all languages that can be used as source languages in translation, text-to-speech, and other language processing operations. By querying this endpoint, you'll receive detailed information about each supported language, enabling you to make informed choices when implementing multilingual features in your applications.

## Understanding Source Languages

Source languages represent the starting point in language transformation processes. When you translate content, convert text to speech, or perform other language operations, the source language is the original language of your content. Having accurate information about available source languages is fundamental to ensuring your application correctly processes user input.

## How to Use This Endpoint

To retrieve the list of supported source languages, simply send a `GET` request to this endpoint. No parameters are required, as the response will include all available source languages. The system will respond with an array containing detailed information about each language.

## Understanding Language Identifiers

The language identifiers returned by this endpoint are crucial for other API operations. When you make requests to endpoints like [`/translate`](create-translation), [`/tts`](create-tts), or other language-processing endpoints, you'll need to specify the source language using the `id` value. This creates a consistent system for language identification across the entire API.

Here's how the language identifiers connect different parts of the API ecosystem:

1. **Fetch available languages** using the [`/source-languages`](get-source-languages) endpoint.
2. **Present choices** to your users in a meaningful way using the `language` property.
3. **Submit requests** to other endpoints using the `id` property as the language identifier.

This workflow ensures that your application always uses valid language values that the API can understand and process correctly.

## Relationship with Target Languages

It's important to understand the distinction between source languages (provided by this endpoint) and target languages (provided by the [`/target-languages`](get-target-languages) endpoint):

* **Source languages** are languages that your content starts in.
* **Target languages** are languages that your content can be translated into.

While there is often significant overlap between these sets, they are not always identical. Some languages may be available as source languages but not as target languages, or vice versa. For comprehensive multilingual applications, you should check both endpoints to understand the full range of language transformations available to you.

## Best Practices

When working with the `/source-languages` endpoint, consider these recommendations:

1. **Cache the results**: Since language lists change infrequently, store the response locally and refresh it periodically (e.g., once a day) rather than making a request every time a user interacts with your application.

2. **Sort languages appropriately**: In user interfaces, consider sorting languages alphabetically or by relevance to your user base.

3. **Use appropriate identifiers**: Always use the `id` field when making API requests, rather than the language name or short name.

4. **Provide search functionality**: For applications with many language options, implement search or filtering to help users quickly find their desired language.

5. **Consider language variants**: Be aware that some languages may have multiple variants (e.g., American English vs. British English) that could be listed separately.

By leveraging this endpoint effectively, you can create truly global applications that serve users in their preferred languages, enhancing accessibility and user experience across diverse audiences.


## OpenAPI

````yaml get /source-languages
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /source-languages:
    get:
      tags:
        - Apis
      summary: Get Source Languages
      operationId: get_source_languages_source_languages_get
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguageArray'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    LanguageArray:
      type: array
      items:
        $ref: '#/components/schemas/LanguageItem'
      title: LanguageArray
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LanguageItem:
      properties:
        id:
          type: integer
          title: ID
          description: >-
            The id property represents a unique numerical identifier assigned to
            each language in the system.
        language:
          type: string
          title: Language
          description: >-
            The language property represents the full, human-readable name of a
            language and its associated regional or country variant.
        short_name:
          type: string
          title: Short Name
          description: >-
            The short name is a standardized identifier for each language and
            locale combination, represented in the format of <language
            code>-<country code>.
      type: object
      title: LanguageItem
    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.

````