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

# Confirm Asset Upload

> Interface description: After the client directly transfers the object storage, callback confirmation is completed, and the final status and access path of the resource are recorded.



## OpenAPI

````yaml /openapi/en/aitoearn.openapi.json post /api/assets/{id}/confirm
openapi: 3.0.1
info:
  title: AiToEarn Open Platform API
  description: >-
    AiToEarn Open Platform API. You can switch between the China and
    international sites for testing. Business success is determined by whether
    the response body has code === 0.
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: China site
  - url: https://aitoearn.ai
    description: International site
security: []
tags:
  - name: AI Services
  - name: AI Services/Video Generation
  - name: AI Services/Image Generation
  - name: Channel Management
  - name: Channel Management/Accounts
  - name: Channel Management/Publishing
  - name: Channel Management/Platforms
  - name: Channel Management/Works
  - name: Channel Management/Account Groups
  - name: Channel Management/Authorization
  - name: Asset Management
  - name: AI Services/Large Language Models
paths:
  /api/assets/{id}/confirm:
    post:
      tags:
        - Asset Management
      summary: Confirm Asset Upload
      description: >-
        Interface description: After the client directly transfers the object
        storage, callback confirmation is completed, and the final status and
        access path of the resource are recorded.
      operationId: AssetsHttpController_confirmUpload
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: >-
            The request has been processed by the service. Business success is
            determined by whether the response body has code === 0.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AssetVo'
                  code:
                    type: integer
                    description: >-
                      Business status code. 0 means success; non-zero means a
                      business error.
                  message:
                    type: string
                    description: Response message.
                  requestId:
                    type: string
                    description: Request ID.
                  timestamp:
                    type: integer
                    description: Error response timestamp in Unix milliseconds.
                required:
                  - code
                  - message
              examples:
                success:
                  summary: Success
                  value:
                    code: 0
                    message: Request succeeded
                    data:
                      id: string
                      userId: string
                      userType: user
                      path: string
                      type: aiImage
                      status: pending
                      mimeType: string
                      createdAt: '2026-07-02T12:00:00.000Z'
                      updatedAt: '2026-07-02T12:00:00.000Z'
                      url: string
                      size: 1
                      filename: string
                validationFailed10002:
                  summary: ValidationFailed (10002)
                  value:
                    code: 10002
                    message: Parameter validation failed
                    data: {}
                    timestamp: 1772099056662
                unauthorized401:
                  summary: Unauthenticated or invalid API Key
                  value:
                    code: 401
                    message: Unauthorized
                    data: {}
                    timestamp: 1772099056662
                assetNotFound12750:
                  summary: AssetNotFound (12750)
                  value:
                    code: 12750
                    message: Resource not found
                    data: {}
                    timestamp: 1772099056662
                assetTooLarge12752:
                  summary: AssetTooLarge (12752)
                  value:
                    code: 12752
                    message: Resources are too large
                    data: {}
                    timestamp: 1772099056662
                assetUploadFailed12751:
                  summary: AssetUploadFailed (12751)
                  value:
                    code: 12751
                    message: Resource upload failed
                    data: {}
                    timestamp: 1772099056662
      deprecated: false
      security:
        - apikey-header-X-Api-Key: []
components:
  schemas:
    AssetVo:
      type: object
      properties:
        id:
          type: string
          description: unique identifier
        userId:
          type: string
          description: User ID
        userType:
          type: string
          enum:
            - user
            - admin
            - system
          description: User type
        path:
          type: string
          description: Resource storage path
        url:
          type: string
          description: Resource URL
        type:
          type: string
          enum:
            - aiImage
            - aiVideo
            - aiCard
            - aiChatImage
            - aideoOutput
            - videoEdit
            - dramaRecap
            - styleTransfer
            - imageEdit
            - subtitle
            - userMedia
            - userFile
            - publishMedia
            - avatar
            - agentSession
            - videoThumbnail
            - googlePlace
            - brandLibrary
            - temp
          description: type identifier
        status:
          type: string
          enum:
            - pending
            - uploaded
            - confirmed
            - failed
          description: business status
        size:
          type: number
          description: Resource size
        mimeType:
          type: string
          description: media type
        filename:
          type: string
          description: file name
        metadata:
          anyOf:
            - type: object
              properties:
                width:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: width
                height:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: high
              required:
                - width
                - height
            - type: object
              properties:
                width:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: width
                height:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: high
                duration:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: duration
                cover:
                  type: string
                  description: cover
                bitrate:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: bitrate
                frameRate:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: Frame rate
            - type: object
              properties:
                duration:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: duration
                bitrate:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: bitrate
                sampleRate:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: Sampling rate
                channels:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: Number of channels
              required:
                - duration
          description: extended metadata
        createdAt:
          type: string
          format: date-time
          description: creation time
        updatedAt:
          type: string
          format: date-time
          description: Update time
      required:
        - id
        - userId
        - userType
        - path
        - type
        - status
        - mimeType
        - createdAt
        - updatedAt
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Need to get API Key from AiToEarn. Click to go to ["API Key Obtaining
        Tutorial"](/en/use/api-key).

````