Prime Intellect Secrets API

The Secrets API from Prime Intellect — 2 operation(s) for secrets.

OpenAPI Specification

prime-intellect-secrets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Prime Intellect Compute admin-clusters Secrets 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: Secrets
paths:
  /api/v1/secrets/:
    get:
      tags:
      - Secrets
      summary: List Secrets
      description: 'List global secrets for the authenticated user or a team.


        If teamId is provided, returns secrets for that team (requires team membership).

        Otherwise, returns the user''s personal secrets.'
      operationId: list_secrets_api_v1_secrets__get
      security:
      - HTTPBearer: []
      parameters:
      - name: teamId
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by team ID
          title: Teamid
        description: Filter by team ID
      - 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_SecretResponse__'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
      - Secrets
      summary: Create Secret
      description: 'Create a new global secret.


        The secret will be encrypted and stored securely. If teamId is provided,

        the secret will be associated with that team (requires team membership).'
      operationId: create_secret_api_v1_secrets__post
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_SecretResponse_'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/secrets/{secret_id}:
    get:
      tags:
      - Secrets
      summary: Get Secret
      description: 'Get a specific secret by ID.


        Note: The secret value is not returned, only metadata.'
      operationId: get_secret_api_v1_secrets__secret_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: secret_id
        in: path
        required: true
        schema:
          type: string
          title: Secret Id
      - name: teamId
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Team ID for team secrets
          title: Teamid
        description: Team ID for team secrets
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_SecretResponse_'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    patch:
      tags:
      - Secrets
      summary: Update Secret
      description: 'Update an existing secret.


        You can update the name, value, and/or description.'
      operationId: update_secret_api_v1_secrets__secret_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: secret_id
        in: path
        required: true
        schema:
          type: string
          title: Secret Id
      - name: teamId
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Team ID for team secrets
          title: Teamid
        description: Team ID for team secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_SecretResponse_'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - Secrets
      summary: Delete Secret
      description: 'Delete a secret.


        This operation cannot be undone. Secrets that are linked to environments

        will be automatically unlinked.'
      operationId: delete_secret_api_v1_secrets__secret_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: secret_id
        in: path
        required: true
        schema:
          type: string
          title: Secret Id
      - name: teamId
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Team ID for team secrets
          title: Teamid
        description: Team ID for team secrets
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SecretUpdateRequest:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 255
            minLength: 1
            pattern: ^[A-Z][A-Z0-9_]*$
          - type: 'null'
          title: Name
          description: New name for the secret (must start with uppercase, only uppercase, numbers, underscores)
        value:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: Value
          description: New value for the secret
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
          description: New description for the secret
      type: object
      title: SecretUpdateRequest
    GenericResponse_SecretResponse_:
      properties:
        data:
          anyOf:
          - $ref: '#/components/schemas/SecretResponse'
          - type: 'null'
          description: Response data
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[SecretResponse]
    SecretResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the secret
        name:
          type: string
          title: Name
          description: Name of the secret
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Description of the secret
        isFile:
          type: boolean
          title: Isfile
          description: Whether this secret is a file
          default: false
        userId:
          anyOf:
          - type: string
          - type: 'null'
          title: Userid
          description: ID of the owning user
        teamId:
          anyOf:
          - type: string
          - type: 'null'
          title: Teamid
          description: ID of the owning team
        createdAt:
          type: string
          format: date-time
          title: Createdat
          description: When the secret was created
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
          description: When the secret was last updated
      type: object
      required:
      - id
      - name
      - createdAt
      - updatedAt
      title: SecretResponse
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
      - errors
      title: ErrorResponse
    SecretCreateRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          pattern: ^[A-Z][A-Z0-9_]*$
          title: Name
          description: Name of the secret (must start with uppercase, only uppercase, numbers, underscores)
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
          description: Optional description of the secret
        value:
          type: string
          minLength: 1
          title: Value
          description: The secret value to store (will be encrypted)
        teamId:
          anyOf:
          - type: string
          - type: 'null'
          title: Teamid
          description: Optional team ID for team-level secrets
        isFile:
          type: boolean
          title: Isfile
          description: Whether this secret represents a file (max 64KB base64 encoded)
          default: false
      type: object
      required:
      - name
      - value
      title: SecretCreateRequest
    GenericPaginationResponse_List_SecretResponse__:
      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/SecretResponse'
          type: array
          title: Data
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
          description: Response status
      type: object
      required:
      - data
      title: GenericPaginationResponse[List[SecretResponse]]
    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