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

# Check an uploaded task and record it as a version



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/hub/task-uploads/{upload_id}/complete
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/hub/task-uploads/{upload_id}/complete:
    post:
      tags:
        - Hub
      summary: Check an uploaded task and record it as a version
      operationId: hub_complete_task_upload
      parameters:
        - name: upload_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 64
            title: Upload Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskUploadOutcome'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskUploadOutcome:
      properties:
        status:
          type: string
          enum:
            - created
            - exists
            - failed
          title: Status
          description: >-
            `exists`: the task already has this content, and `version` is the
            one it has
        version:
          anyOf:
            - $ref: '#/components/schemas/TaskVersion'
            - type: 'null'
        error:
          anyOf:
            - $ref: '#/components/schemas/ErrorBody'
            - type: 'null'
      type: object
      required:
        - status
      title: TaskUploadOutcome
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorEnvelope
    TaskVersion:
      properties:
        id:
          type: string
          title: Id
        owner:
          type: string
          title: Owner
        name:
          type: string
          title: Name
        version:
          type: integer
          title: Version
          description: Numbered from 1 by the Hub, per task
        task_type:
          type: string
          title: Task Type
        content_hash:
          type: string
          title: Content Hash
        archive_sha256:
          type: string
          title: Archive Sha256
        archive_size:
          type: integer
          title: Archive Size
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - owner
        - name
        - version
        - task_type
        - content_hash
        - archive_sha256
        - archive_size
        - created_at
      title: TaskVersion
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: Stable, machine-readable error code
        message:
          type: string
          title: Message
        details:
          type: object
          title: Details
      type: object
      required:
        - code
        - message
      title: ErrorBody
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````