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

# Complete single-file upload

> Single-file upload **step 3**: register the file after CDN PUT. Requires [`X-Idempotency-Key`](/guides/idempotency). Flow: [Material upload](/guides/assets/material-upload).



## OpenAPI

````yaml /api-reference/openapi.json post /openapi/v1/assets/material/upload/complete
openapi: 3.1.0
info:
  title: VMEG Open API
  description: >-
    Integrate VMEG into your product: translate and dub video or audio,
    synthesize speech, clone voices, translate plain text, and manage API-side
    files. All responses use `{ code, message, data }`; `code === 200` means
    success.
  version: 1.0.0
servers:
  - url: https://api.vmeg.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Media translation
    x-group: Video & audio translate and dub
    description: >-
      Localize uploaded video or audio end-to-end: transcribe speech, translate
      the script, generate AI dubbing (cloned or preset voices), and return new
      dubbed media. Optional subtitles and lip sync. **Async only** — dubbed
      files arrive via [Webhook](/guides/webhooks). This is not plain text
      translation; see [Media translation](/guides/products/media-translation).
  - name: TTS
    x-group: Text to speech (TTS)
    description: >-
      Turn text into natural speech with preset or cloned voices. **Sync**
      returns audio URLs in the HTTP response; **async** delivers results via
      [Webhook](/guides/webhooks). See [Text to
      speech](/guides/products/text-to-speech).
  - name: Voice clone
    x-group: Voice cloning
    description: >-
      Create a reusable voice from a short reference recording. Returns a
      `voiceId` you can pass to TTS or translate-and-dub jobs. See [Voice
      clone](/guides/products/voice-clone).
  - name: Text translation
    x-group: Text translation (text only)
    description: >-
      Translate plain text segments — no audio or video processing. For spoken
      content in media files, use **Video & audio translate and dub** instead.
      See [Text translation](/guides/products/text-translation).
  - name: Task management
    x-group: Task status and history
    description: >-
      List, inspect, or delete jobs created through any product API. Poll `GET
      .../tasks/detail` when you cannot rely on webhooks. Scoped to your **API
      Key**. See [Products overview](/guides/products/overview).
  - name: Assets - Materials
    x-group: Upload files (materials)
    description: >-
      Upload and manage video/audio files used as input for translate-and-dub
      jobs. Flow: finish the full upload (presigned or multipart → register) →
      pass the registered `materialId` to create-async. See [Material
      upload](/guides/assets/material-upload).
  - name: Assets - Voices
    x-group: Voices (presets and clones)
    description: >-
      List preset voices for TTS, or manage voices you cloned. Cloned voices are
      created via **Voice cloning**. See [Voices](/guides/assets/voices).
paths:
  /openapi/v1/assets/material/upload/complete:
    post:
      tags:
        - Assets - Materials
      summary: Complete single-file upload
      description: >-
        Single-file upload **step 3**: register the file after CDN PUT. Requires
        [`X-Idempotency-Key`](/guides/idempotency). Flow: [Material
        upload](/guides/assets/material-upload).
      operationId: materialUploadComplete
      parameters:
        - $ref: '#/components/parameters/IdempotencyKeyRequired'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenApiMaterialUploadCompleteRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenApiMaterialDtoResponse'
components:
  parameters:
    IdempotencyKeyRequired:
      name: X-Idempotency-Key
      in: header
      required: true
      description: >-
        Required on mutating `POST` requests that create tasks or change
        persisted data (max 64 characters). See
        [Idempotency](/guides/idempotency).
      schema:
        type: string
        maxLength: 64
  schemas:
    OpenApiMaterialUploadCompleteRequest:
      type: object
      required:
        - s3Uri
        - fileName
        - materialId
        - fileHash
      properties:
        s3Uri:
          type: string
          description: Upload target S3 URI from gen-upload-url or multipart initiate
        fileName:
          type: string
          description: Original file name including extension
        materialId:
          type: string
          description: >-
            Material ID from presigned upload. See
            [Materials](/guides/assets/materials)
        fileHash:
          type: string
          description: MD5 hash of the uploaded file (must match upload request)
    OpenApiMaterialDtoResponse:
      allOf:
        - $ref: '#/components/schemas/OpenApiResponseBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/OpenApiMaterialDto'
    OpenApiResponseBase:
      type: object
      properties:
        code:
          type: integer
          example: 200
          description: Business code; 200 means success
        message:
          type: string
          example: ''
          description: Human-readable detail when `code` is not success
      required:
        - code
    OpenApiMaterialDto:
      type: object
      properties:
        materialId:
          type: string
          description: Material ID. See [Materials](/guides/assets/materials)
        category:
          type: string
          example: video
          description: Material type
        name:
          type: string
          description: Display file name
        addressUrl:
          type: string
          description: Main file CDN URL
        thumbnailUrl:
          type: string
          description: Thumbnail CDN URL
        audioUrl:
          type: string
          description: Separated audio track CDN URL
        resolution:
          type: string
          example: 1920x1080
          description: Video resolution when applicable (e.g. `1920x1080`)
        mimeType:
          type: string
          description: MIME type of the main file
        fileHash:
          type: string
          description: MD5 hash of the main file
        filesize:
          type: integer
          format: int64
          description: File size in bytes
        duration:
          type: integer
          format: int64
          description: Duration in milliseconds
        createTime:
          type: string
          description: Registration time (ISO 8601)
        updateTime:
          type: string
          description: Last update time (ISO 8601)
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Send your API Key in the **`Authorization`** header (`Bearer
        <api_key>`). See [Authentication](/guides/authentication).

````