For the complete documentation index, see llms.txt. This page is also available as Markdown.

FsFiles

List the files and results

GET https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/files

This endpoint will not show the youtube channels/playlists results. Please replace {ContainerRegion} withthe region of your FS Container which is one of the following regions. Container Regions: eu-west-1,us-west-2,ap-southeast-1

Path Parameters

Name
Type
Description

container_id

number

The container id

Query Parameters

Name
Type
Description

page

number

The page number

per_page

number

The results number per page

search

string

Search by name or URI

with_result

number

1:list the files with results. 0:will not list the results (default)

state

String

0:processing 1:Ready (Recognize results from a file.) -1: No results (No results were recognized from the file.) -2,-3: Error

Headers

Name
Type
Description

Authorization

string

Bearer token

curl --location --request GET 'https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:your_container_id/files?page=1&per_page=20' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YourAccessToken'
import requests

url = "https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:your_container_id/files?page=1&per_page=20"

payload={}
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer token'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response descriptions

Field Name
Type
Description

id

String

The id of the file

uid

Integer

The id of the acrcloud console account

cid

Integer

The id of the fs container

name

String

The name of the file

duration

Integer

The duration of the audio file

uri

String

The uri of the file. if the data_type is audio/fingerprint format: audio:file_name if the data_type is audio_url format: audio_url:url_path if the data_type is platforms, such as youtube, twitter, tiktok... format: platform:video:platform_id youtube:video:7wtfhZwyrcc

data_type

String

audio: upload the audio file to the container fingerprint: upload the acrcloud fingerprint to the container audio_url: upload the http/https/ftp url to the container platforms: upload the platform url, such as https://www.youtube.com/watch?v=t3MWVt4GKy8

engine

Integer

What engine was used to recognize this file? 1: audio fingerprint 2: cover song identification 3: audio fingerprint & cover song identification 4: Speech recognition (STT) 5: AI Music Detection

count

Integer

This field is temporarily not in use.

state

Integer

Current state of the document: 0:processing 1:Ready (Recognize results from a file.) -1: No results (No results were recognized from the file.) -2,-3: Error

total

Integer

This field is temporarily not in use. The total sub-files does this file contains

results

JSON

{ "music":[], //audio fingerprint music results "cover_songs":[], // cover songs results "custom_files":[], // audio fingerprint custom files matched results "speech":[], //STT results "music_speech":[] // music/speech detection results.

"ai_detection":[] // AI music detection results. }

created_at

String

The creation time(UTC+0) of the file

updated_at

String

The update time(UTC+0) of the file

deepright

Bool

This field indicates whether Derivative Works Detection is enabled.

Upload a file or platform web URL

POST https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/files

Please replace {ContainerRegion} withthe region of your FS Container which is one of the following regions. Container Regions: eu-west-1,us-west-2,ap-southeast-1

Path Parameters

Name
Type
Description

container_id*

number

The container id

Headers

Name
Type
Description

Authorization*

string

Bearer token

Request Body

Name
Type
Description

file

object

The audio or fingerprint file, The audio/fingerprint file size needs to be less than 500MB.

data_type*

string

audio: Upload an audio file fingerprint: Upload a fingerprint file platforms: platforms url. Currently, supported platforms are Youtube,Twitter, Tiktok, Vimeo, Brightcove...etc. You can post the platform's web url to this endpoint. audio_url: Downloadable audio url. isrc: Supports posting ISRC data to the container. This data type is available when the container has derivative works detection or AI music detection enabled.

name

string

If you do not pass this parameter, we will use the file path or url path as the file name.

isrc

string

If you set the data_type is isrc, then this field input the value of the isrc.

Presigned Upload

Upload files directly to S3 using a presigned URL, bypassing the API server. Recommended for large files (>100MB) to avoid timeout issues.

This is a three-step process:

  1. Get a presigned URL — Request a temporary S3 upload URL from the API.

  2. Upload to S3 — PUT the file directly to S3 using the presigned URL.

  3. Submit file metadata — Notify the API that the file has been uploaded to trigger recognition.

Step 1: Get Presigned Upload URL

GET https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/presigned-upload

Query Parameters

Name
Location
Required
Description

filename

query

No

File name (e.g. song.mp3)

content_type

query

No

MIME type (default: audio/mpeg)

Headers

Name
Location
Required
Description

Authorization

header

Yes

Bearer {access_token}

Example

Response

Field
Description

presigned_url

Temporary S3 URL for direct upload (valid for 1 hour)

key

S3 object key, used in Step 3

method

HTTP method for upload (PUT)

headers

Required headers for the PUT request

expires_in

URL expiration time in seconds

file_id

Generated file ID

Step 2: Upload File to S3

PUT {presigned_url}

Headers

Header
Required
Description

Content-Type

Yes

Must match the content_type from Step 1

Example

Note: Do not send the Authorization header to S3. The presigned URL contains all necessary credentials.

Step 3: Submit File Metadata

After the file has been uploaded to S3, submit the file metadata to trigger the recognition process.

POST https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/files

Headers

Name
Location
Required
Description

Authorization

header

Yes

Bearer {access_token}

Content-Type

header

Yes

application/json

Request Body

Field
Required
Description

data_type

Yes

Must be audio

key

Yes

S3 object key from Step 1 response

filename

Yes

Original file name

Example

Response (201 Created)

Full Example (Python)

Comparison

Direct Upload (POST /files)
Presigned Upload

Max file size

Limited by Nginx/gunicorn timeout

No limit (S3 direct)

Server load

High (bandwidth + memory)

None (bypasses server)

Timeout risk

High for large files

Low

URL expiration

N/A

1 hour

Complexity

Simple (1 request)

3 requests

Error Handling

Status
Error
Solution

401

Unauthorized

Check access token

403

Forbidden

Check container permissions

404

Container not found

Verify container ID

410

Expired presigned URL

Request a new URL (Step 1)

502

Upload timeout

Use presigned upload instead of direct upload

Show the one file or multiple files's results

GET https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/files/:file_ids

Suit for getting the youtube channels/playlists results Please replace {ContainerRegion} withthe region of your FS Container which is one of the following regions. Container Regions: eu-west-1,us-west-2,ap-southeast-1

Path Parameters

Name
Type
Description

container_id

number

The container id

file_ids

string

The file ids, if you want to get multiple files, separate file IDs with comma.

Query Parameters

Name
Type
Description

page

string

The page number

per_page

string

The results number per page

Headers

Name
Type
Description

Authorization

string

Bearer token

Delete the files

DELETE https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/files/:ids

Please replace {ContainerRegion} withthe region of your FS Container which is one of the following regions. Container Regions: eu-west-1,us-west-2,ap-southeast-1

Path Parameters

Name
Type
Description

container_id

string

The container id

ids

string

The files ids, seperated by ","

Headers

Name
Type
Description

Authorization

string

Bearer token

Rescan the files

PUT https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/files/:file_id/rescan

Please replace {ContainerRegion} withthe region of your FS Container which is one of the following regions. Container Regions: eu-west-1,us-west-2,ap-southeast-1

Path Parameters

Name
Type
Description

container_id

String

The container id

file_ids

String

The file ids, separate by ','

Headers

Name
Type
Description

Authorization

String

Bearer token

Post result and state with json format to callback url

POST https://callback-url.com/path

Request Body

Name
Type
Description

file_id*

String

The file id

cid*

String

The container id

state*

String

1:Ready (Recognize results from a file.) -1: No results (No results were recognized from the file.) -2,-3: Error

results

String

if the state = 1, the results will be posted to the callback url

The format is: {

"music":[{},{}...],

"custom_files":[{},{},...],

"cover_files":[{},{},...] }

name

String

the file name

Download the integrated FS results

GET https://api-{ContainerRegion}.acrcloud.com/api/fs-containers/:container_id/reports

The entire container fs results will be downloaded if no query parameter is specified. Please replace {ContainerRegion} withthe region of your FS Container which is one of the following regions. Container Regions: eu-west-1,us-west-2,ap-southeast-1

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Path Parameters

Name
Type
Description

container_id

string

The fs container id

Query Parameters

Name
Type
Description

ids

string

filter by file ids, separate by commas

start_date

datetime

filter by start date, If filtered by time, both start_date and end_date need to exist simultaneously. format: YYYY-MM-DD

end_date

datetime

filter by end date, If filtered by time, both start_date and end_date need to exist simultaneously. format:YYYY-MM-DD

type

string

values: all, merged, music, cover_songs, custom. default value: all (Download all results and compress them into a zip file, which needs to be unzipped to access the results.) merged: csv content with merged all the results. music: csv content with music result cover_songs: csv content with cover_songs results custom: csv content with the results from customer's buckets

Examples

Last updated