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

# Create an upload

> Start uploading a video or audio file. Send each part with a PUT to its link
(keep each response's ETag), ask for more links with Sign more parts, then call
Complete an upload.



## OpenAPI

````yaml /openapi.json post /uploads
openapi: 3.1.0
info:
  title: Reedapt Dubbing API
  description: >-
    Dub video and audio into other languages in the speaker's own voice.
    Authenticate with `Authorization: Bearer <key>`; make keys in Reedapt under
    Developers.
  version: 1.0.0
servers:
  - url: https://api.reedapt.com/v1
security:
  - apiKey: []
paths:
  /uploads:
    post:
      tags:
        - Uploads
      summary: Create an upload
      description: >-
        Start uploading a video or audio file. Send each part with a PUT to its
        link

        (keep each response's ETag), ask for more links with Sign more parts,
        then call

        Complete an upload.
      operationId: create_upload_uploads_post
      parameters:
        - name: idempotency-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Any unique string, up to 255 characters. Sending the same request
              again with the same key returns the first answer instead of doing
              the work twice. Kept for 24 hours.
            examples:
              - 7c1f6a52-2d4e-4bb1-9e0a-5f3d8c2b1a90
            title: Idempotency-Key
          description: >-
            Any unique string, up to 255 characters. Sending the same request
            again with the same key returns the first answer instead of doing
            the work twice. Kept for 24 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadIn'
            examples:
              In parts:
                value:
                  filename: interview.mp4
                  size: 734003200
              From a link:
                value:
                  source_url: https://example.com/media/interview.mp4
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
              example:
                id: job_3f9a2c7e1b4d
                object: upload
                filename: interview.mp4
                size: 734003200
                status: uploading
                error: null
                part_size: 16777216
                part_count: 44
                parts:
                  - part_number: 1
                    url: https://…
                  - part_number: 2
                    url: https://…
                parts_expire_at: '2026-10-28T09:27:44Z'
        '202':
          description: 'From source_url: we''re downloading the file.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
              example:
                id: job_3f9a2c7e1b4d
                object: upload
                filename: interview.mp4
                size: 0
                status: fetching
                error: null
                part_size: 8388608
                part_count: 0
                parts: []
                parts_expire_at: null
        '401':
          description: The key is missing, wrong or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '409':
          description: The request conflicts with the object's state; the code says which.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '422':
          description: The request is invalid; the code and `fields` say why.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '429':
          description: >-
            Too many requests, or a plan limit was reached. Wait for
            `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: >-
            A dependency is briefly unavailable. Retry after `Retry-After`
            seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    UploadIn:
      properties:
        filename:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Filename
          description: >-
            The file's name, with its extension. With source_url, only if the
            link doesn't end in one.
          examples:
            - interview.mp4
        size:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Size
          description: The file's size in bytes (not with source_url).
          examples:
            - 734003200
        source_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Source Url
          description: >-
            A public http(s) link to the file. We download it ourselves; poll
            the upload until it is `uploaded`.
          examples:
            - https://example.com/media/interview.mp4
      type: object
      title: UploadIn
    Upload:
      properties:
        id:
          type: string
          title: Id
          description: The upload's id. Its dubs are created from it.
          examples:
            - job_3f9a2c7e1b4d
        object:
          type: string
          const: upload
          title: Object
          default: upload
        filename:
          type: string
          title: Filename
          examples:
            - interview.mp4
        size:
          type: integer
          title: Size
          description: In bytes. 0 while a source_url is still downloading.
          examples:
            - 734003200
        status:
          type: string
          enum:
            - uploading
            - fetching
            - uploaded
            - used
            - failed
          title: Status
          description: >-
            `uploading`: waiting for its parts. `fetching`: we're downloading
            source_url. `uploaded`: ready to dub. `used`: already dubbed.
            `failed`: see `error`.
          examples:
            - uploading
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Why a fetch from source_url failed.
        part_size:
          type: integer
          title: Part Size
          description: Every part but the last is exactly this many bytes.
          examples:
            - 16777216
        part_count:
          type: integer
          title: Part Count
          examples:
            - 44
        parts:
          items:
            $ref: '#/components/schemas/PartLink'
          type: array
          title: Parts
          description: Signed links for the first parts. Ask for the rest with /parts.
        parts_expire_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Parts Expire At
          description: When the links in `parts` stop working (15 minutes).
      type: object
      required:
        - id
        - filename
        - size
        - status
        - part_size
        - part_count
      title: Upload
    ErrorBody:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: ErrorBody
    PartLink:
      properties:
        part_number:
          type: integer
          title: Part Number
          description: Counts from 1.
          examples:
            - 1
        url:
          type: string
          title: Url
          description: >-
            PUT this part's bytes here, with no extra headers. Keep the
            response's ETag.
          examples:
            - https://…
      type: object
      required:
        - part_number
        - url
      title: PartLink
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
          description: Stable and machine-readable; branch on this, not on the message.
          examples:
            - UPLOAD_INCOMPLETE
        message:
          type: string
          title: Message
          description: What went wrong and what to do, in plain English.
          examples:
            - Complete the upload before dubbing it.
        request_id:
          type: string
          title: Request Id
          description: Quote it when you contact us about this request.
          examples:
            - req_8f2c1e0a9b7d6c5e4f3a
        fields:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          title: Fields
          description: >-
            On INVALID_REQUEST from validation: each field that is missing or
            invalid.
          examples:
            - - field: target_languages
                message: Field required
      type: object
      required:
        - code
        - message
        - request_id
      title: ErrorDetail
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: '`rk_live_…` or `rk_test_…`, made in Reedapt under Developers.'

````

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