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

# Speech to text

> Turns speech into text. Compatible with `audio.transcriptions` in the OpenAI SDK. Requires a voice AI key (`sk-voice-…`).



## OpenAPI

````yaml en/openapi/en-openai-api-openapi.yaml POST /v1/audio/transcriptions
openapi: 3.1.0
info:
  title: ER:LC Russia - OpenAI-Compatible API
  version: 1.0.0
  description: >-
    OpenAI-compatible Chat Completions, model listing and retrieval, and speech
    methods for ER:LC Russia. See each method for its supported parameters.
servers:
  - url: https://api.erlcrussia.com
    description: Main server
  - url: https://api.erlcrussia.xyz
    description: Backup server
security: []
tags:
  - name: Audio
  - name: Chat Completions
  - name: Models
paths:
  /v1/audio/transcriptions:
    post:
      tags:
        - Audio
      summary: Speech to text
      description: >-
        Turns speech into text. Compatible with `audio.transcriptions` in the
        OpenAI SDK. Requires a voice AI key (`sk-voice-…`).
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    An audio file in any common format (mp3, mp4, m4a, mpeg,
                    mpga, ogg, wav, webm, flac), up to 25 MB and 120 seconds.
                model:
                  type: string
                  example: whisper-1
                  description: >-
                    Accepted for compatibility; transcription always uses the
                    ER:LC Russia model.
                language:
                  type: string
                  example: ru
                  description: Speech language (ISO-639-1), `ru` by default.
                response_format:
                  type: string
                  enum:
                    - json
                    - text
                  default: json
                  description: >-
                    `json` returns an object with the text, `text` returns plain
                    text.
          audio/*:
            schema:
              type: string
              format: binary
              description: The whole audio file as the request body, any `audio/*` type.
      responses:
        '200':
          description: >-
            The recognized text. The credits charged are in the
            `X-Credits-Charged` header.
          headers:
            X-Credits-Charged:
              schema:
                type: number
              description: AI credits charged.
            x-request-id:
              $ref: '#/components/headers/RequestId'
            openai-processing-ms:
              $ref: '#/components/headers/ProcessingMs'
            x-ratelimit-limit-requests:
              $ref: '#/components/headers/RateLimitRequests'
            x-ratelimit-remaining-requests:
              $ref: '#/components/headers/RateLimitRemainingRequests'
            x-ratelimit-reset-requests:
              $ref: '#/components/headers/RateLimitResetRequests'
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                    example: Как расшифровывается РД?
                  usage:
                    type: object
                    properties:
                      type:
                        type: string
                        example: duration
                      seconds:
                        type: number
                        example: 2.4
              example:
                text: Как расшифровывается РД?
                usage:
                  type: duration
                  seconds: 2.4
            text/plain:
              schema:
                type: string
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid:
                  value:
                    error:
                      message: Unsupported or corrupted audio file
                      type: invalid_request_error
                      param: null
                      code: null
                format:
                  value:
                    error:
                      message: 'Unsupported response_format: use json or text'
                      type: invalid_request_error
                      param: null
                      code: null
        '401':
          description: The key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: >-
                    Incorrect API key provided. Check the key or create a new
                    one in the dashboard.
                  type: invalid_request_error
                  param: null
                  code: invalid_api_key
                  erlc_code: '5008'
        '413':
          description: Audio is longer than 120 seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                duration:
                  value:
                    error:
                      message: Audio exceeds 120 seconds
                      type: invalid_request_error
                      param: null
                      code: null
                size:
                  value:
                    error:
                      message: File exceeds 25 MB
                      type: invalid_request_error
                      param: null
                      code: null
        '415':
          description: Unsupported request format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Expected multipart/form-data or an audio file
                  type: invalid_request_error
                  param: null
                  code: null
        '429':
          description: >-
            Rate limit exceeded (`type: requests`) or AI credits ran out (`type:
            insufficient_quota`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                rate_limit:
                  value:
                    error:
                      message: Rate limit reached. Please slow down and retry later.
                      type: requests
                      param: null
                      code: rate_limit_exceeded
                      erlc_code: '5016'
                insufficient_quota:
                  value:
                    error:
                      message: >-
                        You exceeded your current quota, please check your plan
                        and billing details.
                      type: insufficient_quota
                      param: null
                      code: insufficient_quota
                      erlc_code: '5038'
        '502':
          description: The transcription service did not respond.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Bad Gateway
                  type: server_error
                  param: null
                  code: '5049'
        '503':
          description: The service is temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Audio transcription unavailable
                  type: server_error
                  param: null
                  code: null
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  headers:
    RequestId:
      description: Request ID for support.
      schema:
        type: string
        example: req_8f2c1e9b4a7d4c0e9f1a2b3c4d5e6f70
    ProcessingMs:
      description: Request processing time in milliseconds.
      schema:
        type: integer
        example: 412
    RateLimitRequests:
      description: Request limit in the current window.
      schema:
        type: integer
        example: 120
    RateLimitRemainingRequests:
      description: Requests left in the current window.
      schema:
        type: integer
        example: 119
    RateLimitResetRequests:
      description: Time until the limit resets, for example `1s` or `6m0s`.
      schema:
        type: string
        example: 1s
  schemas:
    ErrorResponse:
      type: object
      description: >-
        An OpenAI-format error. `code` is an OpenAI string code
        (`invalid_api_key`, `model_not_found`, `insufficient_quota`,
        `rate_limit_exceeded`) or `null`. The numeric ER:LC Russia code is in
        `erlc_code`, see [error codes](/en/documentation/error-codes).
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Insufficient AI Credits
            type:
              type: string
              enum:
                - invalid_request_error
                - insufficient_quota
                - requests
                - server_error
              example: insufficient_quota
            param:
              type:
                - string
                - 'null'
              example: null
            code:
              type:
                - string
                - 'null'
              example: insufficient_quota
            erlc_code:
              type: string
              description: ER:LC Russia numeric error code.
              example: '5038'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Passing the authorization token in the Authorization header: Bearer
        <token>.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: erlcrussia-api-ai-key
      description: The key in the erlcrussia-api-ai-key header.

````

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