FsFiles
List the files and results
GET
https://api-v2.acrcloud.com/api/fs-containers/:container_id/files
This endpoint will not show the youtube channels/playlists results.
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: Error |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token |
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) |
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: 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. } |
created_at | String | The creation time(UTC+0) of the file |
updated_at | String | The update time(UTC+0) of the file |
Upload a file or platforms web url
POST
https://api-v2.acrcloud.com/api/fs-containers/:container_id/files
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, "audio" data_type requires this field. |
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. |
url | string | If the datatype is platforms or audio_url, you need to add this parameter. For example: https://www.youtube.com/watch?v=d_xYl5hpiRs https://twitter.com/i/status/1439937773885079552 https://www.facebook.com/mlb/videos/1009106336326140 https://www.tiktok.com/@pepiyearsong/video/6954003071336779009 https://www.instagram.com/p/CQz5NlrDeXW/ https://vimeo.com/54763818 |
name | String | If you do not pass this parameter, we will use the file path or url path as the file name. |
Show the one file or more files's results
GET
https://api-v2.acrcloud.com/api/fs-containers/:container_id/files/:file_id
Suit for getting the youtube channels/playlists results
Path Parameters
Name | Type | Description |
---|---|---|
container_id | number | The container id |
file_id | number | The file id |
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-v2.acrcloud.com/api/fs-containers/:container_id/files/:ids
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-v2.acrcloud.com/api/fs-containers/:container_id/files/:file_id/rescan
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: Error |
results | String | if the state = 1, the results will be posted to the callback url The format is: { "music":[{},{}...], "custom_files":[{},{},...], "cover_files":[{},{},...] } |
Last updated