diff --git a/app/api/rmbg/route.ts b/app/api/rmbg/route.ts index 588fb81d6..5d5669c15 100644 --- a/app/api/rmbg/route.ts +++ b/app/api/rmbg/route.ts @@ -181,11 +181,9 @@ export async function POST(request: NextRequest) { "Content-Type": "application/json", }; - // 如果配置了API Key,添加到请求头 + // 如果配置了API Key,添加到请求头(根据RMBG API文档要求使用X-API-Key) if (config.apiKey) { - headers["Authorization"] = `Bearer ${config.apiKey}`; - // 或者根据API文档要求添加,例如: - // headers["X-API-Key"] = config.apiKey; + headers["X-API-Key"] = config.apiKey; } const startTime = Date.now();