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

# Transcribes audio into the input language.

> Transcribe audio to text in the original language. **Note:** This endpoint requires an audio model (e.g., Whisper) to be available. Check `GET /v1/models` for current model availability.



## OpenAPI

````yaml /en/api-reference/openapi_infercom.yml post /audio/transcriptions
openapi: 3.1.1
info:
  title: Infercom Inference Service API
  description: Infercom Inference Service API Specification
  version: 1.0.0
  termsOfService: https://infercom.ai/terms-of-service
  contact:
    email: support@infercom.ai
    name: Infercom Support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.infercom.ai/v1
security:
  - api_key: []
externalDocs:
  description: Find out more in the official Infercom docs
  url: /en/api-reference/overview
paths:
  /audio/transcriptions:
    post:
      tags:
        - Audio
      summary: Transcribes audio into the input language.
      description: >-
        Transcribe audio to text in the original language. **Note:** This
        endpoint requires an audio model (e.g., Whisper) to be available. Check
        `GET /v1/models` for current model availability.
      operationId: createTranscription
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TranscriptionRequest'
        description: Audio to transcribe and parameters
        required: true
      responses:
        '200':
          description: Successful Response
          headers:
            inference-id:
              $ref: '#/components/headers/InferenceId'
            x-ratelimit-limit-requests:
              $ref: '#/components/headers/RateLimitRequests'
            x-ratelimit-limit-requests-day:
              $ref: '#/components/headers/RateLimitRequestsDay'
            x-ratelimit-remaining-requests:
              $ref: '#/components/headers/RateLimitRemainingRequests'
            x-ratelimit-remaining-requests-day:
              $ref: '#/components/headers/RateLimitRemainingRequestsDay'
            x-ratelimit-reset-requests:
              $ref: '#/components/headers/RateLimitResetRequests'
            x-ratelimit-reset-requests-day:
              $ref: '#/components/headers/RateLimitResetRequestsDay'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TranscriptionResponse'
                  - $ref: '#/components/schemas/TranscriptionStreamResponse'
            text/plain:
              schema:
                type: string
                example: >-
                  It's a sound effect of a bell chiming, specifically a church
                  bell.
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid request body:  - missing property ''model''"'
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
              example:
                error: Model name is required
        '401':
          description: Unauthorized access
          content:
            text/plain:
              schema:
                type: string
                example: unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '410':
          description: Gone - model is no longer available (deprecated or removed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralError'
        '500':
          description: Internal Server Error. Unexpected issue on server side.
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Temporarily Unavailable
          content:
            text/plain:
              schema:
                type: string
                example: Service Temporarily Unavailable
      x-codeSamples:
        - lang: Python
          source: |-
            from openai import OpenAI

            client = OpenAI(
                base_url="https://api.infercom.ai/v1",
                api_key="your-infercom-api-key",
            )

            with open("audio.mp3", "rb") as audio_file:
                transcription = client.audio.transcriptions.create(
                    file=audio_file,
                    model="Whisper-Large-v3",
                )

            print(transcription.text)
        - lang: cURL
          source: |-
            curl -X POST https://api.infercom.ai/v1/audio/transcriptions \
              -H "Authorization: Bearer $INFERCOM_API_KEY" \
              -F file="@audio.mp3" \
              -F model="Whisper-Large-v3"
components:
  schemas:
    TranscriptionRequest:
      type: object
      title: Transcription Request
      description: Transcription request object
      allOf:
        - $ref: '#/components/schemas/TranscriptionTranslationRequestProperties'
      required:
        - model
        - file
      example:
        model: Whisper-Large-v3
        file: (binary audio file, e.g. "sample.wav")
        prompt: Please transcribe carefully, including pauses and hesitations.
        language: es
        response_format: json
        stream: true
        stream_options:
          include_usage: true
    TranscriptionResponse:
      type: object
      title: Transcription Response
      description: Transcription response json object
      additionalProperties: true
      properties:
        text:
          title: text
          description: audio file text transcription
          type: string
      required:
        - text
      example:
        text: >-
          Es un efecto de sonido de una campana sonando, específicamente una
          campana de iglesia.
    TranscriptionStreamResponse:
      type: object
      title: Transcription  Stream Response
      description: streamed chunk of a transcription response returned by the model
      allOf:
        - $ref: '#/components/schemas/TranscriptionTranslationResponseProperties'
      required:
        - choices
        - created
        - id
        - model
        - object
        - system_fingerprint
      examples:
        - choices:
            - delta:
                content: es un sonido
              index: 0
              finish_reason: null
              logprobs: null
          created: 1737642515.3407679
          custom_id: 0
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: MiniMax-M2.7
          object: chat.completion.chunk
          system_fingerprint: fastcoe
        - choices: []
          created: 1737642515.3407679
          custom_id: 0
          id: 15fcaba4-1c4a-48fc-bc6e-05b55ddfb30b
          model: MiniMax-M2.7
          object: chat.completion.chunk
          system_fingerprint: fastcoe
          usage:
            completion_tokens: 100
            completion_tokens_after_first_per_sec: 262.2771255106759
            completion_tokens_after_first_per_sec_first_ten: 266.98193514986144
            completion_tokens_after_first_per_sec_graph: 53.16720674817285
            completion_tokens_per_sec: 217.87260449707574
            end_time: 1737642515.9077535
            is_last_response: true
            prompt_tokens: 43
            start_time: 1737642515.4458635
            time_to_first_token: 0.0844266414642334
            total_latency: 0.4589838186899821
            total_tokens: 143
            total_tokens_per_sec: 311.55782443081836
    SimpleError:
      title: SimpleError
      type: object
      description: other kind of simple schema errors
      properties:
        error:
          title: error
          type: string
          description: error detail.
          nullable: true
      required:
        - error
    GeneralError:
      title: GeneralError
      type: object
      description: other kind of errors
      properties:
        error:
          type: object
          properties:
            code:
              title: code
              type: string
              description: error code
              nullable: true
            message:
              title: message
              type: string
              description: error message
            param:
              title: param
              type: string
              description: error params
              nullable: true
            type:
              title: type
              type: string
              description: error type
      required:
        - error
    TranscriptionTranslationRequestProperties:
      title: Transcription Translation Request Properties
      type: object
      additionalProperties: true
      properties:
        model:
          title: Model
          description: >-
            The model ID to use See available
            [models](/en/models/infercomcloud-models)
          anyOf:
            - type: string
            - enum:
                - Whisper-Large-v3
        file:
          title: file
          description: >-
            The audio file object to transcribe or translate, in one of these
            formats: FLAC, MP3, MP4, MPEG, MPGA, M4A, Ogg, WAV, or WebM format. 
            File size limit is 25MB.
          type: string
          format: binary
        prompt:
          title: prompt
          description: >-
            Optional text prompt provided to influence transcription Translation
            style or vocabulary. Example: “Please transcribe carefully,
            including pauses and hesitations.”
          type: string
          nullable: true
        language:
          title: language
          description: >-
            Optional language of the input audio.  Supplying the input language
            in ISO-639-1 (e.g. en) format will improve accuracy and latency.
          nullable: true
          type: string
          enum:
            - en
            - zh
            - de
            - es
            - ru
            - ko
            - fr
            - ja
            - pt
            - tr
            - pl
            - ca
            - nl
            - ar
            - sv
            - it
            - id
            - hi
            - fi
            - vi
            - he
            - uk
            - el
            - ms
            - cs
            - ro
            - da
            - hu
            - ta
            - 'no'
            - th
            - ur
            - hr
            - bg
            - lt
            - la
            - mi
            - ml
            - cy
            - sk
            - te
            - fa
            - lv
            - bn
            - sr
            - az
            - sl
            - kn
            - et
            - mk
            - br
            - eu
            - is
            - hy
            - ne
            - mn
            - bs
            - kk
            - sq
            - sw
            - gl
            - mr
            - pa
            - si
            - km
            - sn
            - yo
            - so
            - af
            - oc
            - ka
            - be
            - tg
            - sd
            - gu
            - am
            - yi
            - lo
            - uz
            - fo
            - ht
            - ps
            - tk
            - nn
            - mt
            - sa
            - lb
            - my
            - bo
            - tl
            - mg
            - as
            - tt
            - haw
            - ln
            - ha
            - ba
            - jw
            - su
            - yue
        response_format:
          title: response format
          description: Output format JSON or text.
          type: string
          enum:
            - json
            - text
          default: json
        stream:
          title: stream
          description: Enables streaming responses.
          type: boolean
          default: false
        stream_options:
          title: stream options
          description: Optional settings that apply when `stream` is true.
          type: object
          properties:
            include_usage:
              title: include usage
              description: >-
                If true and `stream` is enabled, optional usage metadata will be
                included in the last streamed response event.
              type: boolean
              nullable: true
          nullable: true
    TranscriptionTranslationResponseProperties:
      title: Transcription Translation Response Properties
      type: object
      additionalProperties: true
      properties:
        choices:
          title: Choices
          type: array
          description: A list of transcription or translation choices.
          items:
            $ref: '#/components/schemas/TranscriptionTranslationChunkChoice'
          minItems: 0
          nullable: true
        created:
          title: Created
          type: number
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was
            created.
        id:
          title: Id
          type: string
          description: A unique identifier for the chat completion.
        model:
          title: Model
          description: The model used for the chat completion.
          type: string
        object:
          title: Object
          type: string
          description: The object type, always `chat.completion.chunk`.
          enum:
            - chat.completion.chunk
          const: chat.completion.chunk
        system_fingerprint:
          title: System fingerprint
          type: string
          description: Backend configuration that the model runs with.
        usage:
          $ref: '#/components/schemas/Usage'
    TranscriptionTranslationChunkChoice:
      title: Transcription Translation Chunk Choice
      type: object
      description: >-
        Transcription or translation chunk choice generated by streamed model
        responses.
      additionalProperties: true
      properties:
        delta:
          $ref: '#/components/schemas/TranscriptionTranslationResponseDelta'
        finish_reason:
          title: Finish Reason
          type: string
          description: The reason the model stopped generating tokens
          enum:
            - stop
          nullable: true
        index:
          title: Index
          type: integer
          description: The index of the choice in the list of choices
        logprobs:
          title: Logprobs
          anyOf:
            - $ref: '#/components/schemas/LogProbs'
          description: currently not supported, always null will be returned
          nullable: true
      required:
        - index
        - delta
    Usage:
      title: Usage
      type: object
      description: >-
        Usage metrics for the completion, embeddings,transcription or
        translation request
      additionalProperties: true
      properties:
        acceptance_rate:
          title: Acceptance Rate
          type: number
          description: acceptance rate
        completion_tokens:
          title: Completion Tokens
          type: integer
          description: number of tokens generated in completion
        completion_tokens_after_first_per_sec:
          title: Completion Tokens After First Per Sec
          type: number
          description: completion tokens per second after first token generation
        completion_tokens_after_first_per_sec_first_ten:
          title: Completion Tokens After First Per Sec First Ten
          type: number
          description: completion tokens per second after first token generation first ten
        completion_tokens_after_first_per_sec_graph:
          title: Completion Tokens After First Per Sec Graph
          type: number
          description: completion tokens per second after first token generation
        completion_tokens_per_sec:
          title: Completion Tokens Per Sec
          type: number
          description: completion tokens per second
        end_time:
          title: End Time
          type: number
          description: The Unix timestamp (in seconds) of when the generation finished.
        is_last_response:
          title: Is Last Response
          type: boolean
          description: >-
            whether or not is last response, always true for non streaming
            response
          const: true
        prompt_tokens_details:
          title: Prompt tokens details
          type: object
          description: Extra tokens details
          additionalProperties: true
          properties:
            cached_tokens:
              title: Cached tokens
              description: amount of cached tokens
              type: integer
        prompt_tokens:
          title: Prompt Tokens
          type: integer
          description: number of tokens used in the prompt sent
        start_time:
          title: Start Time
          type: number
          description: The Unix timestamp (in seconds) of when the generation started.
        time_to_first_token:
          title: Time To First Token
          type: number
          description: also TTF, time (in seconds) taken to generate the first token
        time_to_first_token_graph:
          title: Time To First Token Graph
          type: number
          description: time to first token measurement for graphing/monitoring purposes
        stop_reason:
          title: Stop Reason
          type: string
          description: >-
            The reason generation stopped. Values include `stop` (natural end or
            stop sequence), `length` (max_tokens reached), `tool_calls` (model
            invoked a tool).
          nullable: true
        total_latency:
          title: Total Latency
          type: number
          description: total time (in seconds) taken to generate the full generation
        total_tokens:
          title: Total Tokens
          type: integer
          description: prompt tokens + completion tokens
        total_tokens_per_sec:
          title: Total Tokens Per Sec
          type: number
          description: tokens per second including prompt and completion
      nullable: true
      examples:
        - acceptance_rate: 4.058139324188232
          completion_tokens: 350
          completion_tokens_after_first_per_sec: 248.09314856382406
          completion_tokens_after_first_per_sec_first_ten: 249.67922929952655
          completion_tokens_after_first_per_sec_graph: 452.5030493415834
          completion_tokens_per_sec: 238.91966176995348
          end_time: 1737583289.7345645
          is_last_response: true
          prompt_tokens_details:
            cached_tokens: 0
          prompt_tokens: 43
          start_time: 1737583288.264706
          time_to_first_token: 0.06312894821166992
          total_latency: 1.4649275719174653
          total_tokens: 393
          total_tokens_per_sec: 268.27264878740493
        - prompt_tokens: 43
          total_tokens: 393
    TranscriptionTranslationResponseDelta:
      title: Transcription Response Delta
      type: object
      description: >-
        Transcription or translation response delta chunk generated by streamed
        model responses.
      additionalProperties: true
      properties:
        role:
          title: Role
          type: string
          description: The role of the messages author
          enum:
            - assistant
          const: assistant
          nullable: true
        content:
          title: Content
          type: string
          description: The content delta of the transcription or translation.
          nullable: true
      required:
        - content
    LogProbs:
      title: Completion Log Probs
      type: object
      description: Completion Log Probs object
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/LogProbsContent'
      required:
        - content
    LogProbsContent:
      title: Log Probs Content
      additionalProperties: true
      properties:
        bytes:
          title: Bytes
          anyOf:
            - items:
                type: integer
              type: array
          nullable: true
        logprob:
          title: Logprob
          type: number
        token:
          title: Token
          type: string
        top_logprobs:
          $ref: '#/components/schemas/TopLogProbs'
      required:
        - token
        - logprob
        - top_logprobs
    TopLogProbs:
      title: TopLogProbs
      type: object
      additionalProperties: true
      properties:
        bytes:
          title: Bytes
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        logprob:
          title: Logprob
          type: number
        token:
          title: Token
          type: string
      required:
        - token
        - logprob
  headers:
    InferenceId:
      description: >-
        Unique identifier for this inference request, useful for debugging and
        support.
      schema:
        type: string
        example: a0b08d8a-1893-45d6-a0f4-7ad6fdeb5443
    RateLimitRequests:
      description: Maximum requests allowed per minute.
      schema:
        type: integer
        example: 250
    RateLimitRequestsDay:
      description: Maximum requests allowed per day.
      schema:
        type: integer
        example: 50000
    RateLimitRemainingRequests:
      description: Remaining requests in the current minute window.
      schema:
        type: integer
        example: 247
    RateLimitRemainingRequestsDay:
      description: Remaining requests in the current day.
      schema:
        type: integer
        example: 49988
    RateLimitResetRequests:
      description: Unix timestamp when the per-minute limit resets.
      schema:
        type: integer
        example: 1776937132
    RateLimitResetRequestsDay:
      description: Unix timestamp when the daily limit resets.
      schema:
        type: integer
        example: 1777023472
  securitySchemes:
    api_key:
      type: http
      description: Infercom API Key
      scheme: bearer
      bearerFormat: apiKey

````