tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Retrieving Album Cover

PDF
Focus Mode
Font Size
Last updated: 2026-01-07 14:52:07

Description

To obtain the album cover image.

API Description

Cover image retrieval rules: First, find the first media in the corresponding album or tenant space sorted by upload time. If it is an image, use that image. If it is a video, use the first frame of the video. Then, if the {Size} parameter is specified, prioritize intelligent zoom cropping with Face Recognition to {Size}px × {Size}px. If no human face is detected, center and scale crop to {Size}px × {Size}px. If the {Size} parameter is not specified, use the original image. Finally, navigate to the corresponding image URL with a 302 redirect.
You can directly specify this URL in the parameter for using images, such as the mini program <image> tag, HTML <img> tag, or mini program wx.previewImage API. This API will automatically 302 navigate to the actual image URL.

Request

Request Example


GET /api/v1/album/{LibraryId}/{SpaceId}/cover?size={Size}&access_token={AccessToken}&user_id={UserId} or GET /api/v1/album/{LibraryId}/{SpaceId}/cover/{AlbumName}?size={Size}&access_token={AccessToken}&user_id={UserId}
Request Parameters:
LibraryId: Media Library ID, required parameter.
SpaceId: Space ID. If the media library is in single-tenant mode, this parameter is fixed as a hyphen (-). If the media library is in multi-tenant mode, you must specify this parameter.
AlbumName: Album name. This parameter must be specified for album-based media libraries and cannot be specified for non-album media libraries.
AccessToken: Access token. For Public Read Media Library or tenant space, this parameter is not specified. Otherwise, you must specify this parameter.
UserId: User identity recognition. When the permission corresponding to the access token is admin permission and the user identity recognition during access token application is empty, it is used to temporarily specify user identity. For details, see Generate Access Token API. Optional parameter.

Request Body

This request has no request body.

Response

Response code

Successful retrieval, back HTTP 200 OK.

Response Body

The response body contains the file content.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback