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

# Transcribe (Unified Transcription)

> A single endpoint for all transcription needs — URL-based (YouTube, X, Twitch, Kick, TikTok, X Spaces) and file uploads (audio & video). Replaces vid2txt, aud2txt, videofile2txt, and audiofile2txt with automatic source detection.

<Note>
  **Prerequisite:** To ensure a successful request, you must first consult the [Model Selection](/api/v1/utilities/model-selection) endpoint to identify a valid model `slug`, check specific **limits** and **features**.
</Note>

## How it works

Provide exactly **one** of:

* `source_url` — a URL to transcribe (YouTube, X/Twitter, Twitch, Kick, TikTok, or X Spaces)
* `source_file` — an uploaded audio or video file

The endpoint auto-detects the source type and routes the job accordingly. All existing transcription features (timestamps, webhook notifications) are fully supported.

### Supported file formats

| Type  | Formats                             |
| ----- | ----------------------------------- |
| Audio | AAC, MPEG, OGG, WebM                |
| Video | MP4, MPEG, QuickTime, AVI, WMV, OGG |

### Inline results

Set `return_result_in_response: true` to receive the transcription text directly in the API response instead of a download URL. Useful for short content or real-time integrations.

<Info>
  The four legacy endpoints (`vid2txt`, `aud2txt`, `videofile2txt`, `audiofile2txt`) remain fully operational. The unified `/transcribe` endpoint is the recommended path for new integrations.
</Info>


## OpenAPI

````yaml openapi.json POST /api/v1/client/transcribe
openapi: 3.0.0
info:
  title: deAPI REST API
  description: >-
    Decentralized AI inference API for image generation, video processing, audio
    transcription, and more.
  contact:
    name: deAPI Support
    url: https://deapi.ai
    email: support@deapi.ai
  version: 0.0.1
servers:
  - url: https://api.deapi.ai
    description: Production API Server base URL
security:
  - bearerAuth: []
tags:
  - name: Client API
    description: Endpoints for client operations
paths:
  /api/v1/client/transcribe:
    post:
      tags:
        - Client API
      description: >-
        Unified endpoint for requesting audio/video transcription. Accepts
        either a source URL (YouTube, Twitter, Twitch, Kick, TikTok, Twitter
        Spaces) or a file upload (audio/video). The job type is auto-detected
        from the input.
      operationId: requestTranscribe
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
      requestBody:
        description: >-
          Transcription parameters. Provide exactly one of source_url or
          source_file.
        required: true
        content:
          multipart/form-data:
            schema:
              required:
                - include_ts
                - model
              properties:
                source_url:
                  description: >-
                    URL of video/audio to transcribe (YouTube, Twitter/X,
                    Twitch, Kick, TikTok, Twitter Spaces). Mutually exclusive
                    with source_file.
                  type: string
                  example: https://www.youtube.com/watch?v=jNQXAC9IVRw
                source_file:
                  description: >-
                    Audio or video file to transcribe. Supported audio: aac,
                    mpeg, ogg, webm (max 20 MB). Supported video: mp4, mpeg,
                    quicktime, avi, wmv, ogg (max 50 MB). Total request body is
                    capped at 75 MB. Mutually exclusive with source_url.
                  type: string
                  format: binary
                include_ts:
                  description: Should transcription include timestamps
                  type: boolean
                model:
                  description: >-
                    The model to use for transcription. Available models can be
                    retrieved via the GET /api/v1/client/models endpoint.
                  type: string
                  example: WhisperLargeV3
                return_result_in_response:
                  description: >-
                    If true, the result will be returned directly in the
                    response instead of only download url.
                  type: boolean
                  default: false
                  nullable: true
                webhook_url:
                  description: >-
                    Optional HTTPS URL to receive webhook notifications for job
                    status changes.
                  type: string
                  format: uri
                  maxLength: 2048
                  example: https://your-server.com/webhooks/deapi
                  nullable: true
              type: object
      responses:
        '200':
          description: ID of the inference request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobRequestResponseResource'
        '401':
          description: Unauthorized user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/response_error_default'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
      security:
        - bearerAuth: []
components:
  parameters:
    AcceptHeader:
      name: Accept
      in: header
      required: true
      schema:
        type: string
        default: application/json
        enum:
          - application/json
  schemas:
    JobRequestResponseResource:
      properties:
        data:
          description: Information from success endpoint
          properties:
            request_id:
              description: Request Id
              required:
                - request_id
              type: string
              example: c08a339c-73e5-4d67-a4d5-231302fbff9a
          type: object
      type: object
    response_error_default:
      properties:
        data:
          description: Information from success endpoint
          type: object
        message:
          description: Error general message
          type: string
        errors:
          description: Information about errors
          type: array
          items: {}
        statusCode:
          description: Status code
          type: integer
      type: object
    response_error_rate_limit:
      description: Rate limit exceeded response
      properties:
        message:
          description: Error message
          type: string
          example: Too Many Attempts.
      type: object
  responses:
    ValidationError:
      description: >-
        Validation failed. Common errors include: model does not exist, model
        does not support the inference type for this endpoint, or invalid
        request parameters.
      content:
        application/json:
          schema:
            properties:
              message:
                description: General error message
                type: string
                example: The selected model does not support Text To Image.
              errors:
                description: Detailed validation errors by field
                type: object
                example:
                  model:
                    - The selected model does not support Text To Image.
            type: object
    RateLimitExceeded:
      description: >-
        Rate limit exceeded. Check X-RateLimit-Type header to determine if
        minute (RPM) or daily (RPD) limit was hit.
      headers:
        X-RateLimit-Limit:
          description: Maximum requests allowed per minute (RPM)
          schema:
            type: integer
            example: 3
        X-RateLimit-Remaining:
          description: Remaining requests in current minute window
          schema:
            type: integer
            example: 0
        X-RateLimit-Daily-Limit:
          description: Maximum requests allowed per day (RPD)
          schema:
            type: integer
            example: 100
        X-RateLimit-Daily-Remaining:
          description: Remaining requests in current day window
          schema:
            type: integer
            example: 95
        X-RateLimit-Type:
          description: 'Type of rate limit exceeded: "minute" for RPM, "daily" for RPD'
          schema:
            type: string
            enum:
              - minute
              - daily
            example: minute
        Retry-After:
          description: >-
            Seconds until rate limit resets (60 for minute, up to 86400 for
            daily)
          schema:
            type: integer
            example: 60
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/response_error_rate_limit'
  securitySchemes:
    bearerAuth:
      type: http
      bearerFormat: JWT
      scheme: bearer

````