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

# Transcode

> Convert video to a different format or codec

<RequestExample>
  ```json Example Request theme={null}
  {
    "input": "https://example.com/video.mp4",
    "format": "mp4",
    "codec": "h264",
    "resolution": "720p",
    "bitrate": "",
    "crf": 0
  }
  ```

  ```bash File Upload theme={null}
  curl -X POST https://api.ringbee.dev/v1/video/transcode \
    -H "X-API-Key: YOUR_API_KEY" \
    -F "file=@video.mp4" \
    -F "format=mp4" \
    -F "codec=h264" \
    -F "resolution=720p"
  ```
</RequestExample>

| Param      | Type    | Description                                         |
| ---------- | ------- | --------------------------------------------------- |
| format     | string  | Output format: mp4, webm, mkv, avi                  |
| codec      | string  | Video codec: h264, h265, vp9, av1                   |
| resolution | string  | Target resolution: 480p, 720p, 1080p, 4k            |
| bitrate    | string  | Target bitrate (e.g., "2M")                         |
| crf        | integer | Constant rate factor (0-51, lower = better quality) |


## OpenAPI

````yaml POST /v1/video/transcode
openapi: 3.0.3
info:
  title: MediAPI
  description: >-
    Media processing API — video, audio, image, and document transformations via
    simple REST calls.
  version: 1.0.0
servers:
  - url: https://api.ringbee.dev
    description: Production
security:
  - apiKey: []
paths:
  /v1/video/transcode:
    post:
      tags:
        - Video
      summary: Transcode
      description: Convert video to a different format or codec
      operationId: videoTranscode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - input
              properties:
                input:
                  type: string
                  description: Input file URL
                format:
                  type: string
                  description: 'Output format: mp4, webm, mkv, avi'
                codec:
                  type: string
                  description: 'Video codec: h264, h265, vp9, av1'
                resolution:
                  type: string
                  description: 'Target resolution: 480p, 720p, 1080p, 4k'
                bitrate:
                  type: string
                  description: Target bitrate (e.g., "2M")
                crf:
                  type: integer
                  description: Constant rate factor (0-51, lower = better quality)
                webhook_url:
                  type: string
                  description: URL to receive job completion notification
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: Upload file directly
                format:
                  type: string
                  description: 'Output format: mp4, webm, mkv, avi'
                codec:
                  type: string
                  description: 'Video codec: h264, h265, vp9, av1'
                resolution:
                  type: string
                  description: 'Target resolution: 480p, 720p, 1080p, 4k'
                bitrate:
                  type: string
                  description: Target bitrate (e.g., "2M")
                crf:
                  type: integer
                  description: Constant rate factor (0-51, lower = better quality)
                webhook_url:
                  type: string
                  description: URL to receive job completion notification
      responses:
        '202':
          description: Job accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Usage limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    JobResponse:
      type: object
      properties:
        id:
          type: string
          example: job_abc123
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - cancelled
          example: pending
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````