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

# Translate audio

> 

Use a compatible Hicap model ID in the request body. Azure deployment IDs and api-version are not part of this route. Supported optional parameters depend on the model.

> [!NOTE]
>
> Choose an exact compatible ID from [the model list](https://docs.hicap.ai/api-reference/models.md). Supported parameters and output formats vary by model and connection; this schema does not guarantee every upstream feature. See [endpoint availability](https://docs.hicap.ai/api-reference/introduction.md#endpoint-availability).


## OpenAPI

````yaml post /audio/translations
openapi: 3.1.0
info:
  title: Hicap API
  description: >-
    OpenAI-compatible request reference. Authenticate using the api-key header.
    Listed paths and request shapes do not guarantee support for every model,
    connection, backend, or parameter; see
    https://docs.hicap.ai/api-reference/introduction.
  version: 1.0.0
  contact:
    name: Hicap Support
    email: support@hicap.ai
servers:
  - url: https://api.hicap.ai/v1
security:
  - apiKeyAuth: []
paths:
  /audio/translations:
    post:
      summary: Transcribes and translates input audio into English text.
      description: >-


        Use a compatible Hicap model ID in the request body. Azure deployment
        IDs and api-version are not part of this route. Supported optional
        parameters depend on the model.
      operationId: Translations_Create
      parameters:
        - name: x-hicap-tags
          in: header
          required: false
          description: >-
            One JSON object mapping dimension keys to short string values. Never
            include secrets or direct personal identifiers. Opaque identity
            references require approved policy and verified destination
            handling; see the identity attribution guide.
          schema:
            type: string
          example: '{"feature":"support","env":"production"}'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/createTranslationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/audioResponse'
                  - $ref: '#/components/schemas/audioVerboseResponse'
            text/plain:
              schema:
                type: string
                description: >-
                  Transcribed text in the output format (when response_format
                  was one of text, vtt or srt).
        default:
          description: >-
            Gateway or backend error. Body shape varies; inspect HTTP status
            before parsing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  message:
                    type: string
                  error:
                    type: object
                    additionalProperties: true
                additionalProperties: true
components:
  schemas:
    createTranslationRequest:
      type: object
      description: Translation request.
      properties:
        file:
          type: string
          description: The audio file to translate.
          format: binary
        prompt:
          type: string
          description: >-
            An optional text to guide the model's style or continue a previous
            audio segment. The prompt should be in English.
        response_format:
          $ref: '#/components/schemas/audioResponseFormat'
        temperature:
          type: number
          default: 0
          description: >-
            The sampling temperature, between 0 and 1. Higher values like 0.8
            will make the output more random, while lower values like 0.2 will
            make it more focused and deterministic. If set to 0, the model will
            use log probability to automatically increase the temperature until
            certain thresholds are hit.
        model:
          type: string
          minLength: 1
          description: Exact compatible Hicap model ID from GET /v1/models.
      required:
        - file
        - model
    audioResponse:
      description: Translation or transcription response when response_format was json
      type: object
      properties:
        text:
          type: string
          description: Translated or transcribed text.
      required:
        - text
    audioVerboseResponse:
      description: >-
        Translation or transcription response when response_format was
        verbose_json
      type: object
      allOf:
        - $ref: '#/components/schemas/audioResponse'
        - properties:
            task:
              type: string
              description: Type of audio task.
              enum:
                - transcribe
                - translate
              x-ms-enum:
                modelAsString: true
            language:
              type: string
              description: Language.
            duration:
              type: number
              description: Duration.
            segments:
              type: array
              items:
                $ref: '#/components/schemas/audioSegment'
            words:
              type: array
              items:
                $ref: '#/components/schemas/audioWord'
      required:
        - text
    audioResponseFormat:
      title: AudioResponseFormat
      description: Defines the format of the output.
      enum:
        - json
        - text
        - srt
        - verbose_json
        - vtt
      type: string
      x-ms-enum:
        modelAsString: true
    audioSegment:
      type: object
      description: Transcription or translation segment.
      properties:
        id:
          type: integer
          description: Segment identifier.
        seek:
          type: number
          description: Offset of the segment.
        start:
          type: number
          description: Segment start offset.
        end:
          type: number
          description: Segment end offset.
        text:
          type: string
          description: Segment text.
        tokens:
          type: array
          items:
            type: number
            nullable: false
          description: Tokens of the text.
        temperature:
          type: number
          description: Temperature.
        avg_logprob:
          type: number
          description: Average log probability.
        compression_ratio:
          type: number
          description: Compression ratio.
        no_speech_prob:
          type: number
          description: Probability of 'no speech'.
    audioWord:
      type: object
      description: Transcription or translation word.
      properties:
        word:
          type: string
          description: Word
        start:
          type: number
          description: Word start offset.
        end:
          type: number
          description: Word end offset.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: Your Hicap API key.

````

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