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

# Convert Amazon video

> Convert an Amazon media HLS URL into an MP4 URL. Costs 1 credit on success, including cached conversion results. Use an idempotency key for retries.



## OpenAPI

````yaml /openapi.json post /videos/convert
openapi: 3.1.0
info:
  title: AMZ Downloader API
  version: 1.0.0
  description: >-
    Extract Amazon product media, inspect asynchronous jobs, and convert Amazon
    HLS video. REST and MCP share customer accounts and credits. Successful
    media retrievals and conversions each cost 1 credit; polling, failures, and
    idempotent replays are free.
servers:
  - url: https://amzdownloader.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Discovery
  - name: Extraction
  - name: Media
  - name: Account
paths:
  /videos/convert:
    post:
      tags:
        - Media
      summary: Convert Amazon video
      description: >-
        Convert an Amazon media HLS URL into an MP4 URL. Costs 1 credit on
        success, including cached conversion results. Use an idempotency key for
        retries.
      operationId: convertVideo
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[!-~]+$
            description: >-
              Reuse for retries of the same request. Replays do not consume
              additional credits.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  maxLength: 4096
                  description: Amazon media HTTPS URL ending in .m3u8.
                country:
                  type: string
                  pattern: ^[A-Za-z]{2}$
                  description: Optional two-letter country code.
              required:
                - url
              additionalProperties: false
      responses:
        '200':
          description: Converted MP4 URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversionResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource unavailable to this account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Idempotency conflict or request still running
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: Job expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Expected application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Amazon extraction could not be completed; reserved credits released
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate or concurrency limit exceeded; retry after the indicated delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Extraction or conversion service failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service unavailable; retry after the indicated delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ConversionResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
        source:
          type: string
        cache:
          type: object
          properties:
            hit:
              type: boolean
          required: []
          additionalProperties: false
        requestId:
          type: string
        billing:
          type: object
          additionalProperties: true
      required:
        - url
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          additionalProperties: false
        requestId:
          type: string
      required:
        - error
        - requestId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Customer API key created in /dashboard/api-keys. Never place keys in
        query strings.

````

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