image.setVisibility

bearer / PAT

Set independent photo access

public permits image.getPublic and /p/:id independently of album publication. private removes that independent grant; an explicitly published album can still expose the photo. Existing generated file URLs remain public until deletion or moderation.

Parameters

Passed by name in the params object.

Name Type Required Description
id string yes
visibility string (enum) yes

Result

Returns ImageDTO:

Field Type Description
album_id string
created_at * string
custom_crops * array<customCropDTO>
description * string
exif * exifDTO
exif_visibility visibilityDTO
format * string
frozen boolean
height * integer
id * string
moderation sharingModerationDTO
renders * array<renderDTO>
size_bytes * integer
status * string
title * string
visibility * string
visitor_eligibility string
width * integer

Errors

Code Message When
2002 validation_failed Malformed request; see error.data.
2001 not_found No such resource owned by the caller.

See the error reference for the full catalog, including the authentication codes.

Example

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "image.setVisibility",
  "params": {
    "id": "018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d",
    "visibility": "private"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": "018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d",
    "title": "Golden Gate at dawn",
    "description": "Long exposure from the Marin Headlands.",
    "status": "ready",
    "width": 6000,
    "height": 4000,
    "size_bytes": 8452016,
    "format": "jpg",
    "exif": {
      "taken_at": "2026-02-11T06:42:18Z",
      "camera_make": "FUJIFILM",
      "camera_model": "X-T5",
      "lens": "XF16-55mmF2.8"
    },
    "visibility": "public",
    "visitor_eligibility": "visible",
    "renders": [
      {
        "crop": "thumb",
        "format": "webp",
        "width": 256,
        "height": 256,
        "size_bytes": 14320,
        "url": "https://img.peinture.gumeniuk.com/r/018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d/thumb.webp?v=3",
        "pending": false
      },
      {
        "crop": "large",
        "format": "webp",
        "width": 2048,
        "height": 1365,
        "size_bytes": 412880,
        "url": "https://img.peinture.gumeniuk.com/r/018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d/large.webp?v=3",
        "pending": false
      }
    ],
    "custom_crops": [],
    "exif_visibility": {
      "gps": false,
      "camera": true,
      "datetime": true,
      "settings": false
    },
    "created_at": "2026-02-11T07:03:00Z"
  }
}

curl

curl -s https://peinture.gumeniuk.com/rpc \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"image.setVisibility","params":{"id":"018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d","visibility":"private"}}'

JavaScript

const res = await fetch("https://peinture.gumeniuk.com/rpc", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${token}`,
  },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "image.setVisibility", params: {"id":"018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d","visibility":"private"},
  }),
});
const { result, error } = await res.json();

Go

body := []byte(`{"jsonrpc":"2.0","id":1,"method":"image.setVisibility","params":{"id":"018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d","visibility":"private"}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)

Try it

Sends a real request to /rpc from your browser. Paste a bearer token above — a JWT access token or a personal access token (pnt_…).