# 批量开通资源

> 全部文档的索引见 [llms.txt](https://ark.volcengine.com/llms.txt)；在任一文档页面地址后追加 `.md` 可获取该页的 Markdown 版本。

`POST https://ark.cn-beijing.volcengineapi.com/?Action=ActivateResources&Version=2024-01-01`

批量开通当前账号的产品服务，适用于 Managed Agents，以及应用组件库中的豆包助手 API、产物验证服务。通过 `ResourceType` 指定服务类型，通过 `ResourceNames` 指定该服务下的开通项。

## 鉴权

本接口支持鉴权方式如下，详情请参见 [Base URL 及鉴权](/docs/base-url-and-authentication)。

* Access Key 鉴权，请在 [Access Key 管理](https://console.volcengine.com/iam/keymanage) 页面，获取 Access Key。本接口仅支持 Access Key 鉴权。

---

<span id="request-parameters"></span>
## 请求参数

### Body 参数

**ResourceNames** `string[]` `必选` | 资源名称列表

该服务类型下的开通项名称列表，不能为空，不允许空字符串或重复项。取值须与 `ResourceType` 匹配。

**ResourceType** `string` `必选` | 资源类型

服务类型，产品与取值的对应关系见下方说明。一次请求指定一种类型。

| 控制台产品或服务 | `ResourceType` | `ResourceNames` |
| --- | --- | --- |
| Managed Agents | `DataManagedAgentSum` |* `sandbox`：Agent 运行时 | \
| | |* `web_search`：豆包网页搜索。控制台开通时同时提交这两项。 |
| 应用组件库 > 豆包助手 API | `PluginSum` |* `chat`：日常沟通 | \
| | |* `deep_chat`：深度沟通 | \
| | |* `ai_search`：联网搜索 | \
| | |* `reasoning_search`：边想边搜。在控制台开通豆包助手 API 时，系统会同时提交上述四个取值。 |
| 应用组件库 > 其他服务 > 产物验证 | `OfficialVerifySum` |* `seedance_watermark`：产物验证。 | \
|  |  |  |

同为搜索能力，Managed Agents 使用 `DataManagedAgentSum` 和 `web_search`，豆包助手 API 使用 `PluginSum` 和 `ai_search` 或 `reasoning_search`。类型和名称不能混用。

**DryRun** `boolean` | 是否预检查

是否仅进行预检查。将 `DryRun` 设置为 `true` 时，不实际开通资源；设置为 `false` 时，正式开通资源。

## 响应参数
本接口无特有的返回参数，成功时 HTTP 状态码为 `200`，返回结构中 `Result` 为空对象 `{}`。


## 代码示例

## Managed Agents

### cURL

#### Request

```bash
curl 'https://ark.cn-beijing.volcengineapi.com/?Action=ActivateResources&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{
    "ResourceType": "DataManagedAgentSum",
    "ResourceNames": [
        "sandbox",
        "web_search"
    ],
    "DryRun": false
}
'
```

#### Response

```
{
    "ResponseMetadata": {
        "RequestId": "20260923120528A1B2C3D4E5F607182A",
        "Action": "ActivateResources",
        "Version": "2024-01-01",
        "Service": "ark",
        "Region": "cn-beijing"
    },
    "Result": {}
}
```

## 豆包助手 API

### cURL

#### Request

```bash
curl 'https://ark.cn-beijing.volcengineapi.com/?Action=ActivateResources&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{
    "ResourceType": "PluginSum",
    "ResourceNames": [
        "chat",
        "deep_chat",
        "ai_search",
        "reasoning_search"
    ],
    "DryRun": false
}
'
```

#### Response

```
{
    "ResponseMetadata": {
        "RequestId": "20260923120528A1B2C3D4E5F607182A",
        "Action": "ActivateResources",
        "Version": "2024-01-01",
        "Service": "ark",
        "Region": "cn-beijing"
    },
    "Result": {}
}
```

## 产物验证

### cURL

#### Request

```bash
curl 'https://ark.cn-beijing.volcengineapi.com/?Action=ActivateResources&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{
    "ResourceType": "OfficialVerifySum",
    "ResourceNames": [
        "seedance_watermark"
    ],
    "DryRun": false
}
'
```

#### Response

```
{
    "ResponseMetadata": {
        "RequestId": "20260923120528A1B2C3D4E5F607182A",
        "Action": "ActivateResources",
        "Version": "2024-01-01",
        "Service": "ark",
        "Region": "cn-beijing"
    },
    "Result": {}
}
```
