DeepInfra Audio API

The Audio API from DeepInfra — 3 operation(s) for audio.

Operations 6

POST /v1/audio/speech Openai Audio Speech #
POST /v1/audio/transcriptions Openai Audio Transcriptions #
POST /v1/audio/translations Openai Audio Translations #
POST /audio/transcriptions Transcribe audio to text (Whisper) #
POST /audio/translations Translate audio into English text #
POST /audio/speech Synthesize text to speech #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/deepinfra:deepinfra-audio-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

deepinfra-audio-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Deepinfra Audio API
  version: 1.0.0
  description: 'Operations tagged Audio across 2 of this provider''s published API definitions: deepinfra-openapi.json, deepinfra-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.deepinfra.com
- url: https://api.deepinfra.com/v1/openai
  description: OpenAI-compatible base URL
tags:
- name: Audio
  description: OpenAI-compatible speech synthesis, transcription, and translation.
paths:
  /v1/audio/speech:
    post:
      tags:
      - Audio
      summary: Openai Audio Speech
      operationId: openai_audio_speech_v1_audio_speech_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-deepinfra-source
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Deepinfra-Source
      - name: xi-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Xi-Api-Key
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenAITextToSpeechIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: https://api.deepinfra.com
  /v1/audio/transcriptions:
    post:
      tags:
      - Audio
      summary: Openai Audio Transcriptions
      operationId: openai_audio_transcriptions_v1_audio_transcriptions_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-deepinfra-source
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Deepinfra-Source
      - name: xi-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Xi-Api-Key
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_openai_audio_transcriptions_v1_audio_transcriptions_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: https://api.deepinfra.com
  /v1/audio/translations:
    post:
      tags:
      - Audio
      summary: Openai Audio Translations
      operationId: openai_audio_translations_v1_audio_translations_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-deepinfra-source
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Deepinfra-Source
      - name: xi-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Xi-Api-Key
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_openai_audio_translations_v1_audio_translations_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: https://api.deepinfra.com
  /audio/transcriptions:
    post:
      tags:
      - Audio
      summary: Transcribe audio to text (Whisper)
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              - model
              properties:
                file:
                  type: string
                  format: binary
                model:
                  type: string
                language:
                  type: string
                prompt:
                  type: string
                response_format:
                  type: string
                  enum:
                  - json
                  - text
                  - srt
                  - verbose_json
                  - vtt
                temperature:
                  type: number
      responses:
        '200':
          description: Transcription
          content:
            application/json:
              schema:
                type: object
      security:
      - bearerAuth: []
      operationId: postAudioTranscriptions
      x-operation-id-source: derived
    servers:
    - url: https://api.deepinfra.com/v1/openai
      description: OpenAI-compatible base URL
    - url: https://api.deepinfra.com
      description: DeepInfra native base URL
  /audio/translations:
    post:
      tags:
      - Audio
      summary: Translate audio into English text
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              - model
              properties:
                file:
                  type: string
                  format: binary
                model:
                  type: string
                prompt:
                  type: string
                response_format:
                  type: string
                temperature:
                  type: number
      responses:
        '200':
          description: Translation
          content:
            application/json:
              schema:
                type: object
      security:
      - bearerAuth: []
      operationId: postAudioTranslations
      x-operation-id-source: derived
    servers:
    - url: https://api.deepinfra.com/v1/openai
      description: OpenAI-compatible base URL
    - url: https://api.deepinfra.com
      description: DeepInfra native base URL
  /audio/speech:
    post:
      tags:
      - Audio
      summary: Synthesize text to speech
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - model
              - input
              properties:
                model:
                  type: string
                input:
                  type: string
                voice:
                  type: string
                response_format:
                  type: string
                  enum:
                  - mp3
                  - opus
                  - aac
                  - flac
                  - wav
                  - pcm
                speed:
                  type: number
      responses:
        '200':
          description: Audio bytes
          content:
            audio/mpeg: {}
            audio/wav: {}
      security:
      - bearerAuth: []
      operationId: postAudioSpeech
      x-operation-id-source: derived
    servers:
    - url: https://api.deepinfra.com/v1/openai
      description: OpenAI-compatible base URL
    - url: https://api.deepinfra.com
      description: DeepInfra native base URL
components:
  schemas:
    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
    Body_openai_audio_translations_v1_audio_translations_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        model:
          type: string
          title: Model
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        response_format:
          anyOf:
          - type: string
            enum:
            - json
            - verbose_json
            - text
            - srt
            - vtt
          - type: 'null'
          title: Response Format
          default: json
        temperature:
          anyOf:
          - type: number
          - type: 'null'
          title: Temperature
          default: 0
        service_tier:
          anyOf:
          - type: string
          - type: 'null'
          title: Service Tier
      type: object
      required:
      - file
      - model
      title: Body_openai_audio_translations_v1_audio_translations_post
    Body_openai_audio_transcriptions_v1_audio_transcriptions_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        model:
          type: string
          title: Model
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        response_format:
          anyOf:
          - type: string
            enum:
            - json
            - verbose_json
            - text
            - srt
            - vtt
          - type: 'null'
          title: Response Format
          default: json
        temperature:
          anyOf:
          - type: number
          - type: 'null'
          title: Temperature
          default: 0
        timestamp_granularities:
          anyOf:
          - items:
              type: string
              enum:
              - segment
              - word
            type: array
          - type: 'null'
          title: Timestamp Granularities
        service_tier:
          anyOf:
          - type: string
          - type: 'null'
          title: Service Tier
      type: object
      required:
      - file
      - model
      title: Body_openai_audio_transcriptions_v1_audio_transcriptions_post
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OpenAITextToSpeechIn:
      properties:
        service_tier:
          anyOf:
          - $ref: '#/components/schemas/ServiceTier'
          - type: 'null'
          description: The service tier used for processing the request. 'priority' processes the request with higher priority (premium rate); 'flex' processes it at lower priority for a discount, served only when spare capacity exists and may be retried/timed out under load. Both apply only to models that support the respective tier. For compatibility, 'auto' is treated as 'priority' and 'standard_only' as 'default'.
        fail_fast:
          type: boolean
          title: Fail Fast
          description: If true, the request is rejected immediately with HTTP 429 when the model has no spare capacity, instead of waiting in the queue. Opt-in; the default (false) keeps standard queueing behavior.
          default: false
        model:
          type: string
          title: Model
          description: model name
          examples:
          - deepinfra/tts
        input:
          type: string
          title: Input
          description: Text to convert to speech
          examples:
          - 'I''m beginnin'' to feel like a Rap God, Rap God

            All my people from the front to the back nod, back nod

            Now, who thinks their arms are long enough to slap box, slap box?

            They said I rap like a robot, so call me Rap-bot'
        voice:
          anyOf:
          - type: string
          - type: 'null'
          title: Voice
          description: Preset voices to use for the speech.
        response_format:
          $ref: '#/components/schemas/TtsResponseFormat'
          description: response format for the speech
        speed:
          type: number
          maximum: 4.0
          minimum: 0.25
          title: Speed
          description: speed of the speech
          default: 1.0
        extra_body:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Extra Body
          description: Extra body parameters for the model.
      type: object
      required:
      - model
      - input
      title: OpenAITextToSpeechIn
    TtsResponseFormat:
      type: string
      enum:
      - mp3
      - opus
      - flac
      - wav
      - pcm
      title: TtsResponseFormat
      description: Select the desired format for the speech output. Supported formats include mp3, opus, flac, wav, and pcm.
      default: wav
      examples:
      - mp3
      - opus
      - flac
      - wav
      - pcm
    ServiceTier:
      type: string
      enum:
      - default
      - priority
      - flex
      title: ServiceTier
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    bearerAuth:
      type: http
      scheme: bearer
      description: DeepInfra API token (DEEPINFRA_TOKEN) sent as a Bearer token.
x-refined-from:
- deepinfra-openapi.json
- deepinfra-openapi.yml