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

# List languages

> Lists the languages available for speech. No API key needed.

Use this to find the `languageId` for [List voices](https://docs.olimi.ai/api-reference/endpoint/speech/list-tts-voices.md) and [Create audio](https://docs.olimi.ai/api-reference/endpoint/speech/create-tts.md). Fetch it once and cache it; languages rarely change.

* **Always send `service=tts`.** Without it you get the speech-to-text languages, which are a different list.
* **Send `limit=100`.** The default page size is 10.
* **No API key needed.** This endpoint is public.

Responses also carry internal fields. Rely only on `id`, `name` and `code`.


## OpenAPI

````yaml get /api/v2/languages/public
openapi: 3.0.1
info:
  title: Customer Management API
  description: API for managing customer lists and customers within those lists
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-eg.olimi.ai
security:
  - bearerAuth: []
paths:
  /api/v2/languages/public:
    get:
      tags:
        - Text to Speech
      summary: List languages
      description: Lists the languages available for speech. No API key needed.
      parameters:
        - name: service
          in: query
          required: true
          description: >-
            Send `tts` to get the languages available for speech. If you leave
            it out, the API returns the speech-to-text languages instead, which
            are a different list.
          schema:
            type: string
            enum:
              - tts
            default: tts
            example: tts
        - name: page
          in: query
          required: false
          description: Page number, starting at `1`. Defaults to `1`.
          schema:
            type: integer
            minimum: 1
        - name: limit
          in: query
          required: false
          description: >-
            Languages per page. Defaults to `10`; send `100` to get them all in
            one call.
          schema:
            type: integer
            minimum: 1
            example: 100
        - name: search
          in: query
          required: false
          description: >-
            Matches languages whose name or code contains the text. Not
            case-sensitive.
          schema:
            type: string
      responses:
        '200':
          description: The languages, sorted by name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicLanguageListResponse'
        '422':
          description: '`service` isn''t a valid value.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security: []
components:
  schemas:
    PublicLanguageListResponse:
      type: object
      properties:
        message:
          type: string
          example: Languages fetched successfully
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/PublicLanguage'
      example:
        message: Languages fetched successfully
        meta:
          totalItems: 9
          itemCount: 9
          itemsPerPage: 100
          totalPages: 1
          currentPage: 1
        data:
          - id: 2cdab2de-310d-59a3-ad68-b85b4526e37b
            name: Arabic - Egyptian
            code: ar-EG
          - id: cd2d9868-1910-40bf-88f7-c490483ac016
            name: Arabic - Emirati
            code: ar-AE
          - id: 0e8f853c-1be2-5e61-868b-5c04eb55938a
            name: Arabic - Saudi
            code: ar-SA
    ValidationError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 422
        message:
          type: array
          items:
            type: string
          description: What went wrong. Human-readable.
          example:
            - name must be shorter than or equal to 100 characters
        error:
          type: string
          example: Unprocessable Entity
    PaginationMeta:
      type: object
      properties:
        totalItems:
          type: integer
          description: Total items across all pages.
          example: 12
        itemCount:
          type: integer
          description: Items on this page.
          example: 10
        itemsPerPage:
          type: integer
          description: The `limit` used.
          example: 10
        totalPages:
          type: integer
          description: Number of pages.
          example: 2
        currentPage:
          type: integer
          description: The `page` returned.
          example: 1
    PublicLanguage:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Send this as `languageId`.
          example: 2cdab2de-310d-59a3-ad68-b85b4526e37b
        name:
          type: string
          description: The language's display name.
          example: Arabic - Egyptian
        code:
          type: string
          description: The language code.
          example: ar-EG
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.