> ## 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 a release and get links to upload its artifacts



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/hub/packages/{owner}/{name}/releases
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/hub/packages/{owner}/{name}/releases:
    post:
      tags:
        - Hub
      summary: Start a release and get links to upload its artifacts
      operationId: hub_create_release
      parameters:
        - name: owner
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: Owning user or team slug
            title: Owner
          description: Owning user or team slug
        - name: name
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: Package name
            title: Name
          description: Package name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartedRelease'
        '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:
    ReleaseCreate:
      properties:
        version:
          type: string
          maxLength: 255
          minLength: 1
          title: Version
          description: PEP 440; must be new in the package
        artifacts:
          items:
            $ref: '#/components/schemas/ArtifactDeclaration'
          type: array
          maxItems: 2
          minItems: 1
          title: Artifacts
          description: Exactly one `source`, and at most one `wheel`
        metadata:
          type: object
          title: Metadata
          description: >-
            What the release declares about itself, such as `description`,
            `tags` and the `requires_dist` that shows which verifiers API it
            targets
        framework:
          anyOf:
            - type: string
              enum:
                - v0
                - v1
            - type: 'null'
          title: Framework
          description: >-
            The verifiers API it targets, overriding what `metadata` implies;
            omit to go by the verifiers requirement in `metadata`
      additionalProperties: false
      type: object
      required:
        - version
        - artifacts
      title: ReleaseCreate
    StartedRelease:
      properties:
        release_id:
          type: string
          title: Release Id
        version:
          type: string
          title: Version
          description: The version as stored, in PEP 440 normal form
        content_hash:
          type: string
          title: Content Hash
          description: The `source` artifact's sha256
        uploads:
          items:
            $ref: '#/components/schemas/ArtifactUpload'
          type: array
          title: Uploads
      type: object
      required:
        - release_id
        - version
        - content_hash
        - uploads
      title: StartedRelease
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorEnvelope
    ArtifactDeclaration:
      properties:
        type:
          type: string
          enum:
            - source
            - wheel
          title: Type
        filename:
          type: string
          maxLength: 255
          minLength: 1
          title: Filename
        sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Sha256
          description: Lowercase hex digest; finalize re-hashes the upload against it
        size:
          type: integer
          maximum: 10737418240
          minimum: 1
          title: Size
          description: Bytes
      additionalProperties: false
      type: object
      required:
        - type
        - filename
        - sha256
        - size
      title: ArtifactDeclaration
    ArtifactUpload:
      properties:
        type:
          type: string
          enum:
            - source
            - wheel
          title: Type
        filename:
          type: string
          title: Filename
        url:
          type: string
          title: Url
          description: Time-limited link to PUT the bytes to
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
          description: Send these with the PUT
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - type
        - filename
        - url
        - headers
        - expires_at
      title: ArtifactUpload
    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

````