> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/dsx-air/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/dsx-air/_mcp/server.

# Publish an image to the public published catalog of images

PATCH https://api.dsx-air.nvidia.com/api/v3/images/{id}/publish/
Content-Type: application/json

Immediately publishes the image (auto-approved publish access record, then S3 publish). Default `prefer_public` is `true` (globally visible). When `prefer_public` is `false`, send authoritative `allowed_orgs` as a UUID array for the restricted allow-list (distinct from gated `request-publish` string hints). Optional `justification` is stored for audit when provided.

**Required scopes (any one):**

- `air:image_publish` (roles: `air_image_publisher`)

Reference: https://docs.nvidia.com/dsx-air/api-reference/images/api-v-3-images-publish-partial-update

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required) — A UUID string identifying this image.

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional) — The `name` of the image. This must be unique with the `version`. This may need to be updated when publishing the image.
- `version` (string, optional) — The `version` of the image. This must be unique with the `name`. This may need to be updated when publishing the image.
- `prefer_public` (boolean, optional, default: true) — Requester intent for **public** (`true`, default) vs **restricted** (`false`) publishing. Community managers may choose a different outcome when approving a gated request.
- `justification` (string, optional, nullable) — Optional text explaining who/why to share with.
- `allowed_orgs` (list of string, optional) — Authoritative allow-list: orgs that may use the image when `prefer_public` is `false`. The image owning org is always included; `[]` is valid. **Privileged** `PATCH …/publish` only — not the gated `request-publish` string hint.

## Response

### 200

- `id` (string, required)
- `name` (string, required) — The `name` of the image. This must be unique with the `version`.
- `version` (string, required) — The `version` of the image. This must be unique with the `name`.
- `created` (datetime, required)
- `creator` (string, required, nullable) — The email of the user who created the image.
- `modified` (datetime, required)
- `default_username` (string, required) — The default username for authenticating with the operating system.
- `default_password` (string, required) — The default password for authenticating with the operating system.
- `published` (boolean, required) — Whether the image is published.
- `publicly_published` (boolean, required) — Whether the image is published to all users (public) vs restricted to an allow-list. Always `false` for unpublished images.
- `publish_access_record_id` (string, required, nullable) — The id of the image publish access record. Returned only to the owning organization, Air admins, and SREs; null otherwise.
- `upload_status` (enum, required) — The upload status of the image file. * `READY` - Ready * `UPLOADING` - Uploading * `VALIDATING` - Validating * `COMPLETE` - Complete * `PUBLISHING` - Publishing * `UNPUBLISHING` - Unpublishing * `COPYING_FROM_IMAGE_SHARE` - Copying from image share * `PENDING_PUBLISH` - Pending Publish * `PENDING_UNPUBLISH` - Pending Unpublish
  - Allowed values: `READY`, `UPLOADING`, `VALIDATING`, `COMPLETE`, `PUBLISHING`, `UNPUBLISHING`, `COPYING_FROM_IMAGE_SHARE`, `PENDING_PUBLISH`, `PENDING_UNPUBLISH`
- `last_uploaded_at` (datetime, required, nullable) — The date and time the image was last uploaded.
- `size` (integer, required) — The size of the image file in bytes.
- `hash` (string, required) — The hash of the image file. This is used to check if the content of the image has changed.
- `is_owned_by_client` (boolean, required) — If the image is owned by the client. When true, the client can share/publish/unpublish the image.
- `mountpoint` (string, optional, nullable) — Partition that hosts the operating system root file system.
- `minimum_resources` (object, optional) — The minimum resources required to run the image.
  - `cpu` (integer, required) — The minimum number of CPU cores required to run the image.
  - `memory` (integer, required) — The minimum amount of memory required to run the image.
  - `storage` (integer, required) — The minimum amount of storage required to run the image.
- `includes_air_agent` (boolean, optional, default: false) — Whether the image includes the Air Agent service.
- `cpu_arch` (enum, optional, default: x86) — The CPU architecture of the image. * `x86` - x86 * `ARM` - ARM
  - Allowed values: `x86`, `ARM`
- `emulation_type` (list of string, optional) — The types of emulation the image supports.
- `emulation_version` (string, optional) — The version of the emulation the image supports.
- `provider` (enum, optional, default: VM) — The provider of the image. * `VM` - VM * `CONTAINER` - CONTAINER
  - Allowed values: `VM`, `CONTAINER`
- `notes` (string, optional) — Notes about the image.
- `release_notes` (string, optional) — Release notes for the image.
- `user_manual` (string, optional) — User manual for the image.

## Errors

### 400 Bad Request Error

- `detail` (string, required) — Description of an error.
- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `type` (enum, required) — Specific type of a 400 error. * `PROTECTED` - Instance may not be deleted as it is being referenced by other instances. * `VALIDATION` - Validation errors encountered during payload processing.
  - Allowed values: `PROTECTED`, `VALIDATION`
- `protected_instances` (list of object, optional) — Instances which bar the current instance from being deleted. Only defined when `type` is set to `PROTECTED`.
  - `id` (string, required) — ID of the instance.
  - `type` (string, required) — Type of the instance.
- `validation_errors` (map from string to list of object or object or map from string to any or list of object, optional) — Validation errors encountered during payload processing. Only defined when `type` is set to `VALIDATION`.

### 403 Forbidden Error

- `detail` (string, required) — Description of an error.
- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.

### 404 Not Found Error

- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `detail` (string, optional, default: No object matches the given query.) — Description of an error.

### 500 Internal Server Error

- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `code` (string, required) — Error code which identifies the error. Should be provided when opening a support case.
- `detail` (string, optional, default: An unexpected error has occurred. Please contact NVIDIA Air support for further assistance.) — Description of an error.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "string",
  "name": "string",
  "version": "string",
  "created": "2024-01-15T09:30:00Z",
  "creator": "string",
  "modified": "2024-01-15T09:30:00Z",
  "default_username": "string",
  "default_password": "string",
  "published": true,
  "publicly_published": true,
  "publish_access_record_id": "string",
  "upload_status": "READY",
  "last_uploaded_at": "2024-01-15T09:30:00Z",
  "size": 1,
  "hash": "string",
  "is_owned_by_client": true,
  "mountpoint": "string",
  "minimum_resources": {
    "cpu": 1,
    "memory": 1,
    "storage": 1
  },
  "includes_air_agent": false,
  "cpu_arch": "x86",
  "emulation_type": [
    "string"
  ],
  "emulation_version": "string",
  "provider": "VM",
  "notes": "string",
  "release_notes": "string",
  "user_manual": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.dsx-air.nvidia.com/api/v3/images/id/publish/"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.dsx-air.nvidia.com/api/v3/images/id/publish/';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.dsx-air.nvidia.com/api/v3/images/id/publish/"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.dsx-air.nvidia.com/api/v3/images/id/publish/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.dsx-air.nvidia.com/api/v3/images/id/publish/")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.dsx-air.nvidia.com/api/v3/images/id/publish/', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.dsx-air.nvidia.com/api/v3/images/id/publish/");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.dsx-air.nvidia.com/api/v3/images/id/publish/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```