Curated Albums

Get All Project Curated Albums

Request Sample

const result = await mediaviz.curatedAlbums.getAllProjectCuratedAlbums('<PROJECT_TABLE_NAME>');
import type { CuratedAlbumDisplay } from '@mediaviz/sdk';

const result: CuratedAlbumDisplay[] = await mediaviz.curatedAlbums.getAllProjectCuratedAlbums('<PROJECT_TABLE_NAME>');
const result = await mediaviz.curatedAlbums.getAllProjectCuratedAlbums('<PROJECT_TABLE_NAME>');
const { client } = useMediaViz();

const result = await client.curatedAlbums.getAllProjectCuratedAlbums('<PROJECT_TABLE_NAME>');
result = mediaviz.curated_albums.get_all_project_curated_albums('<PROJECT_TABLE_NAME>')
$result = $mediaviz->curatedAlbums->getAllProjectCuratedAlbums('<PROJECT_TABLE_NAME>');
curl -X GET 'https://api.mediaviz.ai/api/v1/curated_album/project/<PROJECT_TABLE_NAME>' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo'

Response Sample

[
  {
    "id": 0,
    "project_table_name": "z-photos-1024-a1b2c3d4",
    "name": "string",
    "description": "string",
    "confidence_value": 0.0
  }
]

Get Curated Album Photos

Returns the IDs of the photos in a curated album. IDs are sorted by date taken, and only the best photo from each group of similar photos is included. Photos are matched to the album by confidence; pass a lower confidence_value (0.0-1.0) to include more photos, or a higher one to include fewer.

This endpoint is paginated and returns at most 5,000 items per request. Use the listed query parameters to page through the complete result set with keyset pagination.

Request Sample

const result = await mediaviz.curatedAlbums.getCuratedAlbumPhotos(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const result = await mediaviz.curatedAlbums.getCuratedAlbumPhotos(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const result = await mediaviz.curatedAlbums.getCuratedAlbumPhotos(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const { client } = useMediaViz();

const result = await client.curatedAlbums.getCuratedAlbumPhotos(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
result = mediaviz.curated_albums.get_curated_album_photos(
    '<ALBUM_ID>',
    asc_or_desc='<ASC_OR_DESC>',
    last_id='<LAST_ID>',
    limit='<LIMIT>',
    confidence_value='<CONFIDENCE_VALUE>'
)
$result = $mediaviz->curatedAlbums->getCuratedAlbumPhotos(
  '<ALBUM_ID>',
  [
    'ascOrDesc' => '<ASC_OR_DESC>',
    'lastId' => '<LAST_ID>',
    'limit' => '<LIMIT>',
    'confidenceValue' => '<CONFIDENCE_VALUE>'
  ]
);
curl -X GET 'https://api.mediaviz.ai/api/v1/curated_album/photos/<ALBUM_ID>/' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo'

Response Sample

[
  [
    1035601
  ],
  [
    1035602
  ],
  [
    1035603
  ]
]

Get Curated Album Photos Ranked

Returns the same photos as Get Curated Album Photos, grouped into the collection's quality tiers: top_tier, tier_2 and tier_3. Accepts the same confidence_value. Only available once curation is complete; before that, it returns 400.

This endpoint is paginated and returns at most 5,000 items per request. Use the listed query parameters to page through the complete result set with keyset pagination.

Request Sample

const result = await mediaviz.curatedAlbums.getCuratedAlbumPhotosRanked(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const result = await mediaviz.curatedAlbums.getCuratedAlbumPhotosRanked(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const result = await mediaviz.curatedAlbums.getCuratedAlbumPhotosRanked(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const { client } = useMediaViz();

const result = await client.curatedAlbums.getCuratedAlbumPhotosRanked(
  '<ALBUM_ID>',
  {
    ascOrDesc: '<ASC_OR_DESC>',
    lastId: '<LAST_ID>',
    limit: '<LIMIT>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
result = mediaviz.curated_albums.get_curated_album_photos_ranked(
    '<ALBUM_ID>',
    asc_or_desc='<ASC_OR_DESC>',
    last_id='<LAST_ID>',
    limit='<LIMIT>',
    confidence_value='<CONFIDENCE_VALUE>'
)
$result = $mediaviz->curatedAlbums->getCuratedAlbumPhotosRanked(
  '<ALBUM_ID>',
  [
    'ascOrDesc' => '<ASC_OR_DESC>',
    'lastId' => '<LAST_ID>',
    'limit' => '<LIMIT>',
    'confidenceValue' => '<CONFIDENCE_VALUE>'
  ]
);
curl -X GET 'https://api.mediaviz.ai/api/v1/curated_album/photos/ranked/<ALBUM_ID>/' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo'

Response Sample

{
  "top_tier": [
    1035601
  ],
  "tier_2": [
    1035602,
    1035603
  ],
  "tier_3": [
    1035604
  ]
}

Get Curated Album By Id

Request Sample

const result = await mediaviz.curatedAlbums.getCuratedAlbumById('<ALBUM_ID>');
import type { CuratedAlbumDisplay } from '@mediaviz/sdk';

const result: CuratedAlbumDisplay = await mediaviz.curatedAlbums.getCuratedAlbumById('<ALBUM_ID>');
const result = await mediaviz.curatedAlbums.getCuratedAlbumById('<ALBUM_ID>');
const { client } = useMediaViz();

const result = await client.curatedAlbums.getCuratedAlbumById('<ALBUM_ID>');
result = mediaviz.curated_albums.get_curated_album_by_id('<ALBUM_ID>')
$result = $mediaviz->curatedAlbums->getCuratedAlbumById('<ALBUM_ID>');
curl -X GET 'https://api.mediaviz.ai/api/v1/curated_album/<ALBUM_ID>' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo'

Response Sample

{
  "id": 0,
  "project_table_name": "z-photos-1024-a1b2c3d4",
  "name": "string",
  "description": "string",
  "confidence_value": 0.0
}

Create Curated Album

Albums are generated automatically for each collection, so most integrations never need to call this. Use it to re-create a deleted album. Photos are added asynchronously after the album is created. name must be one of the predefined categories; any other value fails with 400 — Invalid album name. Valid names: activities, air_travel, animals, baby, birthday, camping, childhood, christmas, college, events, family, global_places, graduation, group_photos, halloween, hiking, holidays, nature, other_life_events, pets, portraits, religion, school, sports, travel, wedding.

Request Sample

const result = await mediaviz.curatedAlbums.createCuratedAlbum(
  '<PROJECT_TABLE_NAME>',
  '<NAME>',
  '<DESCRIPTION>',
  '<CONFIDENCE_VALUE>'
);
import type { CuratedAlbumDisplay } from '@mediaviz/sdk';

const result: CuratedAlbumDisplay = await mediaviz.curatedAlbums.createCuratedAlbum(
  '<PROJECT_TABLE_NAME>',
  '<NAME>',
  '<DESCRIPTION>',
  '<CONFIDENCE_VALUE>'
);
const result = await mediaviz.curatedAlbums.createCuratedAlbum(
  '<PROJECT_TABLE_NAME>',
  '<NAME>',
  '<DESCRIPTION>',
  '<CONFIDENCE_VALUE>'
);
const { client } = useMediaViz();

const result = await client.curatedAlbums.createCuratedAlbum(
  '<PROJECT_TABLE_NAME>',
  '<NAME>',
  '<DESCRIPTION>',
  '<CONFIDENCE_VALUE>'
);
result = mediaviz.curated_albums.create_curated_album(
    '<PROJECT_TABLE_NAME>',
    '<NAME>',
    '<DESCRIPTION>',
    '<CONFIDENCE_VALUE>'
)
$result = $mediaviz->curatedAlbums->createCuratedAlbum(
  '<PROJECT_TABLE_NAME>',
  '<NAME>',
  '<DESCRIPTION>',
  '<CONFIDENCE_VALUE>'
);
curl -X POST 'https://api.mediaviz.ai/api/v1/curated_album/project/<PROJECT_TABLE_NAME>' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo' \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "name": "<NAME>",
  "description": "<DESCRIPTION>",
  "confidence_value": "<CONFIDENCE_VALUE>"
}
JSON

Response Sample

{
  "id": 0,
  "project_table_name": "z-photos-1024-a1b2c3d4",
  "name": "string",
  "description": "string",
  "confidence_value": 0.0
}

Update Curated Album

Updates only the fields you pass. Changing confidence_value changes which photos belong to the album: raising it removes lower-confidence photos, and lowering it adds them.

Request Sample

const result = await mediaviz.curatedAlbums.updateCuratedAlbum(
  '<ALBUM_ID>',
  {
    name: '<NAME>',
    description: '<DESCRIPTION>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
import type { CuratedAlbumDisplay } from '@mediaviz/sdk';

const result: CuratedAlbumDisplay = await mediaviz.curatedAlbums.updateCuratedAlbum(
  '<ALBUM_ID>',
  {
    name: '<NAME>',
    description: '<DESCRIPTION>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const result = await mediaviz.curatedAlbums.updateCuratedAlbum(
  '<ALBUM_ID>',
  {
    name: '<NAME>',
    description: '<DESCRIPTION>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
const { client } = useMediaViz();

const result = await client.curatedAlbums.updateCuratedAlbum(
  '<ALBUM_ID>',
  {
    name: '<NAME>',
    description: '<DESCRIPTION>',
    confidenceValue: '<CONFIDENCE_VALUE>'
  }
);
result = mediaviz.curated_albums.update_curated_album(
    '<ALBUM_ID>',
    name='<NAME>',
    description='<DESCRIPTION>',
    confidence_value='<CONFIDENCE_VALUE>'
)
$result = $mediaviz->curatedAlbums->updateCuratedAlbum(
  '<ALBUM_ID>',
  [
    'name' => '<NAME>',
    'description' => '<DESCRIPTION>',
    'confidenceValue' => '<CONFIDENCE_VALUE>'
  ]
);
curl -X PUT 'https://api.mediaviz.ai/api/v1/curated_album/<ALBUM_ID>' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo' \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "name": "<NAME>",
  "description": "<DESCRIPTION>",
  "confidence_value": "<CONFIDENCE_VALUE>"
}
JSON

Response Sample

{
  "id": 0,
  "project_table_name": "z-photos-1024-a1b2c3d4",
  "name": "string",
  "description": "string",
  "confidence_value": 0.0
}

Delete Curated Album

Deletes the album. The photos themselves are not deleted.

Request Sample

const result = await mediaviz.curatedAlbums.deleteCuratedAlbum('<ALBUM_ID>');
const result = await mediaviz.curatedAlbums.deleteCuratedAlbum('<ALBUM_ID>');
const result = await mediaviz.curatedAlbums.deleteCuratedAlbum('<ALBUM_ID>');
const { client } = useMediaViz();

const result = await client.curatedAlbums.deleteCuratedAlbum('<ALBUM_ID>');
result = mediaviz.curated_albums.delete_curated_album('<ALBUM_ID>')
$result = $mediaviz->curatedAlbums->deleteCuratedAlbum('<ALBUM_ID>');
curl -X DELETE 'https://api.mediaviz.ai/api/v1/curated_album/<ALBUM_ID>' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo'

Response Sample

{
  "delete of curated album 42": true
}

Convert Curated Album To Custom

Creates a new custom album with the curated album's name, description and photos; the curated album is kept. The id in the response is the new custom album's ID. The copy includes every photo linked to the curated album, regardless of its confidence threshold or similar-photo grouping, so it can contain more photos than Get Curated Album Photos returns.

Request Sample

const result = await mediaviz.curatedAlbums.convertCuratedAlbumToCustom('<ALBUM_ID>');
import type { CuratedAlbumDisplay } from '@mediaviz/sdk';

const result: CuratedAlbumDisplay = await mediaviz.curatedAlbums.convertCuratedAlbumToCustom('<ALBUM_ID>');
const result = await mediaviz.curatedAlbums.convertCuratedAlbumToCustom('<ALBUM_ID>');
const { client } = useMediaViz();

const result = await client.curatedAlbums.convertCuratedAlbumToCustom('<ALBUM_ID>');
result = mediaviz.curated_albums.convert_curated_album_to_custom('<ALBUM_ID>')
$result = $mediaviz->curatedAlbums->convertCuratedAlbumToCustom('<ALBUM_ID>');
curl -X POST 'https://api.mediaviz.ai/api/v1/curated_album/<ALBUM_ID>/convert' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzAxYWJjMTIzIiwiZXhwIjoxNzQzNjMwMzI5fQ.RwJF-KLLr8K5JgEtIeFiKWELcv-FDLNzMPHJ2St_wAo'

Response Sample

{
  "id": 43,
  "project_table_name": "z-photos-1024-a1b2c3d4",
  "name": "activities",
  "description": null,
  "confidence_value": null
}