> ## 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.

# Complete an upload

> Join the parts into the file. It can then be dubbed.



## OpenAPI

````yaml /openapi.json post /uploads/{upload_id}/complete
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/{upload_id}/complete:
    post:
      tags:
        - Uploads
      summary: Complete an upload
      description: Join the parts into the file. It can then be dubbed.
      operationId: complete_upload_uploads__upload_id__complete_post
      parameters:
        - name: upload_id
          in: path
          required: true
          schema:
            type: string
            title: Upload Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
              example:
                id: job_3f9a2c7e1b4d
                object: upload
                filename: interview.mp4
                size: 734003200
                status: uploaded
                error: null
                part_size: 16777216
                part_count: 44
                parts: []
                parts_expire_at: null
        '401':
          description: The key is missing, wrong or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Nothing with this id belongs to the key's account.
          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'
components:
  schemas:
    CompleteIn:
      properties:
        parts:
          items:
            $ref: '#/components/schemas/UploadedPart'
          type: array
          maxItems: 10000
          minItems: 1
          title: Parts
          description: Every part, once each.
      type: object
      required:
        - parts
      title: CompleteIn
    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
    UploadedPart:
      properties:
        part_number:
          type: integer
          minimum: 1
          title: Part Number
          examples:
            - 1
        etag:
          type: string
          maxLength: 128
          minLength: 1
          title: Etag
          description: The ETag header from that part's PUT response, as sent.
          examples:
            - '"9b2cf535f27731c974343645a3985328"'
      type: object
      required:
        - part_number
        - etag
      title: UploadedPart
    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.