Skip to content

🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"

TypeScript

feat: 火宝快捷配置支持国内/国外节点选择

Connora8a2f023194f
diff --git a/README.zh-CN.md b/README.zh-CN.md
index f4aa1da..8907e65 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -13,7 +13,7 @@
[功能特性](#-功能特性) • [快速开始](#-快速开始) • [图文教程](#-图文教程) • [桌面版](#-桌面应用推荐) • [部署指南](#-部署指南)
-<h2>🔑 <a href="https://api.firemux.com">获取 Huobao API Key 👉 立即查看</a></h2>
+<h2>🔑 <a href="https://api.firemux.cn">获取 Huobao API Key 👉 立即查看</a></h2>
**文本 · 图片 · 视频全部 AI 能力,一个 Key 即可开通**
@@ -200,7 +200,7 @@ cd backend && npx tsx scripts/import-mysql-to-sqlite.ts
启动后所有 AI 功能(文本/生图/视频)都需要先配置模型服务,未配置时页面顶部会有横幅引导:
1. 打开「设置」页
-2. 在「火宝快捷配置」中粘贴 Huobao API Key([前往 api.firemux.com 获取](https://api.firemux.com)),一键写入文本、图片、视频三条推荐配置
+2. 在「火宝快捷配置」中粘贴 Huobao API Key([前往 api.firemux.cn 获取](https://api.firemux.cn)),一键写入文本、图片、视频三条推荐配置
3. 或使用「手动模板」按厂商逐个添加,支持连通性测试
配置完成横幅自动消失,即可开始创建剧集生产。
@@ -330,7 +330,7 @@ npm run dist:win # Windows NSIS 安装器(win-x64,可在 macOS 上交叉
- 用户数据目录:`~/Library/Application Support/HuobaoDrama/`(数据库、生成的媒体、技能在线编辑的副本)
- 内置 FFmpeg/FFprobe 二进制,无需系统安装
- Electron 锁定 37.x:better-sqlite3 的 win32 预编译最高覆盖到该版本的 ABI(交叉打包免编译的关键)
-- 应用内点击外部链接(如「前往 api.firemux.com 获取 Key」)直接用系统浏览器打开
+- 应用内点击外部链接(如「前往 api.firemux.cn 获取 Key」)直接用系统浏览器打开
#### 🔄 应用内更新(无需 Apple 签名)
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index 58da6fb..68bd0b9 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -218,7 +218,7 @@ function createWindow() {
// 页面标题自带产品名,避免文件路径兜底标题
mainWindow.on('page-title-updated', e => e.preventDefault())
mainWindow.on('closed', () => { mainWindow = null })
- // 外链一律交给系统浏览器:应用内不弹新窗(如设置页「前往 api.firemux.com 获取 Key」)
+ // 外链一律交给系统浏览器:应用内不弹新窗(如设置页「前往 api.firemux.cn 获取 Key」)
const isAppUrl = (url: string) => url.startsWith(`http://127.0.0.1:${backendPort}`)
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (/^https?:\/\//i.test(url) && !isAppUrl(url)) void shell.openExternal(url)
diff --git a/frontend/app/locales/en.json b/frontend/app/locales/en.json
index c1d998d..dedcf47 100644
--- a/frontend/app/locales/en.json
+++ b/frontend/app/locales/en.json
@@ -271,7 +271,9 @@
"quickTitle": "Huobao Quick Config",
"recommended": "Recommended",
"quickDesc": "Enter a Huobao API Key to write three recommended configs (text, image, video) at once.",
- "getKey": "Get a key at api.firemux.com",
+ "getKey": "Get a Huobao API key",
+ "regionCn": "China",
+ "regionCom": "Global",
"applyQuick": "Apply Huobao Config",
"manualTitle": "Manual Templates",
"manualDesc": "Pick a service type, then fill the recommended `provider / base URL / model` from a template.",
diff --git a/frontend/app/locales/ja.json b/frontend/app/locales/ja.json
index 930bd78..acd42a1 100644
--- a/frontend/app/locales/ja.json
+++ b/frontend/app/locales/ja.json
@@ -271,7 +271,9 @@
"quickTitle": "火宝クイック設定",
"recommended": "おすすめ",
"quickDesc": "Huobao API Key を入力すると、テキスト・画像・動画の 3 つの推奨設定を一括で書き込みます。",
- "getKey": "api.firemux.com で Key を取得",
+ "getKey": "Huobao API Key を取得",
+ "regionCn": "国内",
+ "regionCom": "海外",
"applyQuick": "火宝設定を書き込む",
"manualTitle": "手動テンプレート",
"manualDesc": "サービスタイプを選ぶと、推奨の `provider / base URL / model` がテンプレートから入力されます。",
diff --git a/frontend/app/locales/ko.json b/frontend/app/locales/ko.json
index 304b398..9e3c4e5 100644
--- a/frontend/app/locales/ko.json
+++ b/frontend/app/locales/ko.json
@@ -271,7 +271,9 @@
"quickTitle": "화바오 빠른 설정",
"recommended": "추천",
"quickDesc": "Huobao API Key를 입력하면 텍스트·이미지·영상 세 개의 추천 설정을 한 번에 작성합니다.",
- "getKey": "api.firemux.com에서 Key 받기",
+ "getKey": "Huobao API Key 받기",
+ "regionCn": "중국",
+ "regionCom": "해외",
"applyQuick": "화바오 설정 작성",
"manualTitle": "수동 템플릿",
"manualDesc": "서비스 유형을 선택하면 추천 `provider / base URL / model`이 템플릿에서 입력됩니다.",
diff --git a/frontend/app/locales/zh.json b/frontend/app/locales/zh.json
index 76d3933..0df0067 100644
--- a/frontend/app/locales/zh.json
+++ b/frontend/app/locales/zh.json
@@ -271,7 +271,9 @@
"quickTitle": "火宝快捷配置",
"recommended": "推荐",
"quickDesc": "输入 Huobao API Key,一次写入文本、图片、视频三条推荐配置。",
- "getKey": "前往 api.firemux.com 获取 Key",
+ "getKey": "前往火宝获取 Key",
+ "regionCn": "国内",
+ "regionCom": "国外",
"applyQuick": "写入火宝配置",
"manualTitle": "手动模板",
"manualDesc": "选择服务类型后,直接用模板填充推荐的 `provider / base URL / model`。",
diff --git a/frontend/app/pages/settings.vue b/frontend/app/pages/settings.vue
index 55a4ef2..cb0be43 100644
--- a/frontend/app/pages/settings.vue
+++ b/frontend/app/pages/settings.vue
@@ -85,13 +85,25 @@
</div>
<p class="setup-desc">
{{ t('settings.ai.quickDesc') }}
- <a class="huobao-site-link" href="https://api.firemux.com" target="_blank" rel="noopener noreferrer">
+ <a class="huobao-site-link" :href="huobaoSiteUrl" target="_blank" rel="noopener noreferrer">
{{ t('settings.ai.getKey') }}
<ExternalLink :size="12" :stroke-width="1.8" />
</a>
</p>
<div class="huobao-quick-row">
<input v-model="huobaoApiKey" class="input" type="password" placeholder="Huobao API Key" />
+ <div class="lang-picker">
+ <button
+ type="button"
+ :class="['lang-option', { on: huobaoRegion === 'cn' }]"
+ @click="huobaoRegion = 'cn'"
+ >{{ t('settings.ai.regionCn') }}</button>
+ <button
+ type="button"
+ :class="['lang-option', { on: huobaoRegion === 'com' }]"
+ @click="huobaoRegion = 'com'"
+ >{{ t('settings.ai.regionCom') }}</button>
+ </div>
<button class="btn btn-primary" :disabled="huobaoSaving" @click="applyHuobaoQuickConfig">
<Loader2 v-if="huobaoSaving" :size="13" class="animate-spin" />
<Sparkles v-else :size="13" />
@@ -685,7 +697,7 @@ import { providerIconUrl } from '~/composables/useProviderIcon'
import { startTour, autoTour } from '~/composables/useTour'
import { confirmUnifiedLanguage } from '~/composables/useUnifiedLanguage'
-const { t } = useI18n()
+const { t, locale } = useI18n()
const showBrandImage = ref(true)
const tab = ref('ai')
@@ -706,6 +718,9 @@ const cfgTesting = ref(false)
const cfgTestResult = ref(null)
const huobaoApiKey = ref('')
const huobaoSaving = ref(false)
+// 火宝节点选择:默认跟随界面语言(中文→国内 .cn,其他→国外 .com),一键配置与取 Key 链接共用
+const huobaoRegion = ref(locale.value?.startsWith('zh') ? 'cn' : 'com')
+const huobaoSiteUrl = computed(() => `https://api.firemux.${huobaoRegion.value}`)
const cfgForm = reactive({ name: '', provider: '', api_key: '', base_url: '', models: [], service_type: 'text', priority: 0, temperature: '' })
// 模型标签编辑器:首位即默认模型;输入框支持回车添加、逗号/换行批量粘贴
const modelInput = ref('')
@@ -756,15 +771,18 @@ const providerPresets = {
minimax: { label: 'MiniMax H3 官方', baseUrl: 'https://api.minimaxi.com', models: ['MiniMax-H3'] },
},
}
-const huobaoQuickConfigs = [
- { service_type: 'text', provider: 'gemini', name: '火宝文本服务 · Gemini', base_url: 'https://api.firemux.com', model: ['gemini-3.8-flash', 'gemini-3.1-pro-preview', 'gemini-3-flash-preview'], priority: 101 },
- { service_type: 'text', provider: 'openai', name: '火宝文本服务 · OpenAI', base_url: 'https://api.firemux.com', model: ['deepseek-v4-pro', 'deepseek-v4-flash', 'gpt-5.6-terra'], priority: 100 },
- { service_type: 'image', provider: 'openai', name: '火宝图片服务 · OpenAI', base_url: 'https://api.firemux.com', model: ['gpt-image-2'], priority: 99 },
- { service_type: 'image', provider: 'gemini', name: '火宝图片服务 · Gemini', base_url: 'https://api.firemux.com', model: ['gemini-3-pro-image', 'gemini-3.1-flash-image'], priority: 97 },
- { service_type: 'video', provider: 'aliyun', name: '火宝视频服务 · Wan 3.0', base_url: 'https://api.firemux.com/qwen', model: ['wan3.0-video', 'wan3.0-video-prime'], priority: 97 },
- { service_type: 'video', provider: 'volcengine', name: '火宝视频服务 · Seedance', base_url: 'https://api.firemux.com/volcengine', model: ['doubao-seedance-2-0-mini-260615', 'doubao-seedance-2-0-fast-260128', 'doubao-seedance-2-0-260128'], priority: 96 },
- { service_type: 'video', provider: 'minimax', name: '火宝视频服务 · MiniMax', base_url: 'https://api.firemux.com/minimax', model: ['MiniMax-H3'], priority: 98 },
-]
+const huobaoQuickConfigs = computed(() => {
+ const base = huobaoSiteUrl.value
+ return [
+ { service_type: 'text', provider: 'gemini', name: '火宝文本服务 · Gemini', base_url: base, model: ['gemini-3.8-flash', 'gemini-3.1-pro-preview', 'gemini-3-flash-preview'], priority: 101 },
+ { service_type: 'text', provider: 'openai', name: '火宝文本服务 · OpenAI', base_url: base, model: ['deepseek-v4-pro', 'deepseek-v4-flash', 'gpt-5.6-terra'], priority: 100 },
+ { service_type: 'image', provider: 'openai', name: '火宝图片服务 · OpenAI', base_url: base, model: ['gpt-image-2'], priority: 99 },
+ { service_type: 'image', provider: 'gemini', name: '火宝图片服务 · Gemini', base_url: base, model: ['gemini-3-pro-image', 'gemini-3.1-flash-image'], priority: 97 },
+ { service_type: 'video', provider: 'aliyun', name: '火宝视频服务 · Wan 3.0', base_url: `${base}/qwen`, model: ['wan3.0-video', 'wan3.0-video-prime'], priority: 97 },
+ { service_type: 'video', provider: 'volcengine', name: '火宝视频服务 · Seedance', base_url: `${base}/volcengine`, model: ['doubao-seedance-2-0-mini-260615', 'doubao-seedance-2-0-fast-260128', 'doubao-seedance-2-0-260128'], priority: 96 },
+ { service_type: 'video', provider: 'minimax', name: '火宝视频服务 · MiniMax', base_url: `${base}/minimax`, model: ['MiniMax-H3'], priority: 98 },
+ ]
+})
function byType(t) { return cfgs.value.filter(c => c.service_type === t) }
function countActive(t) { return byType(t).filter(c => c.is_active).length }
@@ -824,7 +842,7 @@ async function applyHuobaoQuickConfig() {
if (!apiKey) { toast.warning(t('settings.ai.apiKeyRequired')); return }
huobaoSaving.value = true
try {
- for (const preset of huobaoQuickConfigs) {
+ for (const preset of huobaoQuickConfigs.value) {
const payload = { ...preset, api_key: apiKey }
const existing = cfgs.value.find(c => c.name === preset.name || (c.service_type === preset.service_type && c.provider === preset.provider && c.base_url === preset.base_url))
if (existing) await aiConfigAPI.update(existing.id, payload)
@@ -1429,8 +1447,9 @@ onBeforeUnmount(stopUsagePoll)
.huobao-site-link:hover { text-decoration: underline; }
.huobao-quick-row {
display: grid;
- grid-template-columns: minmax(0, 1fr) auto;
+ grid-template-columns: minmax(0, 1fr) auto auto;
gap: 10px;
+ align-items: center;
}
.huobao-quick-models {
margin-top: 14px;