> For the complete documentation index, see [llms.txt](https://docs.acrcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acrcloud.com/reference/console-api/file-scanning.md).

# File Scanning

## Create a FS container

<mark style="color:green;">`POST`</mark> `https://api-v2.acrcloud.com/api/fs-containers`

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer your\_token |

#### Request Body

| Name                                          | Type   | Description                                                                                                                                                               |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>        | String | Your container name                                                                                                                                                       |
| region<mark style="color:red;">\*</mark>      | String | eu-west-1,us-west-2,ap-southeast-1                                                                                                                                        |
| audio\_type<mark style="color:red;">\*</mark> | String | <p>linein or recorded. Default is linein<br>linein: Audio of original file or stream without noise</p><p>recorded: Audio captured via microphone or noisy audio files</p> |
| buckets<mark style="color:red;">\*</mark>     | Array  | <p>The project detects content from the buckets. The format is bucket id/name array. For example:<br>\[8881,8882,"ACRCloud Music"]<br></p>                                |
| engine<mark style="color:red;">\*</mark>      | Number | <p>1:Audio Fingerprinting<br>2:Cover Songs<br>3:Audio Fingerprinting & Cover songs<br>4:Speech to Text<br>5: AI Music Detection</p>                                       |
| policy<mark style="color:red;">\*</mark>      | JSON   | <p>{"type":"traverse", "interval":0, "rec\_length:10}<br>or<br>{"type":"points", "points":3}</p>                                                                          |
| callback\_url                                 | String | Result callback url                                                                                                                                                       |
| deepright                                     | Bool   | <p>0 or 1<br>0: disable the derivative works detection<br>1: enable the derivative works detection</p>                                                                    |
| music\_detection                              | Bool   | <p>0 or 1<br>0: disable music/speech detection<br>1: enable music/speech detection</p>                                                                                    |
| ai\_detection                                 | Bool   | <p>0 or 1<br>0: disable ai detection<br>1: enable ai detection</p>                                                                                                        |

{% tabs %}
{% tab title="201: Created " %}

````json
```json
{
    "data": {
        "id": 123456,
        "uid": 123,
        "region": "eu-west-1",
        "name": "container name",
        "buckets": [
            {
                "id": 23,
                "name": "ACRCloud Music",
                "type": "ACRCloudFile",
                "metadata_template": null
            }
        ],
        "audio_type": "linein",
        "num": 1,
        "size": 14,
        "policy": {
            "type": "traverse",
            "interval": 0,
            "rec_length": 10,
            "ai_detection": 1,
            "deepright":true
        },
        "engine": 1,
        "callback_url": null,
        "created_at": "2023-04-28T07:53:40.000000Z",
        "updated_at": "2023-04-28T07:53:40.000000Z"
    }
}
```
````

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Python" %}

```python
import requests

url = "https://api-v2.acrcloud.com/api/fs-containers"

payload={
  "name":"test", 
  "region":"eu-west-1", 
  "buckets":[8881,8882,"ACRCloud Music"],
  "audio_type":"linein",
  "engine":1,
  "policy":{"type":"traverse", "interval":0, "rec_length":10}
}
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer token',
  'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, json=payload)

print(response.text)
```

{% endtab %}
{% endtabs %}

## Get all the containers

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/fs-containers`

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer your\_token |
| Content-Type                                    | String | application/json   |

#### Query Parameters

| Name   | Type   | Description                                                                          |
| ------ | ------ | ------------------------------------------------------------------------------------ |
| region | String | <p>list the continers in the region.<br>eu-west-1<br>us-west-2<br>ap-southeast-1</p> |
| name   | String | search by name                                                                       |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

## Update a container

<mark style="color:blue;">`PUT`</mark> `https://api-v2.acrcloud.com/api/fs-containers/:container_id`

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer your\_token |
| Content-Type                                    | String | application/json   |

#### Request Body

| Name                   | Type   | Description                                                                                                                                                               |
| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                   | String | Your container name                                                                                                                                                       |
| audio\_type            | String | <p>linein or recorded. Default is linein<br>linein: Audio of original file or stream without noise</p><p>recorded: Audio captured via microphone or noisy audio files</p> |
| buckets                | Array  | <p>The project detects content from the buckets. The format is bucket id/name array. For example:<br>\[8881,8882,"ACRCloud Music"]<br></p>                                |
| engine                 | Number | <p>1:Audio Fingerprinting<br>2:Cover Songs<br>3:Audio Fingerprinting & Cover songs<br>4:Speech to Text</p>                                                                |
| policy                 | JSON   | <p>{"type":"traverse", "interval":0, "rec\_length:10}<br>or<br>{"type":"points", "points":3}</p>                                                                          |
| callback\_url          | String | Result webhook url                                                                                                                                                        |
| callback\_sign\_secret | JSON   | {"kid":"xx","secret":"xxxx"}                                                                                                                                              |
| deepright              | Bool   | <p>0 or 1<br>0: disable the derivative works detection<br>1: enable the derivative works detection</p>                                                                    |
| music\_detection       | Bool   | <p>0 or 1<br>0: disable music/speech detection<br>1: enable music/speech detection</p>                                                                                    |
| ai\_detection          | Bool   | <p>0 or 1<br>0: disable ai detection<br>1: enable ai detection</p>                                                                                                        |

{% tabs %}
{% tab title="Python" %}

```python
import requests

url = "https://api-v2.acrcloud.com/api/fs-containers/123456"

payload={
  "name":"test", 
  "buckets":["ACRCloud Music"],
  "audio_type":"linein",
  "engine":1,
  "policy":{"type":"traverse", "interval":0, "rec_length":10},
  "deepright":1
}
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer token',
  'Content-Type': 'application/json'
}

response = requests.(url, headers=headers, json=payload)

print(response.text)
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="200: Ok " %}

````json
```json
{
    "data": {
        "id": 123456,
        "uid": 123,
        "region": "eu-west-1",
        "name": "container name",
        "buckets": [
            {
                "id": 23,
                "name": "ACRCloud Music",
                "type": "ACRCloudFile",
                "metadata_template": null
            }
        ],
        "audio_type": "linein",
        "num": 1,
        "size": 14,
        "policy": {
            "type": "traverse",
            "interval": 0,
            "rec_length": 10,
            "ai_detection": 1,
            "deepright":true
        },
        "engine": 1,
        "callback_url": null,
        "created_at": "2023-04-28T07:53:40.000000Z",
        "updated_at": "2023-04-28T07:53:40.000000Z"
    }
}
```
````

{% endtab %}
{% endtabs %}

## Show one container

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/fs-containers/:container_id`

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer your\_token |
| Content-Type                                    | String | application/json   |

{% tabs %}
{% tab title="200: OK " %}

```
{
    "data": {
        "id": 123456,
        "uid": 123,
        "region": "eu-west-1",
        "name": "container name",
        "buckets": [
            {
                "id": 23,
                "name": "ACRCloud Music",
                "type": "ACRCloudFile",
                "metadata_template": null
            }
        ],
        "audio_type": "linein",
        "num": 1,    //the number of the files in the container
        "size": 14,  //the total duration(seconds) of the uploaded files in this container
        "policy": {
            "type": "traverse",
            "interval": 0,
            "rec_length": 10
        },
        "engine": 1,
        "callback_url": null,
        "created_at": "2023-04-28T07:53:40.000000Z",
        "updated_at": "2023-04-28T07:53:40.000000Z"
    }
}
```

{% endtab %}
{% endtabs %}

## Delete one container

<mark style="color:red;">`DELETE`</mark> `https://api-v2.acrcloud.com/api/fs-containers/:container_id`

#### Path Parameters

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| container\_id<mark style="color:red;">\*</mark> | Number | The Container ID |

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer your\_token |
| Content-Type                                    | String | application/json   |

{% tabs %}
{% tab title="204: No Content " %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.acrcloud.com/reference/console-api/file-scanning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
