Cloudreve API Docs
  1. File
Cloudreve API Docs
  • Site
    • Ping
      GET
    • Get CAPTCHA
      GET
    • Get site settings
      GET
  • Session
    • Token
      • Password sign-in
      • Finish sign-in with 2FA
      • Refresh Token
      • Sign out
    • OpenID
      • Prepare OpenID sign-in
      • Finish OpenID sign-in
      • Unlink OpenID
    • Passkey
      • Prepare Passkey sign-in
      • Finish Passkey sign-in
    • Prepare login
      GET
  • User
    • Passkey
      • Prepare passkey registration
      • Finish passkey registration
      • Delete passkey
    • Setting
      • List available storage policies
      • List available nodes
      • Get preferences
      • Prepare enabling 2FA
      • Update preference setting
      • Update profile pricture
    • Sign up
    • Send reset password email
    • Reset password via temp link
    • Get profile picture
    • Get user
    • List user's share links
    • Get storage capacity
    • Search user
    • List credit changes
    • List payments
  • Callback
    • Complete OneDrive upload
    • Complete COS upload
    • Complete S3 upload
    • Complete OBS upload
  • Workflow
    • Remote Download
      • Create remote download
      • Select files to download
      • Cancel task
    • List tasks
    • Get task progress
    • Create archive
    • Extract archive
    • Relocate storage policy
    • Import external files
  • File
    • Permission
      • Set permission
      • Delete permission setting
    • Upload
      • Create upload session
      • Upload file chunk
      • Delete upload session
    • Pin
      • Pin to sidebar
      • Delete a pin
    • Version
      • Set file version
      • Delete file version
    • Direct Link
      • Create direct links
      • Delete direct link
    • List files
      GET
    • List file activities
      GET
    • Get file info
      GET
    • Get thumbnail URL
      GET
    • Update file content
      PUT
    • Create viewer session
      PUT
    • Create file
      POST
    • Rename file
      POST
    • Move or copy files
      POST
    • Create download URL
      POST
    • Restore from trash bin
      POST
    • Delete file
      DELETE
    • Force unlock
      DELETE
    • Patch metadata
      PATCH
    • Mount storage policy
      PATCH
    • Update view setting
      PATCH
  • Share
    • Create share link
    • Edit share link
    • Get share link info
    • List my share links
    • Delete share link
  • VAS
    • Payment
      • Create a payment
      • Get payment status
    • GiftCode
      • Check gift code
      • Redeem gift code
  • Group
    • List groups
  • WebDAV
    • List accounts
    • Create account
    • Update account
    • Delete account
  1. File

Get thumbnail URL

GET
/file/thumb
Auth: JWT Optional
Get the thumbnail URL of the given file.

How to decode obfuscated thumbnail URL?#

If obfuscated is set to true in the response, you need addition step to recover the original image URL.
Here's implementation for the decode functioin in multiple languages
JavaScript
Golang
Java
Python

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Query Params
uri
string 
optional
URI of the target file.
Example:
cloudreve://my/pic.png
Header Params
X-Cr-Context-Hint
string <uuid>
optional
Optional context hint to speed up DB queries. You can get its value from the response of listing files. It is recommended to set this header if you need to perform action on files that are just listed by List files API.
Example:
b832b998-7ece-4ffd-ba6b-afb64530ca70
X-Cr-Purchase-Ticket
string 
optional
Can be used to authenticate to paid share links with a anonymous identity. The ticket value can be obtained after an anonymous user purchase a paid share link.
Example:
1f63aa26-edc0-40ce-950a-cb4d4323158e

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/file/thumb?uri=cloudreve://my/pic.png' \
--header 'X-Cr-Context-Hint: b832b998-7ece-4ffd-ba6b-afb64530ca70' \
--header 'X-Cr-Purchase-Ticket: 1f63aa26-edc0-40ce-950a-cb4d4323158e'

Responses

🟢200Success
application/json
Body
data
object 
required
Response content. In some error type, e.g. lock conflicting errors, this field wil present details of the error, e.g. who is locking the current file.
url
string 
required
URL of the thumbnail image. Possibly be obfuscated if obfuscated is true. Please refer to the top of this document for how to decode it.
Example:
http://localhost:5173/api/v4/file/content/8BxU0/0/%5BSakurato%5D%20Sousou%20no%20Frieren%20%5B03%5D%5BAVC-8bit%201080p%20AAC%5D%5BCHS%5D.mp4.jpg?sign=9AGk__dPoeoKlvKaoN0kdg-3ptC9Mp66lY3AgN-vHws%3D%3A1749530110
obfuscated
boolean  | null 
optional
Whether the url is obfuscated.
expires
string <date-time>
required
Expire date of the thumbnail image.
Example:
2025-06-10T12:35:10.014076+08:00
code
integer 
required
Response code.
0 - Success.
Default:
0
Example:
0
msg
string 
optional
Human readable error message (if any).
error
string  | null 
optional
Internal error message, only visable in debug mode.
correlation_id
string <uuid> | null 
optional
Correlation ID of the request. Only presented on failed reqeust.
Example:
b4351ecc-ee1a-4455-bc94-2c3dbcc58538
Examples
{
    "code": 0,
    "data": {
        "url": "http://localhost:5173/api/v4/file/content/rd7cK/0/The%20Man.mp3.jpg?sign=es-PXHqamu0zpF5FtSGKwl6uQANJ7hdURC_hv1ndaSs%3D%3A1749530110",
        "expires": "2025-06-10T12:35:10.014076+08:00",
        "obfuscated": true
    },
    "msg": ""
}
Modified at 2025-06-24 02:52:55
Previous
Get file info
Next
Update file content
Built with