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

# Start or resume the upload of one large task, in parts



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/hub/task-uploads
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:
    post:
      tags:
        - Hub
      summary: Start or resume the upload of one large task, in parts
      operationId: hub_start_task_upload
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskUploadStart'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartedTaskUpload'
        '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:
    TaskUploadStart:
      properties:
        name:
          type: string
          maxLength: 400
          pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*(/[A-Za-z0-9][A-Za-z0-9_.-]*)*$
          title: Name
          description: >-
            The task's name under its owner; `/` separates segments, as in
            Harbor's `org/task`
        archive_sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Archive Sha256
          description: sha256 of the `tar.gz` bytes
        content_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Content Hash
          description: sha256 of the manifest of the unpacked files
        task_type:
          type: string
          enum:
            - harbor
          const: harbor
          title: Task Type
          description: The code that sets up, runs and scores the task
          default: harbor
        description:
          anyOf:
            - type: string
              maxLength: 4000
            - type: 'null'
          title: Description
          description: Used only when this creates the task
        labels:
          items:
            type: string
            maxLength: 200
            minLength: 1
            pattern: ^[^\x00-\x1f\x7f]+$
          type: array
          maxItems: 64
          title: Labels
          description: Used only when this creates the task
        owner:
          type: string
          maxLength: 255
          minLength: 1
          title: Owner
          description: Owning user or team slug
        size:
          type: integer
          maximum: 5368709120
          exclusiveMinimum: 0
          title: Size
          description: Archive size in bytes
      additionalProperties: false
      type: object
      required:
        - name
        - archive_sha256
        - content_hash
        - owner
        - size
      title: TaskUploadStart
    StartedTaskUpload:
      properties:
        status:
          type: string
          enum:
            - upload
            - exists
          title: Status
          description: >-
            `exists`: the task already has this content, so there is nothing to
            upload and `version` is the one it has
        version:
          anyOf:
            - $ref: '#/components/schemas/TaskVersion'
            - type: 'null'
        upload_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Upload Id
        part_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Part Size
        parts:
          items:
            $ref: '#/components/schemas/UploadPart'
          type: array
          title: Parts
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
          description: When the upload is abandoned; the links expire sooner
      type: object
      required:
        - status
      title: StartedTaskUpload
    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
    UploadPart:
      properties:
        number:
          type: integer
          title: Number
        size:
          type: integer
          title: Size
          description: Exactly this many bytes go in this part
        url:
          type: string
          title: Url
          description: PUT the part's bytes here
        uploaded:
          type: boolean
          title: Uploaded
          description: Already stored with the right size
      type: object
      required:
        - number
        - size
        - url
        - uploaded
      title: UploadPart
    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

````