在对应分组中创建 BytePlus 素材
curl --request POST \
--url https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"group_id": "group-20260927130220-tffhm",
"url": "https://media.example.com/example.jpg",
"name": "example.jpg",
"asset_type": "Image",
"request_key": "unique-request-key-0001"
}
'import requests
url = "https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets"
payload = {
"group_id": "group-20260927130220-tffhm",
"url": "https://media.example.com/example.jpg",
"name": "example.jpg",
"asset_type": "Image",
"request_key": "unique-request-key-0001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_id: 'group-20260927130220-tffhm',
url: 'https://media.example.com/example.jpg',
name: 'example.jpg',
asset_type: 'Image',
request_key: 'unique-request-key-0001'
})
};
fetch('https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'group_id' => 'group-20260927130220-tffhm',
'url' => 'https://media.example.com/example.jpg',
'name' => 'example.jpg',
'asset_type' => 'Image',
'request_key' => 'unique-request-key-0001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets"
payload := strings.NewReader("{\n \"group_id\": \"group-20260927130220-tffhm\",\n \"url\": \"https://media.example.com/example.jpg\",\n \"name\": \"example.jpg\",\n \"asset_type\": \"Image\",\n \"request_key\": \"unique-request-key-0001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"group_id\": \"group-20260927130220-tffhm\",\n \"url\": \"https://media.example.com/example.jpg\",\n \"name\": \"example.jpg\",\n \"asset_type\": \"Image\",\n \"request_key\": \"unique-request-key-0001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_id\": \"group-20260927130220-tffhm\",\n \"url\": \"https://media.example.com/example.jpg\",\n \"name\": \"example.jpg\",\n \"asset_type\": \"Image\",\n \"request_key\": \"unique-request-key-0001\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 123,
"asset_id": "<string>",
"group_id": "<string>",
"name": "<string>",
"asset_type": "Image",
"lifecycle_state": "Ready",
"upstream_status": "Processing",
"upstream_error_code": "<string>"
}
}素材上传与查询
创建素材
group_id 取建组或认证结果。url 可以使用上传素材源文件接口返回的 data.url,也可以直接使用公网可访问的 HTTPS URL。真人素材须与认证本人一致。同一逻辑请求重试须复用 request_key 及全部原字段。
POST
/
api
/
resource-channel
/
byteplus
/
{library}
/
assets
在对应分组中创建 BytePlus 素材
curl --request POST \
--url https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"group_id": "group-20260927130220-tffhm",
"url": "https://media.example.com/example.jpg",
"name": "example.jpg",
"asset_type": "Image",
"request_key": "unique-request-key-0001"
}
'import requests
url = "https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets"
payload = {
"group_id": "group-20260927130220-tffhm",
"url": "https://media.example.com/example.jpg",
"name": "example.jpg",
"asset_type": "Image",
"request_key": "unique-request-key-0001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_id: 'group-20260927130220-tffhm',
url: 'https://media.example.com/example.jpg',
name: 'example.jpg',
asset_type: 'Image',
request_key: 'unique-request-key-0001'
})
};
fetch('https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'group_id' => 'group-20260927130220-tffhm',
'url' => 'https://media.example.com/example.jpg',
'name' => 'example.jpg',
'asset_type' => 'Image',
'request_key' => 'unique-request-key-0001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets"
payload := strings.NewReader("{\n \"group_id\": \"group-20260927130220-tffhm\",\n \"url\": \"https://media.example.com/example.jpg\",\n \"name\": \"example.jpg\",\n \"asset_type\": \"Image\",\n \"request_key\": \"unique-request-key-0001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"group_id\": \"group-20260927130220-tffhm\",\n \"url\": \"https://media.example.com/example.jpg\",\n \"name\": \"example.jpg\",\n \"asset_type\": \"Image\",\n \"request_key\": \"unique-request-key-0001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.aionclaw.ai/api/resource-channel/byteplus/{library}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_id\": \"group-20260927130220-tffhm\",\n \"url\": \"https://media.example.com/example.jpg\",\n \"name\": \"example.jpg\",\n \"asset_type\": \"Image\",\n \"request_key\": \"unique-request-key-0001\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 123,
"asset_id": "<string>",
"group_id": "<string>",
"name": "<string>",
"asset_type": "Image",
"lifecycle_state": "Ready",
"upstream_status": "Processing",
"upstream_error_code": "<string>"
}
}授权
使用 Authorization: Bearer <API_KEY> 进行认证。
路径参数
AIGC 选择 virtual-assets;真人选择 real-human-assets。此变量只是文档复用,后端路径不变。
可用选项:
virtual-assets, real-human-assets 请求体
application/json