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

# Mint a short-lived Kubernetes credential for a granted cluster



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/clusters/{cluster_name}/kube-token
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/clusters/{cluster_name}/kube-token:
    post:
      tags:
        - clusters
      summary: Mint a short-lived Kubernetes credential for a granted cluster
      operationId: mint_kube_token_api_v1_clusters__cluster_name__kube_token_post
      parameters:
        - name: cluster_name
          in: path
          required: true
          schema:
            type: string
            title: Cluster Name
        - name: pool
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Pool to mint for. Only needed when you hold grants on more than
              one pool of this cluster.
            title: Pool
          description: >-
            Pool to mint for. Only needed when you hold grants on more than one
            pool of this cluster.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecCredential'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    ExecCredential:
      properties:
        apiVersion:
          type: string
          title: Apiversion
          default: client.authentication.k8s.io/v1
        kind:
          type: string
          title: Kind
          default: ExecCredential
        status:
          type: object
          title: Status
      type: object
      required:
        - status
      title: ExecCredential
      description: |-
        client.authentication.k8s.io/v1 ExecCredential — the exact shape
        kubectl expects back from a credential plugin on stdout.
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    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

````