NVIDIA Run:ai Policy API

Policies allow administrators to impose restrictions and set default values for researcher workloads. Restrictions and default values can be placed on CPUs, GPUs, and other resources or entities. For more information, see [Policies](https://run-ai-docs.nvidia.com/saas/platform-management/policies/#introduction).

Operations 25

GET /api/v2/policy List policies #
PATCH /api/v2/policy/trainings Update a training policy. #
PUT /api/v2/policy/trainings Overwrite a training policy. #
GET /api/v2/policy/trainings Get a training policy. #
DELETE /api/v2/policy/trainings Delete a training policy. #
PATCH /api/v2/policy/workspaces Update a workspace policy. #
PUT /api/v2/policy/workspaces Overwrite a workspace policy. #
GET /api/v2/policy/workspaces Get a workspace policy. #
DELETE /api/v2/policy/workspaces Delete a workspace policy. #
PATCH /api/v2/policy/distributed Update a distributed policy. #
PUT /api/v2/policy/distributed Overwrite a distributed policy. #
GET /api/v2/policy/distributed Get a distributed policy. #
DELETE /api/v2/policy/distributed Delete a distributed policy. #
PATCH /api/v2/policy/inferences Update an inference policy. #
PUT /api/v2/policy/inferences Overwrite an inference policy. #
GET /api/v2/policy/inferences Get an inference policy. #
DELETE /api/v2/policy/inferences Delete an inference policy. #
PATCH /api/v2/policy/distributed-inferences Update a distributed inference policy. #
PUT /api/v2/policy/distributed-inferences Overwrite a distributed inference policy. #
GET /api/v2/policy/distributed-inferences Get a distributed inference policy. #
DELETE /api/v2/policy/distributed-inferences Delete a distributed inference policy. #
PATCH /api/v2/policy/nim-services Update NVIDIA NIM service policy. #
PUT /api/v2/policy/nim-services Overwrite NVIDIA NIM service policy. #
GET /api/v2/policy/nim-services Get NVIDIA NIM service policy. #
DELETE /api/v2/policy/nim-services Delete NVIDIA NIM service policy. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/runai-policy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

runai-policy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: latest
  description: '# Introduction


    The NVIDIA Run:ai Control-Plane API reference is a guide that provides an easy-to-use programming interface for adding various tasks to your application, including workload submission, resource management, and administrative operations.


    NVIDIA Run:ai APIs are accessed using *bearer tokens*. To obtain a token, you need to create a **Service account** through the NVIDIA Run:ai user interface.

    To create a service account, in your UI, go to Access → Service Accounts (for organization-level service accounts) or User settings → Access Keys (for user access keys), and create a new one.


    After you have created a new service account, you will need to assign it access rules.

    To assign access rules to the service account, see [Create access rules](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/accessrules#create-or-delete-rules).

    Make sure you assign the correct rules to your service account. Use the [Roles](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/roles) to assign the correct access rules.


    To get your access token, follow the instructions in [Request a token](https://run-ai-docs.nvidia.com/saas/reference/api/rest-auth/#request-an-api-token).

    '
  title: NVIDIA Run:ai Access Keys Policy API
  x-logo:
    url: https://api.redocly.com/registry/raw/runai-xq8/saas/latest/public/runai-logo-api.png
    altText: NVIDIA Run:ai
    href: https://run.ai
  license:
    name: NVIDIA Run:ai
    url: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/
servers:
- url: https://app.run.ai
security:
- bearerAuth: []
tags:
- name: Policy
  description: "Policies allow administrators to impose restrictions and set default values for researcher workloads. \nRestrictions and default values can be placed on CPUs, GPUs, and other resources or entities. \nFor more information, see [Policies](https://run-ai-docs.nvidia.com/saas/platform-management/policies/#introduction).\n"
paths:
  /api/v2/policy:
    get:
      summary: List policies
      description: Retrieve a list of all the applied policies.
      operationId: list_policies
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/WorkloadType'
      - name: scope
        in: query
        required: false
        description: filter by this scope.
        schema:
          type: string
          enum:
          - tenant
          - cluster
          - department
          - project
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/IncludeFallbackPolicies'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/trainings:
    patch:
      summary: Update a training policy.
      description: Use to apply changes to a training policy for a given organizational unit.
      operationId: update_training_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingPolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a training policy.
      description: Use to apply a training policy for a given organizational unit.
      operationId: overwrite_training_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingPolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a training policy.
      description: Retrieve the details of a training policy for a given organizational unit.
      operationId: get_training_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a training policy.
      description: Use to delete a training policy for a given organizational unit.
      operationId: delete_training_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/workspaces:
    patch:
      summary: Update a workspace policy.
      description: Use to apply changes to a workspace policy for a given organizational unit.
      operationId: update_workspace_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a workspace policy.
      description: Ue to apply a workspace policy for a given organizational unit.
      operationId: overwrite_workspace_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a workspace policy.
      description: Retrieve the details of a workspace policy for a given organizational unit.
      operationId: get_workspace_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a workspace policy.
      description: Use to delete a workspace policy for a given organizational unit.
      operationId: delete_workspace_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/distributed:
    patch:
      summary: Update a distributed policy.
      description: Use to apply changes to a distributed policy for a given organizational unit.
      operationId: update_distributed_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedPolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a distributed policy.
      description: Use to apply a distributed policy for a given organizational unit.
      operationId: overwrite_distributed_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedPolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a distributed policy.
      description: Retrieve the details of a distributed policy for a given organizational unit.
      operationId: get_distributed_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a distributed policy.
      description: Use to delete a distributed policy for a given organizational unit.
      operationId: delete_distributed_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/inferences:
    patch:
      summary: Update an inference policy.
      description: Use to apply changes to an inference policy for a given organizational unit.
      operationId: update_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferencePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite an inference policy.
      description: Use to apply an inference policy for a given organizational unit.
      operationId: overwrite_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferencePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get an inference policy.
      description: Retrieve the details of an inference policy for a given organizational unit.
      operationId: get_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an inference policy.
      description: Use to delete an inference policy for a given organizational unit.
      operationId: delete_inference_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/distributed-inferences:
    patch:
      summary: Update a distributed inference policy.
      description: Use to apply changes to a distributed inference policy for a given organizational unit.
      operationId: update_distributed_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedInferencePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedInferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a distributed inference policy.
      description: Use to apply a distributed inference policy for a given organizational unit.
      operationId: overwrite_distributed_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedInferencePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedInferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a distributed inference policy.
      description: Retrieve the details of a distributed inference policy for a given organizational unit.
      operationId: get_distributed_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedInferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a distributed inference policy.
      description: Use to delete a distributed inference policy for a given organizational unit.
      operationId: delete_distributed_inference_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/nim-services:
    patch:
      summary: Update NVIDIA NIM service policy.
      description: Use to apply changes to NVIDIA NIM service policy for a given organizational unit.
      operationId: update_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NimServicePolicyChangeRequest'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NimServicePolicy'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite NVIDIA NIM service policy.
      description: Use to apply NVIDIA NIM service policy for a given organizational unit.
      operationId: overwrite_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NimServicePolicyOverwriteRequest'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NimServicePolicy'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get NVIDIA NIM service policy.
      description: Retrieve the details of NVIDIA NIM service policy for a given organizational unit.
      operationId: get_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NimServicePolicy'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete NVIDIA NIM service policy.
      description: Use to delete NVIDIA NIM service policy for a given organizational unit.
      operationId: delete_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  schemas:
    NumWorkers:
      description: the number of workers that will be allocated for running the workload.
      type:
      - integer
      - 'null'
      minimum: 1
    NimServicePvcFields:
      properties:
        existingPvc:
          description: Verify existing PVC. PVC is assumed to exist when set to `true`. If set to `false`, the PVC will be created, if it does not exist.
          type:
          - boolean
          - 'null'
          default: false
        claimName:
          description: Name for the PVC. Allow referencing it across workloads. If not provided, a name based on the workload name and scope will be auto-generated.
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 63
          example: my-claim
          pattern: .*
        readOnly:
          description: Permit only read access to PVC.
          type:
          - boolean
          - 'null'
          default: false
        claimInfo:
          $ref: '#/components/schemas/ClaimInfo'
      type:
      - object
      - 'null'
    ConfigMapInstance:
      allOf:
      - $ref: '#/components/schemas/StorageInstanceName'
      - $ref: '#/components/schemas/ConfigMap'
      - $ref: '#/components/schemas/ExcludeField'
      type:
      - object
      - 'null'
    PvcsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/PvcRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      type:
      - object
      - 'null'
    AnnotationsDefaults:
      properties:
        instances:
          $ref: '#/components/schemas/Annotations'
      type:
      - object
      - 'null'
    HostPathsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/HostPathRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      type:
      - object
      - 'null'
    CpuMemoryRequest:
      description: The amount of CPU memory to allocate for this workload (1G, 20M, .etc). The workload will receive at least this amount of memory. Note that the workload will not be scheduled unless the system can guarantee this amount of memory to the workload
      type:
      - string
      - 'null'
      pattern: ^([+]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
      example: 20M
    DistributedInferenceLeaderDefaults:
      properties:
        leader:
          description: Defines the pod specification for the leader. Must always be provided, regardless of the number of workers.
          allOf:
          - $ref: '#/components/schemas/DistributedInferenceLeaderWorkerDefaultsV2'
          type:
          - object
          - 'null'
    ClusterIdOptional:
      description: The id of the cluster.
      type:
      - string
      - 'null'
      format: uuid
      minLength: 1
      example: 71f69d83-ba66-4822-adf5-55ce55efd210
    TenantId:
      description: The id of the tenant.
      type: integer
      format: int32
      example: 1001
    WorkspacePolicyDefaultsV2:
      allOf:
      - properties:
          annotations:
            $ref: '#/components/schemas/AnnotationsDefaults'
          args:
            $ref: '#/components/schemas/Args'
          autoDeletionTimeAfterCompletionSeconds:
            $ref: '#/components/schemas/AutoDeletionTimeAfterPreemption'
          backoffLimit:
            $ref: '#/components/schemas/BackoffLimit'
          category:
            $ref: '#/components/schemas/Category'
          command:
            $ref: '#/components/schemas/Command'
          compute:
            properties:
              cpuCoreLimit:
                $ref: '#/components/schemas/CpuCoreLimit'
              cpuCoreRequest:
                $ref: '#/components/schemas/CpuCoreRequest'
              cpuMemoryLimit:
                $ref: '#/components/schemas/CpuMemoryLimit'
              cpuMemoryRequest:
                $ref: '#/components/schemas/CpuMemoryRequest'
              extendedResources:
                $ref: '#/components/schemas/ExtendedResourcesDefaults'
              gpuDevicesRequest:
                $ref: '#/components/schemas/GpuDevicesRequest'
              gpuMemoryLimit:
                $ref: '#/components/schemas/GpuMemoryLimit'
              gpuMemoryRequest:
                $ref: '#/components/schemas/GpuMemoryRequest'
              gpuPortionLimit:
                $ref: '#/components/schemas/GpuPortionLimit'
              gpuPortionRequest:
                $ref: '#/components/schemas/GpuPortionRequest'
              gpuRequestType:
                $ref: '#/components/schemas/GpuRequestType'
              largeShmRequest:
                $ref: '#/components/schemas/LargeShmRequest'
            type:
            - object
            - 'null'
          createHomeDir:
            $ref: '#/components/schemas/CreateHomeDir'
          environmentVariables:
            $ref: '#/components/schemas/EnvironmentVariablesDefaults'
          exposedUrls:
            $ref: '#/components/schemas/ExposedUrlsDefaults'
          image:
            $ref: '#/components/schemas/Image'
          imagePullPolicy:
            $ref: '#/components/schemas/ImagePullPolicy'
          imagePullSecrets:
            $ref: '#

# --- truncated at 32 KB (230 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/runai/refs/heads/main/openapi/runai-policy-api-openapi.yml