diff --git a/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java b/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java index 3895f19..3885ab7 100644 --- a/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java +++ b/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java @@ -98,7 +98,7 @@ public class ByteApiController extends BaseController { ByteBodyReq byteBodyReq = new ByteBodyReq(); // model由前端传入,默认为Seedance 2.0 byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ? - request.getModel() : "ep-20260326165811-dlkth"); + request.getModel() : "doubao-seedance-2.0"); byteBodyReq.setPrompt(text); byteBodyReq.setSequential_image_generation("disabled"); byteBodyReq.setResponse_format("url"); @@ -256,7 +256,7 @@ public class ByteApiController extends BaseController { ByteBodyReq byteBodyReq = new ByteBodyReq(); // model由前端传入,默认为Seedance2.0 byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ? - request.getModel() : "ep-20260326165811-dlkth"); + request.getModel() : "doubao-seedance-2.0"); byteBodyReq.setCallback_url(volcCallbackUrl); // 构建符合火山引擎格式的content diff --git a/web-api/ruoyi-admin/src/main/resources/application.yml b/web-api/ruoyi-admin/src/main/resources/application.yml index 682f0d1..489da34 100644 --- a/web-api/ruoyi-admin/src/main/resources/application.yml +++ b/web-api/ruoyi-admin/src/main/resources/application.yml @@ -224,14 +224,14 @@ tencentCos: # domain: https://images.iqyjsnwv.com/ byteapi: - url: https://ark.ap-southeast.bytepluses.com/api/v3 + url: http://zlhub.xiaowaiyou.cn/zhonglian apiKey: callBackUrl: https://undressing.top # 火山引擎 Ark API (Seedance 2.0) volcengine: ark: - baseUrl: https://ark.cn-beijing.volces.com + baseUrl: http://zlhub.xiaowaiyou.cn/zhonglian apiKey: callbackUrl: https://undressing.top/api/ai/volcCallback @@ -241,15 +241,13 @@ portal: # 与库表 ai_manager.type 一致(用于扣费);若报错 functionType does not exist,请插入对应 type 或改此处与库一致 function-type: "21" defaults: - model: ep-20260326165811-dlkth + model: doubao-seedance-2.0 duration: 4 resolution: 720p ratio: "3:4" models: - label: Seedance 2.0 - value: ep-20260326165811-dlkth - - label: Seedance 2.0 Fast - value: ep-20260326170056-dkj9m + value: doubao-seedance-2.0 ratios: - "16:9" - "9:16" diff --git a/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java b/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java index 120f9eb..0059f44 100644 --- a/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java +++ b/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java @@ -99,7 +99,7 @@ public class ByteService implements IByteService { String jsonBody = objectMapper.writeValueAsString(req); Request request = new Request.Builder() - .url(volcBaseUrl + "/api/v3/contents/generations/tasks") + .url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks") .header("Content-Type", "application/json") .header("Authorization", "Bearer " + arkApiKey) .post(RequestBody.create( @@ -138,7 +138,7 @@ public class ByteService implements IByteService { } Request request = new Request.Builder() - .url(volcBaseUrl + "/api/v3/contents/generations/tasks/" + id) + .url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks/" + id) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + arkApiKey) .get() @@ -175,7 +175,7 @@ public class ByteService implements IByteService { try { Request request = new Request.Builder() - .url(volcBaseUrl + "/api/v3/contents/generations/tasks/" + id) + .url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks/" + id) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + arkApiKey) .delete() @@ -202,7 +202,7 @@ public class ByteService implements IByteService { int pn = pageNum > 0 ? pageNum : 1; int ps = pageSize > 0 ? Math.min(pageSize, 500) : 10; - HttpUrl parsed = HttpUrl.parse(volcBaseUrl + "/api/v3/contents/generations/tasks"); + HttpUrl parsed = HttpUrl.parse(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks"); if (parsed == null) { throw new Exception("listVideoGenerationTasks error:invalid base url"); }