Prime Intellect user API

The user API from Prime Intellect — 3 operation(s) for user.

OpenAPI Specification

prime-intellect-user-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Prime Intellect Compute admin-clusters user API
  version: 0.1.0
  description: 'GPU compute marketplace and pod orchestration: availability across providers, on-demand and multi-node GPU pod lifecycle, persistent network-attached disks, and SSH key management. Supports H100, H200, B200, B300, and other GPU families with 1-256 GPU configurations.'
  contact:
    name: Prime Intellect
    url: https://www.primeintellect.ai
servers:
- url: https://api.primeintellect.ai
security:
- HTTPBearer: []
tags:
- name: user
paths:
  /api/v1/user/slug:
    patch:
      tags:
      - user
      summary: Set Username Slug
      operationId: set_username_slug_api_v1_user_slug_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSlugUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_User_'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - HTTPBearer: []
  /api/v1/user/teams:
    get:
      tags:
      - user
      summary: List My Teams
      operationId: list_my_teams_api_v1_user_teams_get
      security:
      - HTTPBearer: []
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Offset
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 100
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericPaginationResponse_List_TeamSummary__'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/user/whoami:
    get:
      tags:
      - user
      summary: Get Whoami
      operationId: get_whoami_api_v1_user_whoami_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_WhoamiResponse_'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - HTTPBearer: []
components:
  schemas:
    User:
      properties:
        id:
          type: string
          title: Id
        role:
          $ref: '#/components/schemas/UserRoleEnum'
          default: USER
        createdAt:
          type: string
          format: date-time
          title: Createdat
        name:
          type: string
          title: Name
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        email:
          type: string
          title: Email
        image:
          anyOf:
          - type: string
          - type: 'null'
          title: Image
        emailVerified:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Emailverified
        hasBetaAccess:
          type: boolean
          title: Hasbetaaccess
          default: false
        isBanned:
          type: boolean
          title: Isbanned
          default: false
        skipPrepay:
          type: boolean
          title: Skipprepay
          default: false
        blacklist:
          items:
            type: string
          type: array
          title: Blacklist
          default: []
      type: object
      required:
      - name
      - email
      title: User
    WhoamiResponse:
      properties:
        id:
          type: string
          title: Id
        role:
          $ref: '#/components/schemas/UserRoleEnum'
          default: USER
        createdAt:
          type: string
          format: date-time
          title: Createdat
        name:
          type: string
          title: Name
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        email:
          type: string
          title: Email
        image:
          anyOf:
          - type: string
          - type: 'null'
          title: Image
        emailVerified:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Emailverified
        hasBetaAccess:
          type: boolean
          title: Hasbetaaccess
          default: false
        isBanned:
          type: boolean
          title: Isbanned
          default: false
        skipPrepay:
          type: boolean
          title: Skipprepay
          default: false
        blacklist:
          items:
            type: string
          type: array
          title: Blacklist
          default: []
        scope:
          additionalProperties:
            anyOf:
            - $ref: '#/components/schemas/PermissionType'
            - type: 'null'
          type: object
          title: Scope
          default: {}
      type: object
      required:
      - name
      - email
      title: WhoamiResponse
      description: Extended User response that includes token scope permissions.
    TeamSummary:
      properties:
        teamId:
          type: string
          title: Teamid
        name:
          type: string
          title: Name
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        role:
          $ref: '#/components/schemas/TeamRoleEnum'
        createdAt:
          type: string
          format: date-time
          title: Createdat
      type: object
      required:
      - teamId
      - name
      - role
      - createdAt
      title: TeamSummary
    UserRoleEnum:
      type: string
      enum:
      - ADMIN
      - MANAGER
      - USER
      title: UserRoleEnum
    GenericPaginationResponse_List_TeamSummary__:
      properties:
        total_count:
          type: integer
          title: Total Count
          description: Total number of items available in the dataset
          default: 0
        offset:
          type: integer
          minimum: 0.0
          title: Offset
          description: Number of items to skip before starting to collect the result set
          default: 0
        limit:
          type: integer
          minimum: 0.0
          title: Limit
          description: Maximum number of items to return
          default: 100
        data:
          items:
            $ref: '#/components/schemas/TeamSummary'
          type: array
          title: Data
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
          description: Response status
      type: object
      required:
      - data
      title: GenericPaginationResponse[List[TeamSummary]]
    TeamRoleEnum:
      type: string
      enum:
      - ADMIN
      - MEMBER
      title: TeamRoleEnum
    GenericResponse_WhoamiResponse_:
      properties:
        data:
          anyOf:
          - $ref: '#/components/schemas/WhoamiResponse'
          - type: 'null'
          description: Response data
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[WhoamiResponse]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
      - errors
      title: ErrorResponse
    GenericResponse_User_:
      properties:
        data:
          anyOf:
          - $ref: '#/components/schemas/User'
          - type: 'null'
          description: Response data
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[User]
    PermissionType:
      properties:
        read:
          type: boolean
          title: Read
        write:
          type: boolean
          title: Write
      type: object
      required:
      - read
      - write
      title: PermissionType
    UserSlugUpdateRequest:
      properties:
        slug:
          type: string
          maxLength: 30
          minLength: 3
          pattern: ^[a-z0-9-]+$
          title: Slug
          description: Desired unique username/slug (lowercase, 3-30 chars, a-z, 0-9, -)
      type: object
      required:
      - slug
      title: UserSlugUpdateRequest
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
      - param
      - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer