|
|
@@ -683,7 +683,7 @@ class AIVideoGenerationService
|
|
|
// 网关配置:默认百度AI网关;快快AI可传 https://ai-api.kkidc.com + gateway_path_prefix=/sd
|
|
|
'gateway_base_url' => $params['gateway_base_url'] ?? 'https://ai-gateway.baidubce.com',
|
|
|
'gateway_path_prefix' => $params['gateway_path_prefix'] ?? '',
|
|
|
- // 网关类型:baidu=国内百度、baidu_dreamina=海外百度真人素材空间、kuaikuai=快快AI
|
|
|
+ // 网关类型:baidu=国内百度、baidu_dreamina=海外百度(默认素材空间)、kuaikuai=快快AI
|
|
|
'gateway_kind' => $params['gateway_kind'] ?? ($isDreaminaModel ? 'baidu_dreamina' : 'baidu'),
|
|
|
'api_key_env' => $params['api_key_env'] ?? ($isDreaminaModel ? 'BAIDU_DREAMINA_AK' : 'BAIDU_SEEDANCE_20_AK'),
|
|
|
],
|
|
|
@@ -733,7 +733,7 @@ class AIVideoGenerationService
|
|
|
if (strpos($gatewayBaseUrl, 'ai-api.kkidc.com') !== false || $gatewayPathPrefix === '/sd') {
|
|
|
$content = $this->convertKuaikuaiContentImagesToAssets($content);
|
|
|
} elseif ($isDreaminaGateway) {
|
|
|
- // 海外百度真人素材需上传到 target-asset-space=dreamina-seedance-livenessface 资产空间
|
|
|
+ // 海外百度素材走独立AK的默认素材空间(暂不使用 dreamina-seedance-livenessface 真人空间请求头)
|
|
|
$content = $this->convertDreaminaContentImagesToAssets($content);
|
|
|
} else {
|
|
|
$content = $this->convertSeedance20ContentImagesToAssets($content);
|
|
|
@@ -2504,8 +2504,15 @@ class AIVideoGenerationService
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 调用海外百度AI网关真人素材接口(dreamina真人资产空间)
|
|
|
- * 与国内百度素材库的区别:使用独立AK,且真人素材相关接口需携带 target-asset-space 请求头
|
|
|
+ * 调用海外百度AI网关素材接口
|
|
|
+ * 与国内百度素材库的区别:使用独立AK(BAIDU_DREAMINA_AK),素材存放于海外账号默认素材空间
|
|
|
+ *
|
|
|
+ * 注意:真人素材空间请求头(target-asset-space: dreamina-seedance-livenessface)
|
|
|
+ * 当前确认暂不使用,先注释保留:
|
|
|
+ * - 实测该真人空间不支持 CreateAssetGroup(HTTP 424 UNIFY_ROUTE_UNSUPPORTED),
|
|
|
+ * 且 ListAssetGroups 查询不到素材组明细,代码无法自动建组;
|
|
|
+ * - 不带该请求头时,海外AK的默认素材空间可正常 建组/创建素材/素材立即可用,
|
|
|
+ * 国内版与海外版素材互不共享(账号与区域隔离),素材类型需按请求模型区分。
|
|
|
*
|
|
|
* @param string $action 接口Action(CreateAssetGroup/CreateAsset/GetAsset等)
|
|
|
* @param array $body 请求体
|
|
|
@@ -2523,7 +2530,8 @@ class AIVideoGenerationService
|
|
|
'headers' => [
|
|
|
'Authorization' => 'Bearer ' . $apiKey,
|
|
|
'Content-Type' => 'application/json',
|
|
|
- 'target-asset-space' => 'dreamina-seedance-livenessface',
|
|
|
+ // 真人素材空间请求头暂不使用(见方法注释),保留以备后续真人空间流程启用
|
|
|
+ // 'target-asset-space' => 'dreamina-seedance-livenessface',
|
|
|
],
|
|
|
'json' => $body,
|
|
|
]);
|