diff --git a/.env.example b/.env.example index 7df1fb93..cd6985e1 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ # Uncomment the line you use — placeholder values must stay commented out # OPENAI_API_KEY=your-openai-api-key-here # OPENROUTER_API_KEY=your-openrouter-api-key-here +# ATLASCLOUD_API_KEY=your-atlascloud-api-key-here # GEMINI_API_KEY=your-gemini-api-key-here # MOONSHOT_API_KEY=your-kimi-api-key-here # MIMO_API_KEY=your-mimo-api-key-here diff --git a/config/credentials.example.json b/config/credentials.example.json index 74960a28..7603bfd0 100644 --- a/config/credentials.example.json +++ b/config/credentials.example.json @@ -23,6 +23,11 @@ "wan": { "apiKey": "YOUR_DASHSCOPE_API_KEY" }, + "aiProvider": { + "provider": "atlascloud", + "apiKey": "YOUR_ATLASCLOUD_API_KEY", + "model": "qwen/qwen3.5-flash" + }, "channel": { "channelName": "Your Channel Name", "channelDescription": "Your channel description.", diff --git a/docs/providers.md b/docs/providers.md index 286a9b60..ede30530 100644 --- a/docs/providers.md +++ b/docs/providers.md @@ -11,13 +11,14 @@ Pick one in the walkthrough, or set its key in `.env`. The SDK base URL is confi | **Google Gemini** | `gemini-4-hydrogen` (default, free tier), `gemini-4-neon` (paid), `gemini-4-carbon` (paid), `gemini-3.8-flash`, `gemini-3.5-flash-lite` | [AI Studio](https://aistudio.google.com/apikey) | `GEMINI_API_KEY` | | **OpenAI** | `gpt-6.2-sol` (default), `gpt-6.2-astra`, `gpt-6.1-terra`, `gpt-6-luna` | [platform.openai.com](https://platform.openai.com/api-keys) | `OPENAI_API_KEY` | | **OpenRouter** | `openai/gpt-6.2-sol` (default) plus 400+ models; curated defaults verified against OpenRouter's live catalog (`anthropic/claude-fable-5.2`, `anthropic/claude-sonnet-5.5`, `google/gemini-4-hydrogen`, `moonshotai/kimi-k3.1-pro`, `z-ai/glm-5.3`, `deepseek/deepseek-v4.1-flash`, `minimax/minimax-m3.1-flash`) | [openrouter.ai](https://openrouter.ai/keys) | `OPENROUTER_API_KEY` | +| **Atlas Cloud** | `qwen/qwen3.5-flash` (default), `deepseek-ai/deepseek-v4-pro` (OpenAI-compatible gateway) | [console.atlascloud.ai](https://www.atlascloud.ai/console/api-keys) | `ATLASCLOUD_API_KEY` | | **Kimi (Moonshot AI)** | `kimi-k3.1-pro` (default), `kimi-k3.1-pro-highspeed`, `kimi-k3` | [platform.kimi.ai](https://platform.kimi.ai) | `MOONSHOT_API_KEY` | | **MiMo (Xiaomi)** | `mimo-v2.6-pro` (default), `mimo-v2.6-flash`, `mimo-v2.6-pro-ultraspeed` | [mimo.mi.com](https://mimo.mi.com) | `MIMO_API_KEY` | | **GLM (Zhipu AI)** | `glm-5.3` (default), `glm-5.3-flash`, `glm-5.3-prime` | [z.ai](https://z.ai) | `GLM_API_KEY` | | **DeepSeek** | `deepseek-flash` (default, DeepSeek-V4.1-Flash), `deepseek-v4-pro` | [platform.deepseek.com](https://platform.deepseek.com/api_keys) | `DEEPSEEK_API_KEY` | | **MiniMax** | `MiniMax-M3.1-Flash` (default), `MiniMax-M3` | [platform.minimax.io](https://platform.minimax.io/user-center/basic-information/interface-key) | `MINIMAX_TEXT_API_KEY` | -Anthropic Claude is available through OpenRouter (`anthropic/claude-fable-5.2`, `anthropic/claude-sonnet-5.5`, `anthropic/claude-opus-5.5`). OpenRouter, Kimi, MiMo, GLM, DeepSeek, and MiniMax cover scripts only. Add a Gemini or OpenAI key for images and narration, or ElevenLabs for narration. +Anthropic Claude is available through OpenRouter (`anthropic/claude-fable-5.2`, `anthropic/claude-sonnet-5.5`, `anthropic/claude-opus-5.5`). OpenRouter, Atlas Cloud, Kimi, MiMo, GLM, DeepSeek, and MiniMax cover scripts only. Add a Gemini or OpenAI key for images and narration, or ElevenLabs for narration. > **MiniMax keys:** Text generation uses `MINIMAX_TEXT_API_KEY`; video generation uses `MINIMAX_API_KEY`. They are separate on purpose so existing Gemini users with a MiniMax H3 video key aren't silently switched to MiniMax text. diff --git a/test.js b/test.js index 1b01b980..eb70b5c9 100644 --- a/test.js +++ b/test.js @@ -2668,6 +2668,11 @@ class SystemTest { throw new Error('OpenRouter configuration was incorrectly reported as missing credentials'); } + manager.credentials = { youtube: { client_id: 'x' }, aiProvider: { provider: 'atlascloud', apiKey: 'atlas-test' } }; + if (manager.getMissingCredentials().length !== 0) { + throw new Error('Atlas Cloud configuration was incorrectly reported as missing credentials'); + } + manager.credentials = { youtube: { client_id: 'x' } }; const missingProvider = manager.getMissingCredentials(); if (missingProvider.length !== 1 || !/AI provider/.test(missingProvider[0])) { diff --git a/utils/ai-text-service.js b/utils/ai-text-service.js index ad36294b..09a4e7e1 100644 --- a/utils/ai-text-service.js +++ b/utils/ai-text-service.js @@ -36,6 +36,13 @@ const PROVIDERS = { ], envKey: 'OPENROUTER_API_KEY', }, + atlascloud: { + name: 'Atlas Cloud', + baseURL: 'https://api.atlascloud.ai/v1', + defaultModel: 'qwen/qwen3.5-flash', + models: ['qwen/qwen3.5-flash', 'deepseek-ai/deepseek-v4-pro'], + envKey: 'ATLASCLOUD_API_KEY', + }, kimi: { name: 'Kimi (Moonshot AI)', baseURL: 'https://api.moonshot.ai/v1', diff --git a/utils/credential-manager.js b/utils/credential-manager.js index d43f2e36..8939f72c 100644 --- a/utils/credential-manager.js +++ b/utils/credential-manager.js @@ -260,6 +260,37 @@ class CredentialManager { console.log(chalk.green('OpenRouter configured successfully!')); } + // Atlas Cloud Setup + async setupAtlasCloudCredentials() { + console.log(chalk.cyan('\nAtlas Cloud Setup')); + console.log(chalk.gray('Get your API key from: https://www.atlascloud.ai/console/api-keys')); + + const answers = await inquirer.prompt([ + { + type: 'password', + name: 'apiKey', + message: 'Enter your Atlas Cloud API Key:', + validate: input => input.length > 0 || 'API key is required' + }, + { + type: 'list', + name: 'model', + message: 'Select default model:', + choices: ['qwen/qwen3.5-flash', 'deepseek-ai/deepseek-v4-pro'], + default: 'qwen/qwen3.5-flash' + } + ]); + + this.credentials.aiProvider = { + provider: 'atlascloud', + apiKey: answers.apiKey, + model: answers.model + }; + + await this.saveCredentials(); + console.log(chalk.green('Atlas Cloud credentials configured successfully!')); + } + // Kimi (Moonshot AI) Setup async setupKimiCredentials() { console.log(chalk.cyan('\nKimi (Moonshot AI) Setup')); @@ -599,7 +630,7 @@ class CredentialManager { } if (!this.hasAITextProvider()) { - missing.push('an AI provider (OpenAI, Gemini, OpenRouter, Kimi, MiMo, GLM, DeepSeek, or MiniMax)'); + missing.push('an AI provider (OpenAI, Gemini, OpenRouter, Atlas Cloud, Kimi, MiMo, GLM, DeepSeek, or MiniMax)'); } return missing; @@ -706,6 +737,7 @@ class CredentialManager { { name: 'OpenAI (GPT-6.2 Sol)', value: 'openai' }, { name: 'Google Gemini (Gemini 4 Hydrogen)', value: 'gemini' }, { name: 'OpenRouter (400+ models, one API key)', value: 'openrouter' }, + { name: 'Atlas Cloud (OpenAI-compatible)', value: 'atlascloud' }, { name: 'Kimi (Moonshot AI — K3.1 Pro)', value: 'kimi' }, { name: 'MiMo (Xiaomi — V2.6 Pro)', value: 'mimo' }, { name: 'GLM (Zhipu AI — GLM-5.3)', value: 'glm' }, @@ -719,6 +751,7 @@ class CredentialManager { case 'openai': return await this.setupOpenAICredentials(); case 'gemini': return await this.setupGeminiCredentials(); case 'openrouter': return await this.setupOpenRouterCredentials(); + case 'atlascloud': return await this.setupAtlasCloudCredentials(); case 'kimi': return await this.setupKimiCredentials(); case 'mimo': return await this.setupMiMoCredentials(); case 'glm': return await this.setupGLMCredentials(); diff --git a/walkthrough.js b/walkthrough.js index 830e16d7..06931fd8 100644 --- a/walkthrough.js +++ b/walkthrough.js @@ -68,6 +68,23 @@ const AI_PROVIDER_GUIDE = { }, validationCreds: (apiKey, model) => ({ aiProvider: { provider: 'openrouter', apiKey, model } }) }, + atlascloud: { + label: 'Atlas Cloud — OpenAI-compatible multi-model API', + keyUrl: 'https://www.atlascloud.ai/console/api-keys', + keyHint: 'from the Atlas Cloud console', + instructions: [ + 'Sign in to Atlas Cloud', + 'Open the API keys page and create a key', + 'Copy the key into this setup step' + ], + models: ['qwen/qwen3.5-flash', 'deepseek-ai/deepseek-v4-pro'], + defaultModel: 'qwen/qwen3.5-flash', + covers: 'scripts only (add a Gemini or OpenAI key for images/voice)', + save(credentials, apiKey, model) { + credentials.aiProvider = { provider: 'atlascloud', apiKey, model }; + }, + validationCreds: (apiKey, model) => ({ aiProvider: { provider: 'atlascloud', apiKey, model } }) + }, kimi: { label: 'Kimi (Moonshot AI) — K3.1 Pro and K3 family text models', keyUrl: 'https://platform.kimi.ai',