Skip to main content
PATCH
/
api
/
v1
/
images
/
visibility
Bulk Update Image Visibility
curl --request PATCH \
  --url https://api.primeintellect.ai/api/v1/images/visibility \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "images": [
    {
      "name": "<string>",
      "tag": "<string>"
    }
  ],
  "search": "<string>",
  "teamId": "<string>"
}
'
import requests

url = "https://api.primeintellect.ai/api/v1/images/visibility"

payload = {
"images": [
{
"name": "<string>",
"tag": "<string>"
}
],
"search": "<string>",
"teamId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
images: [{name: '<string>', tag: '<string>'}],
search: '<string>',
teamId: '<string>'
})
};

fetch('https://api.primeintellect.ai/api/v1/images/visibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.primeintellect.ai/api/v1/images/visibility",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
[
'name' => '<string>',
'tag' => '<string>'
]
],
'search' => '<string>',
'teamId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.primeintellect.ai/api/v1/images/visibility"

payload := strings.NewReader("{\n \"images\": [\n {\n \"name\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"search\": \"<string>\",\n \"teamId\": \"<string>\"\n}")

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(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.primeintellect.ai/api/v1/images/visibility")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n {\n \"name\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"search\": \"<string>\",\n \"teamId\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.primeintellect.ai/api/v1/images/visibility")

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 = "{\n \"images\": [\n {\n \"name\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"search\": \"<string>\",\n \"teamId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "<string>",
  "succeeded": [
    "<string>"
  ],
  "failed": [
    {
      "image": "<string>",
      "error": "<string>"
    }
  ]
}
{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}

Rate Limit

50 requests per 60 seconds per IP and token.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for publishing or unpublishing many images at once.

Exactly one of images (explicit references) or search (server-side filter, same semantics as the list endpoint) must be provided. The whole request operates in a single owner scope: the caller's personal images by default, or a team's images when teamId is set. Owner-prefixed references are not supported here; names are matched literally.

visibility
enum<string>
required

New image visibility (PUBLIC or PRIVATE)

Available options:
PRIVATE,
PUBLIC
images
BulkImageVisibilityRef · object[] | null

Explicit image references to update (max 100 per request)

Maximum array length: 100
search
string | null

Case-insensitive substring match on image name, tag, or the name:tag reference; every matching image in scope is updated

teamId
string | null

Team ID if updating team images

Response

Successful Response

Response model for a bulk image visibility update.

success
boolean
required

True when no image failed to update

message
string
required

Status message describing the result

visibility
enum<string>
required

Requested visibility

Available options:
PRIVATE,
PUBLIC
succeeded
string[]

name:tag references that were updated

failed
BulkImageVisibilityFailure · object[]

References that could not be updated