# Workloads V2

The Workloads V2 API allows you to create, retrieve, and delete workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystem. These workloads are registered in the platform through the Workload Types API, some are already registered in NVIDIA Run:ai, while others can be added by administrators. Each submission combines the user's Kubernetes manifest with NVIDIA Run:ai scheduling metadata, enabling consistent orchestration, monitoring, and governance. See [Extending workload support](https://run-ai-docs.nvidia.com/self-hosted/2.24/workloads-in-nvidia-run-ai/workload-types/extending-workload-support) for more details.

## Create a workload. \[Experimental]

> Submit a workload with metadata and a Kubernetes manifest.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Workloads V2","description":"The Workloads V2 API allows you to create, retrieve, and delete workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystem. These workloads are registered in the platform through the Workload Types API, some are already registered in NVIDIA Run:ai, while others can be added by administrators.\nEach submission combines the user's Kubernetes manifest with NVIDIA Run:ai scheduling metadata, enabling consistent orchestration, monitoring, and governance. See [Extending workload support](https://run-ai-docs.nvidia.com/self-hosted/2.24/workloads-in-nvidia-run-ai/workload-types/extending-workload-support) for more details.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DryRun":{"name":"dryRun","in":"query","required":false,"description":"True to perform validations only, without side effects.","schema":{"type":"boolean","default":false}}},"schemas":{"WorkloadV2CreateRequest":{"type":"object","required":["metadata"],"properties":{"metadata":{"$ref":"#/components/schemas/WorkloadV2MetadataCreateParams"},"manifest":{"$ref":"#/components/schemas/Manifest"},"manifestBase64Encoded":{"$ref":"#/components/schemas/ManifestEncoded"}}},"WorkloadV2MetadataCreateParams":{"type":"object","properties":{"name":{"description":"The name of the workload.","type":"string","maxLength":63,"pattern":".*"},"useGivenNameAsPrefix":{"description":"When true, the requested name will be treated as a prefix. The final name of the workload will be composed of the name followed by a random set of characters.","type":"boolean","default":false},"projectId":{"$ref":"#/components/schemas/ProjectId"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"priority":{"$ref":"#/components/schemas/PriorityClass"},"category":{"$ref":"#/components/schemas/Category"},"preemptibility":{"$ref":"#/components/schemas/Preemptibility"},"configuration":{"$ref":"#/components/schemas/WorkloadV2Configuration"}}},"ProjectId":{"description":"The id of the project.","type":"string","pattern":".*"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"PriorityClass":{"description":"Specifies the priority class for the workload, which determines its scheduling behavior. Valid values are: very-low, low, medium-low, medium, medium-high, high, and very-high. Each workload type has a default priority. To view the default priority for each workload type, use the GET /workload-types endpoint. Once you change the priority from the default value defined for that workload type, the preemptibility field is not automatically updated. Make sure to set the desired preemptibility value.","type":"string","nullable":true,"pattern":".*"},"Category":{"description":"Specify the workload category assigned to the workload. Categories are used to classify and monitor different types of workloads within the NVIDIA Run:ai platform.","type":"string","nullable":true,"pattern":".*"},"Preemptibility":{"description":"Specifies whether the workload can be preempted by higher-priority workloads. Valid values are preemptible and non-preemptible. If explicitly set, this value takes precedence. If not set, the system derives the preemptibility from the priorityClassName field, ensuring backward compatibility. Each workload type has a default preemptibility. To view the default preemptibility for each workload type, use the GET /workload-types endpoint.","type":"string","minLength":1,"enum":["preemptible","non-preemptible"],"nullable":true},"WorkloadV2Configuration":{"type":"object","description":"Specifies the features configuration to apply to a workload.","properties":{"mnnvl":{"allOf":[{"$ref":"#/components/schemas/MnnvlMode"},{"type":"string","default":"None","nullable":true}]}}},"MnnvlMode":{"type":"string","enum":["Required","None"],"description":"MNNVL (Multi-Node NVLink) mode:\n- Required: The workload is configured to use MNNVL acceleration. The workload type and at least one project’s node pool must support MNNVL, or the request fails. When set, the workload is scheduled only on compatible nodes, and may remain pending until sufficient MNNVL-capable capacity is available.\n- None: The workload will not use MNNVL acceleration, even if MNNVL-capable nodes are available.\n"},"Manifest":{"type":"object","description":"The full Kubernetes manifest for the workload in JSON form. Mutually exclusive with manifestEncodedBase64.","additionalProperties":true},"ManifestEncoded":{"type":"string","format":"byte","maxLength":2097152,"description":"Kubernetes YAML manifest encoded in base 64. Mutually exclusive with manifest."},"WorkloadV2":{"type":"object","required":["metadata","desiredPhase","workloadManifest","rawManifest"],"properties":{"metadata":{"$ref":"#/components/schemas/WorkloadV2Metadata"},"desiredPhase":{"$ref":"#/components/schemas/DesiredPhase"},"workloadManifest":{"$ref":"#/components/schemas/Manifest"},"rawManifest":{"$ref":"#/components/schemas/Manifest"}}},"WorkloadV2Metadata":{"allOf":[{"$ref":"#/components/schemas/WorkloadV2MetadataResponse"},{"$ref":"#/components/schemas/WorkloadV2MetadataAutoFill"}]},"WorkloadV2MetadataResponse":{"type":"object","required":["name","projectId"],"properties":{"name":{"$ref":"#/components/schemas/WorkloadName"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"priority":{"$ref":"#/components/schemas/PriorityClass"},"category":{"$ref":"#/components/schemas/Category"},"preemptibility":{"$ref":"#/components/schemas/Preemptibility"},"configuration":{"$ref":"#/components/schemas/WorkloadV2Configuration"}}},"WorkloadName":{"description":"The name of the workload.","type":"string","minLength":1,"pattern":".*"},"WorkloadV2MetadataAutoFill":{"type":"object","required":["id","gvk","projectName","clusterId","tenantId","departmentId","departmentName","createdAt","createdBy","updatedAt","updatedBy"],"properties":{"id":{"$ref":"#/components/schemas/WorkloadId3"},"gvk":{"$ref":"#/components/schemas/GVK"},"projectName":{"$ref":"#/components/schemas/ProjectName2"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"departmentId":{"$ref":"#/components/schemas/DepartmentId3"},"departmentName":{"$ref":"#/components/schemas/DepartmentName1"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp for when the workload was created."},"createdBy":{"type":"string","description":"Identifier of the user who created the workload.","maxLength":250,"format":".*"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp for the last time the workload was updated."},"updatedBy":{"type":"string","description":"Identifier of the user who last updated the workload.","maxLength":250,"format":".*"},"deletedAt":{"type":"string","format":"date-time","description":"The timestamp indicating when the workload was deleted.","nullable":true},"deletedBy":{"type":"string","maxLength":250,"format":".*","description":"Identifier of the user who deleted the workload.","nullable":true}}},"WorkloadId3":{"description":"A unique ID of the workload.","type":"string","format":"uuid"},"GVK":{"type":"object","description":"Specifies the Group, Version, and Kind (GVK) of the Kubernetes resource that defines the workload.","required":["group","version","kind"],"properties":{"group":{"description":"The API group of the Kubernetes resource.","type":"string","maxLength":253},"version":{"description":"The API version of the resource within the specified group.","type":"string","maxLength":250},"kind":{"description":"The type of Kubernetes resource being referenced.","type":"string","maxLength":250}}},"ProjectName2":{"type":"string","description":"The name of the project","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"DepartmentId3":{"description":"The id of the department.","type":"string","minLength":1,"pattern":".*"},"DepartmentName1":{"type":"string","description":"The name of the department","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"DesiredPhase":{"description":"The desired phase of the workload.","type":"string","enum":["Running","Stopped","Deleted"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409Conflict":{"description":"The specified resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v2/workloads":{"post":{"summary":"Create a workload. [Experimental]","description":"Submit a workload with metadata and a Kubernetes manifest.","operationId":"create_workload_v2","tags":["Workloads V2"],"parameters":[{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"description":"Workload metadata and manifest","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadV2CreateRequest"}}}},"responses":{"202":{"description":"Workload creation request accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadV2"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"409":{"$ref":"#/components/responses/409Conflict"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get a specific workload. \[Experimental]

> Retrieve details of a specific workload by ID

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Workloads V2","description":"The Workloads V2 API allows you to create, retrieve, and delete workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystem. These workloads are registered in the platform through the Workload Types API, some are already registered in NVIDIA Run:ai, while others can be added by administrators.\nEach submission combines the user's Kubernetes manifest with NVIDIA Run:ai scheduling metadata, enabling consistent orchestration, monitoring, and governance. See [Extending workload support](https://run-ai-docs.nvidia.com/self-hosted/2.24/workloads-in-nvidia-run-ai/workload-types/extending-workload-support) for more details.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadV2Id":{"name":"WorkloadV2Id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the workload."}}},"schemas":{"WorkloadV2GetResponse":{"type":"object","required":["workload"],"properties":{"workload":{"$ref":"#/components/schemas/WorkloadV2"},"syncInfo":{"$ref":"#/components/schemas/WorkloadV2SyncInfo"}}},"WorkloadV2":{"type":"object","required":["metadata","desiredPhase","workloadManifest","rawManifest"],"properties":{"metadata":{"$ref":"#/components/schemas/WorkloadV2Metadata"},"desiredPhase":{"$ref":"#/components/schemas/DesiredPhase"},"workloadManifest":{"$ref":"#/components/schemas/Manifest"},"rawManifest":{"$ref":"#/components/schemas/Manifest"}}},"WorkloadV2Metadata":{"allOf":[{"$ref":"#/components/schemas/WorkloadV2MetadataResponse"},{"$ref":"#/components/schemas/WorkloadV2MetadataAutoFill"}]},"WorkloadV2MetadataResponse":{"type":"object","required":["name","projectId"],"properties":{"name":{"$ref":"#/components/schemas/WorkloadName"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"priority":{"$ref":"#/components/schemas/PriorityClass"},"category":{"$ref":"#/components/schemas/Category"},"preemptibility":{"$ref":"#/components/schemas/Preemptibility"},"configuration":{"$ref":"#/components/schemas/WorkloadV2Configuration"}}},"WorkloadName":{"description":"The name of the workload.","type":"string","minLength":1,"pattern":".*"},"ProjectId":{"description":"The id of the project.","type":"string","pattern":".*"},"PriorityClass":{"description":"Specifies the priority class for the workload, which determines its scheduling behavior. Valid values are: very-low, low, medium-low, medium, medium-high, high, and very-high. Each workload type has a default priority. To view the default priority for each workload type, use the GET /workload-types endpoint. Once you change the priority from the default value defined for that workload type, the preemptibility field is not automatically updated. Make sure to set the desired preemptibility value.","type":"string","nullable":true,"pattern":".*"},"Category":{"description":"Specify the workload category assigned to the workload. Categories are used to classify and monitor different types of workloads within the NVIDIA Run:ai platform.","type":"string","nullable":true,"pattern":".*"},"Preemptibility":{"description":"Specifies whether the workload can be preempted by higher-priority workloads. Valid values are preemptible and non-preemptible. If explicitly set, this value takes precedence. If not set, the system derives the preemptibility from the priorityClassName field, ensuring backward compatibility. Each workload type has a default preemptibility. To view the default preemptibility for each workload type, use the GET /workload-types endpoint.","type":"string","minLength":1,"enum":["preemptible","non-preemptible"],"nullable":true},"WorkloadV2Configuration":{"type":"object","description":"Specifies the features configuration to apply to a workload.","properties":{"mnnvl":{"allOf":[{"$ref":"#/components/schemas/MnnvlMode"},{"type":"string","default":"None","nullable":true}]}}},"MnnvlMode":{"type":"string","enum":["Required","None"],"description":"MNNVL (Multi-Node NVLink) mode:\n- Required: The workload is configured to use MNNVL acceleration. The workload type and at least one project’s node pool must support MNNVL, or the request fails. When set, the workload is scheduled only on compatible nodes, and may remain pending until sufficient MNNVL-capable capacity is available.\n- None: The workload will not use MNNVL acceleration, even if MNNVL-capable nodes are available.\n"},"WorkloadV2MetadataAutoFill":{"type":"object","required":["id","gvk","projectName","clusterId","tenantId","departmentId","departmentName","createdAt","createdBy","updatedAt","updatedBy"],"properties":{"id":{"$ref":"#/components/schemas/WorkloadId3"},"gvk":{"$ref":"#/components/schemas/GVK"},"projectName":{"$ref":"#/components/schemas/ProjectName2"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"departmentId":{"$ref":"#/components/schemas/DepartmentId3"},"departmentName":{"$ref":"#/components/schemas/DepartmentName1"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp for when the workload was created."},"createdBy":{"type":"string","description":"Identifier of the user who created the workload.","maxLength":250,"format":".*"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp for the last time the workload was updated."},"updatedBy":{"type":"string","description":"Identifier of the user who last updated the workload.","maxLength":250,"format":".*"},"deletedAt":{"type":"string","format":"date-time","description":"The timestamp indicating when the workload was deleted.","nullable":true},"deletedBy":{"type":"string","maxLength":250,"format":".*","description":"Identifier of the user who deleted the workload.","nullable":true}}},"WorkloadId3":{"description":"A unique ID of the workload.","type":"string","format":"uuid"},"GVK":{"type":"object","description":"Specifies the Group, Version, and Kind (GVK) of the Kubernetes resource that defines the workload.","required":["group","version","kind"],"properties":{"group":{"description":"The API group of the Kubernetes resource.","type":"string","maxLength":253},"version":{"description":"The API version of the resource within the specified group.","type":"string","maxLength":250},"kind":{"description":"The type of Kubernetes resource being referenced.","type":"string","maxLength":250}}},"ProjectName2":{"type":"string","description":"The name of the project","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"DepartmentId3":{"description":"The id of the department.","type":"string","minLength":1,"pattern":".*"},"DepartmentName1":{"type":"string","description":"The name of the department","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"DesiredPhase":{"description":"The desired phase of the workload.","type":"string","enum":["Running","Stopped","Deleted"]},"Manifest":{"type":"object","description":"The full Kubernetes manifest for the workload in JSON form. Mutually exclusive with manifestEncodedBase64.","additionalProperties":true},"WorkloadV2SyncInfo":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/WorkloadV2SyncStatus"},"message":{"type":"string","maxLength":250,"pattern":".*"}}},"WorkloadV2SyncStatus":{"type":"string","enum":["Queued","Applying","Deleting","Synced","Deleted","Failed"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v2/workloads/{WorkloadV2Id}":{"get":{"summary":"Get a specific workload. [Experimental]","description":"Retrieve details of a specific workload by ID","operationId":"get_workload_v2_by_id","tags":["Workloads V2"],"parameters":[{"$ref":"#/components/parameters/WorkloadV2Id"}],"responses":{"200":{"description":"Successfully retrieved the workload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadV2GetResponse"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update workload spec. \[Experimental]

> Update the specification of an existing workload.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Workloads V2","description":"The Workloads V2 API allows you to create, retrieve, and delete workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystem. These workloads are registered in the platform through the Workload Types API, some are already registered in NVIDIA Run:ai, while others can be added by administrators.\nEach submission combines the user's Kubernetes manifest with NVIDIA Run:ai scheduling metadata, enabling consistent orchestration, monitoring, and governance. See [Extending workload support](https://run-ai-docs.nvidia.com/self-hosted/2.24/workloads-in-nvidia-run-ai/workload-types/extending-workload-support) for more details.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadV2Id":{"name":"WorkloadV2Id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the workload."}}},"schemas":{"WorkloadV2UpdateRequest":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/WorkloadV2MetadataUpdateParams"},"manifest":{"$ref":"#/components/schemas/Manifest"},"manifestBase64Encoded":{"$ref":"#/components/schemas/ManifestEncoded"}}},"WorkloadV2MetadataUpdateParams":{"type":"object","properties":{"priority":{"$ref":"#/components/schemas/PriorityClass"},"category":{"$ref":"#/components/schemas/Category"}}},"PriorityClass":{"description":"Specifies the priority class for the workload, which determines its scheduling behavior. Valid values are: very-low, low, medium-low, medium, medium-high, high, and very-high. Each workload type has a default priority. To view the default priority for each workload type, use the GET /workload-types endpoint. Once you change the priority from the default value defined for that workload type, the preemptibility field is not automatically updated. Make sure to set the desired preemptibility value.","type":"string","nullable":true,"pattern":".*"},"Category":{"description":"Specify the workload category assigned to the workload. Categories are used to classify and monitor different types of workloads within the NVIDIA Run:ai platform.","type":"string","nullable":true,"pattern":".*"},"Manifest":{"type":"object","description":"The full Kubernetes manifest for the workload in JSON form. Mutually exclusive with manifestEncodedBase64.","additionalProperties":true},"ManifestEncoded":{"type":"string","format":"byte","maxLength":2097152,"description":"Kubernetes YAML manifest encoded in base 64. Mutually exclusive with manifest."},"WorkloadV2":{"type":"object","required":["metadata","desiredPhase","workloadManifest","rawManifest"],"properties":{"metadata":{"$ref":"#/components/schemas/WorkloadV2Metadata"},"desiredPhase":{"$ref":"#/components/schemas/DesiredPhase"},"workloadManifest":{"$ref":"#/components/schemas/Manifest"},"rawManifest":{"$ref":"#/components/schemas/Manifest"}}},"WorkloadV2Metadata":{"allOf":[{"$ref":"#/components/schemas/WorkloadV2MetadataResponse"},{"$ref":"#/components/schemas/WorkloadV2MetadataAutoFill"}]},"WorkloadV2MetadataResponse":{"type":"object","required":["name","projectId"],"properties":{"name":{"$ref":"#/components/schemas/WorkloadName"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"priority":{"$ref":"#/components/schemas/PriorityClass"},"category":{"$ref":"#/components/schemas/Category"},"preemptibility":{"$ref":"#/components/schemas/Preemptibility"},"configuration":{"$ref":"#/components/schemas/WorkloadV2Configuration"}}},"WorkloadName":{"description":"The name of the workload.","type":"string","minLength":1,"pattern":".*"},"ProjectId":{"description":"The id of the project.","type":"string","pattern":".*"},"Preemptibility":{"description":"Specifies whether the workload can be preempted by higher-priority workloads. Valid values are preemptible and non-preemptible. If explicitly set, this value takes precedence. If not set, the system derives the preemptibility from the priorityClassName field, ensuring backward compatibility. Each workload type has a default preemptibility. To view the default preemptibility for each workload type, use the GET /workload-types endpoint.","type":"string","minLength":1,"enum":["preemptible","non-preemptible"],"nullable":true},"WorkloadV2Configuration":{"type":"object","description":"Specifies the features configuration to apply to a workload.","properties":{"mnnvl":{"allOf":[{"$ref":"#/components/schemas/MnnvlMode"},{"type":"string","default":"None","nullable":true}]}}},"MnnvlMode":{"type":"string","enum":["Required","None"],"description":"MNNVL (Multi-Node NVLink) mode:\n- Required: The workload is configured to use MNNVL acceleration. The workload type and at least one project’s node pool must support MNNVL, or the request fails. When set, the workload is scheduled only on compatible nodes, and may remain pending until sufficient MNNVL-capable capacity is available.\n- None: The workload will not use MNNVL acceleration, even if MNNVL-capable nodes are available.\n"},"WorkloadV2MetadataAutoFill":{"type":"object","required":["id","gvk","projectName","clusterId","tenantId","departmentId","departmentName","createdAt","createdBy","updatedAt","updatedBy"],"properties":{"id":{"$ref":"#/components/schemas/WorkloadId3"},"gvk":{"$ref":"#/components/schemas/GVK"},"projectName":{"$ref":"#/components/schemas/ProjectName2"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"departmentId":{"$ref":"#/components/schemas/DepartmentId3"},"departmentName":{"$ref":"#/components/schemas/DepartmentName1"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp for when the workload was created."},"createdBy":{"type":"string","description":"Identifier of the user who created the workload.","maxLength":250,"format":".*"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp for the last time the workload was updated."},"updatedBy":{"type":"string","description":"Identifier of the user who last updated the workload.","maxLength":250,"format":".*"},"deletedAt":{"type":"string","format":"date-time","description":"The timestamp indicating when the workload was deleted.","nullable":true},"deletedBy":{"type":"string","maxLength":250,"format":".*","description":"Identifier of the user who deleted the workload.","nullable":true}}},"WorkloadId3":{"description":"A unique ID of the workload.","type":"string","format":"uuid"},"GVK":{"type":"object","description":"Specifies the Group, Version, and Kind (GVK) of the Kubernetes resource that defines the workload.","required":["group","version","kind"],"properties":{"group":{"description":"The API group of the Kubernetes resource.","type":"string","maxLength":253},"version":{"description":"The API version of the resource within the specified group.","type":"string","maxLength":250},"kind":{"description":"The type of Kubernetes resource being referenced.","type":"string","maxLength":250}}},"ProjectName2":{"type":"string","description":"The name of the project","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"DepartmentId3":{"description":"The id of the department.","type":"string","minLength":1,"pattern":".*"},"DepartmentName1":{"type":"string","description":"The name of the department","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"DesiredPhase":{"description":"The desired phase of the workload.","type":"string","enum":["Running","Stopped","Deleted"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v2/workloads/{WorkloadV2Id}":{"put":{"summary":"Update workload spec. [Experimental]","operationId":"update_workload_v2","description":"Update the specification of an existing workload.","tags":["Workloads V2"],"parameters":[{"$ref":"#/components/parameters/WorkloadV2Id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadV2UpdateRequest"}}}},"responses":{"202":{"description":"Workload update request accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadV2"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete a workload. \[Experimental]

> Delete a specific workload by ID

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Workloads V2","description":"The Workloads V2 API allows you to create, retrieve, and delete workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystem. These workloads are registered in the platform through the Workload Types API, some are already registered in NVIDIA Run:ai, while others can be added by administrators.\nEach submission combines the user's Kubernetes manifest with NVIDIA Run:ai scheduling metadata, enabling consistent orchestration, monitoring, and governance. See [Extending workload support](https://run-ai-docs.nvidia.com/self-hosted/2.24/workloads-in-nvidia-run-ai/workload-types/extending-workload-support) for more details.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadV2Id":{"name":"WorkloadV2Id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the workload."}}},"schemas":{"WorkloadV2":{"type":"object","required":["metadata","desiredPhase","workloadManifest","rawManifest"],"properties":{"metadata":{"$ref":"#/components/schemas/WorkloadV2Metadata"},"desiredPhase":{"$ref":"#/components/schemas/DesiredPhase"},"workloadManifest":{"$ref":"#/components/schemas/Manifest"},"rawManifest":{"$ref":"#/components/schemas/Manifest"}}},"WorkloadV2Metadata":{"allOf":[{"$ref":"#/components/schemas/WorkloadV2MetadataResponse"},{"$ref":"#/components/schemas/WorkloadV2MetadataAutoFill"}]},"WorkloadV2MetadataResponse":{"type":"object","required":["name","projectId"],"properties":{"name":{"$ref":"#/components/schemas/WorkloadName"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"priority":{"$ref":"#/components/schemas/PriorityClass"},"category":{"$ref":"#/components/schemas/Category"},"preemptibility":{"$ref":"#/components/schemas/Preemptibility"},"configuration":{"$ref":"#/components/schemas/WorkloadV2Configuration"}}},"WorkloadName":{"description":"The name of the workload.","type":"string","minLength":1,"pattern":".*"},"ProjectId":{"description":"The id of the project.","type":"string","pattern":".*"},"PriorityClass":{"description":"Specifies the priority class for the workload, which determines its scheduling behavior. Valid values are: very-low, low, medium-low, medium, medium-high, high, and very-high. Each workload type has a default priority. To view the default priority for each workload type, use the GET /workload-types endpoint. Once you change the priority from the default value defined for that workload type, the preemptibility field is not automatically updated. Make sure to set the desired preemptibility value.","type":"string","nullable":true,"pattern":".*"},"Category":{"description":"Specify the workload category assigned to the workload. Categories are used to classify and monitor different types of workloads within the NVIDIA Run:ai platform.","type":"string","nullable":true,"pattern":".*"},"Preemptibility":{"description":"Specifies whether the workload can be preempted by higher-priority workloads. Valid values are preemptible and non-preemptible. If explicitly set, this value takes precedence. If not set, the system derives the preemptibility from the priorityClassName field, ensuring backward compatibility. Each workload type has a default preemptibility. To view the default preemptibility for each workload type, use the GET /workload-types endpoint.","type":"string","minLength":1,"enum":["preemptible","non-preemptible"],"nullable":true},"WorkloadV2Configuration":{"type":"object","description":"Specifies the features configuration to apply to a workload.","properties":{"mnnvl":{"allOf":[{"$ref":"#/components/schemas/MnnvlMode"},{"type":"string","default":"None","nullable":true}]}}},"MnnvlMode":{"type":"string","enum":["Required","None"],"description":"MNNVL (Multi-Node NVLink) mode:\n- Required: The workload is configured to use MNNVL acceleration. The workload type and at least one project’s node pool must support MNNVL, or the request fails. When set, the workload is scheduled only on compatible nodes, and may remain pending until sufficient MNNVL-capable capacity is available.\n- None: The workload will not use MNNVL acceleration, even if MNNVL-capable nodes are available.\n"},"WorkloadV2MetadataAutoFill":{"type":"object","required":["id","gvk","projectName","clusterId","tenantId","departmentId","departmentName","createdAt","createdBy","updatedAt","updatedBy"],"properties":{"id":{"$ref":"#/components/schemas/WorkloadId3"},"gvk":{"$ref":"#/components/schemas/GVK"},"projectName":{"$ref":"#/components/schemas/ProjectName2"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"departmentId":{"$ref":"#/components/schemas/DepartmentId3"},"departmentName":{"$ref":"#/components/schemas/DepartmentName1"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp for when the workload was created."},"createdBy":{"type":"string","description":"Identifier of the user who created the workload.","maxLength":250,"format":".*"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp for the last time the workload was updated."},"updatedBy":{"type":"string","description":"Identifier of the user who last updated the workload.","maxLength":250,"format":".*"},"deletedAt":{"type":"string","format":"date-time","description":"The timestamp indicating when the workload was deleted.","nullable":true},"deletedBy":{"type":"string","maxLength":250,"format":".*","description":"Identifier of the user who deleted the workload.","nullable":true}}},"WorkloadId3":{"description":"A unique ID of the workload.","type":"string","format":"uuid"},"GVK":{"type":"object","description":"Specifies the Group, Version, and Kind (GVK) of the Kubernetes resource that defines the workload.","required":["group","version","kind"],"properties":{"group":{"description":"The API group of the Kubernetes resource.","type":"string","maxLength":253},"version":{"description":"The API version of the resource within the specified group.","type":"string","maxLength":250},"kind":{"description":"The type of Kubernetes resource being referenced.","type":"string","maxLength":250}}},"ProjectName2":{"type":"string","description":"The name of the project","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"DepartmentId3":{"description":"The id of the department.","type":"string","minLength":1,"pattern":".*"},"DepartmentName1":{"type":"string","description":"The name of the department","minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"DesiredPhase":{"description":"The desired phase of the workload.","type":"string","enum":["Running","Stopped","Deleted"]},"Manifest":{"type":"object","description":"The full Kubernetes manifest for the workload in JSON form. Mutually exclusive with manifestEncodedBase64.","additionalProperties":true},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v2/workloads/{WorkloadV2Id}":{"delete":{"summary":"Delete a workload. [Experimental]","description":"Delete a specific workload by ID","operationId":"delete_workload_v2","tags":["Workloads V2"],"parameters":[{"$ref":"#/components/parameters/WorkloadV2Id"}],"responses":{"202":{"description":"Deletion request accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadV2"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```
