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

# Turn an uploaded file into an asset



## OpenAPI

````yaml https://api.blon.ai/v1/openapi.json post /uploads/complete
openapi: 3.1.0
info:
  title: Blon API
  version: v1
servers:
  - url: https://api.blon.ai/v1
security: []
paths:
  /uploads/complete:
    post:
      summary: Turn an uploaded file into an asset
      operationId: completeUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadCompleteRequest'
      responses:
        '200':
          description: The asset; the same ticket returns the same asset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadedAsset'
        '400':
          description: '`bad_request`, `invalid_input`, `unknown_parameter`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: '`unauthorized`, `session_not_accepted`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: '`insufficient_credits`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            `forbidden`, `spending_disabled`, `monthly_cap_exceeded`,
            `api_key_spend_limit_exceeded`, `insufficient_scope`,
            `plan_required`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: '`not_found`, `model_not_found`, `workspace_not_found`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '408':
          description: '`request_timeout` (retryable)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: >-
            `conflict`, `idempotency_conflict`, `model_price_unavailable`,
            `job_not_cancelable`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '412':
          description: '`precondition_failed`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '413':
          description: '`payload_too_large`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '415':
          description: '`unsupported_media_type`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: '`input_media_unreadable`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            `queue_full` (retryable), `concurrency_limit` (retryable),
            `rate_limited` (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: '`internal_error` (retryable)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '501':
          description: '`not_implemented`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '502':
          description: '`provider_submission_failed`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: >-
            `provider_capacity_exceeded` (retryable), `provider_unavailable`
            (retryable), `model_disabled` (retryable), `service_unavailable`
            (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearer: []
        - apiKey: []
components:
  schemas:
    UploadCompleteRequest:
      type: object
      properties:
        ticket:
          type: string
          minLength: 1
      required:
        - ticket
      additionalProperties: false
    UploadedAsset:
      type: object
      properties:
        asset_id:
          type: string
        content_type:
          type:
            - string
            - 'null'
        size_bytes:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        media:
          type: object
          properties:
            duration_seconds:
              type:
                - number
                - 'null'
            width:
              anyOf:
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: 'null'
            height:
              anyOf:
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: 'null'
          required:
            - duration_seconds
            - width
            - height
        expires_at:
          type:
            - string
            - 'null'
        request_id:
          type: string
      required:
        - asset_id
        - content_type
        - size_bytes
        - media
        - expires_at
        - request_id
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - bad_request
                - invalid_input
                - unknown_parameter
                - unauthorized
                - session_not_accepted
                - insufficient_credits
                - forbidden
                - spending_disabled
                - monthly_cap_exceeded
                - api_key_spend_limit_exceeded
                - insufficient_scope
                - plan_required
                - not_found
                - model_not_found
                - workspace_not_found
                - request_timeout
                - conflict
                - idempotency_conflict
                - model_price_unavailable
                - job_not_cancelable
                - precondition_failed
                - payload_too_large
                - unsupported_media_type
                - input_media_unreadable
                - queue_full
                - concurrency_limit
                - rate_limited
                - internal_error
                - not_implemented
                - provider_submission_failed
                - provider_capacity_exceeded
                - provider_unavailable
                - model_disabled
                - service_unavailable
            message:
              type: string
            request_id:
              type: string
            retryable:
              type: boolean
            retry_after_seconds:
              type:
                - number
                - 'null'
            details: {}
          required:
            - code
            - message
            - request_id
            - retryable
            - retry_after_seconds
            - details
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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