Skip to main content
MoneyPrinterTurbo reads its configuration from a config.toml file in the project root. On first startup the application automatically copies config.example.toml to config.toml if the file does not already exist, so you can begin editing immediately.

File location

MoneyPrinterTurbo/
└── config.toml          ← your active configuration
└── config.example.toml  ← reference template (do not edit directly)
Keep config.toml out of version control. It may contain API keys.

Full example

The following is the complete config.example.toml shipped with the project. Copy and adapt values as needed.
config.example.toml
[app]
video_source = "pexels" # "pexels" or "pixabay"

# 是否隐藏配置面板
hide_config = false

# Pexels API Key
# Register at https://www.pexels.com/api/ to get your API key.
# You can use multiple keys to avoid rate limits.
# For example: pexels_api_keys = ["123adsf4567adf89","abd1321cd13efgfdfhi"]
pexels_api_keys = []

# Pixabay API Key
# Register at https://pixabay.com/api/docs/ to get your API key.
# You can use multiple keys to avoid rate limits.
# For example: pixabay_api_keys = ["123adsf4567adf89","abd1321cd13efgfdfhi"]
pixabay_api_keys = []

# Supported providers:
#   openai, moonshot, azure, qwen, deepseek, gemini,
#   ollama, g4f, oneapi, cloudflare, ernie, modelscope
llm_provider = "openai"

########## Pollinations AI Settings
pollinations_api_key = ""
pollinations_base_url = "https://pollinations.ai/api/v1"
pollinations_model_name = "openai-fast"

########## Ollama Settings
ollama_base_url = ""
ollama_model_name = ""

########## OpenAI
openai_api_key = ""
openai_base_url = ""
openai_model_name = "gpt-4o-mini"

########## Moonshot
moonshot_api_key = ""
moonshot_base_url = "https://api.moonshot.cn/v1"
moonshot_model_name = "moonshot-v1-8k"

########## OneAPI
oneapi_api_key = ""
oneapi_base_url = ""
oneapi_model_name = ""

########## G4F
g4f_model_name = "gpt-3.5-turbo"

########## Azure OpenAI
azure_api_key = ""
azure_base_url = ""
azure_model_name = "gpt-35-turbo"
azure_api_version = "2024-02-15-preview"

########## Gemini
gemini_api_key = ""
gemini_model_name = "gemini-1.0-pro"

########## Qwen (Alibaba)
qwen_api_key = ""
qwen_model_name = "qwen-max"

########## DeepSeek
deepseek_api_key = ""
deepseek_base_url = "https://api.deepseek.com"
deepseek_model_name = "deepseek-chat"

########## ModelScope
modelscope_api_key = ""
modelscope_base_url = "https://api-inference.modelscope.cn/v1/"
modelscope_model_name = "Qwen/Qwen3-32B"

# Subtitle provider: "edge", "whisper", or "" (disabled)
subtitle_provider = "edge"

# Video download endpoint (set when using a reverse proxy or domain)
# endpoint = "https://yourdomain.com"
endpoint = ""

# Video material cache directory
# ""                   → ./storage/cache_videos (default)
# "/path/to/dir"       → custom absolute path
# "task"              → per-task folder (no cross-task sharing)
material_directory = ""

# Redis for task state (recommended in production)
enable_redis = false
redis_host = "localhost"
redis_port = 6379
redis_db = 0
redis_password = ""

# Maximum number of concurrent video generation tasks
max_concurrent_tasks = 5


[whisper]
# Only effective when subtitle_provider = "whisper"
model_size = "large-v3"
device = "CPU"
compute_type = "int8"


[proxy]
# Format: "http://<username>:<password>@<proxy>:<port>"
# http = "http://10.10.1.10:3128"
# https = "http://10.10.1.10:1080"


[azure]
# Required for Azure TTS voices
speech_key = ""
speech_region = ""


[siliconflow]
# Required for SiliconFlow TTS voices
api_key = ""


[ui]
hide_log = false

Key settings explained

video_source

Controls where MoneyPrinterTurbo searches for stock footage.
ValueDescription
"pexels"Fetch clips from Pexels (default). Requires pexels_api_keys.
"pixabay"Fetch clips from Pixabay. Requires pixabay_api_keys.
"local"Use only files from material_directory. No API key needed.
See Video sources for full setup details.

llm_provider

Selects the language model used to generate video scripts and search terms. Set this to one of the supported provider strings and fill in the matching API key fields.
llm_provider = "openai"
openai_api_key = "sk-..."
openai_model_name = "gpt-4o-mini"
See LLM providers for all supported providers.

subtitle_provider

ValueBehaviour
"edge"Subtitle timing derived from Edge TTS word boundaries. Fast, no extra download.
"whisper"Whisper transcribes the audio for more accurate subtitle alignment. Requires ~3 GB model download.
"" (empty)Subtitles disabled entirely.

endpoint

The base URL included in the download link returned by the API after a video is generated. Leave empty to use the default host and port (http://127.0.0.1:8080).
# Required when serving behind nginx or a custom domain
endpoint = "https://videos.yoursite.com"
If you expose the service through a reverse proxy and leave endpoint empty, the generated download URLs will point to localhost and will not be reachable from outside the server.

material_directory

Where downloaded stock video clips are cached.
ValueBehaviour
""Default: ./storage/cache_videos inside the project root.
/absolute/pathStore clips in a custom directory (useful for large volumes).
"task"Each task gets its own folder. Clips are never reused across tasks.

enable_redis

By default task state is stored in memory. Set enable_redis = true along with the redis_* connection fields to persist state across restarts and to support multi-process deployments.
enable_redis = true
redis_host = "redis"
redis_port = 6379
redis_db = 0
redis_password = "secret"

max_concurrent_tasks

Limits how many video generation jobs run in parallel. Default is 5. Lower this value if you run into memory or API rate-limit issues.

Configuration sections

SectionPurpose
[app]Main application settings — video source, LLM, subtitles, storage, Redis.
[whisper]Whisper model settings (model_size, device, compute_type).
[proxy]HTTP/HTTPS proxy for outbound requests (e.g. Pexels API).
[azure]Azure Cognitive Services speech key and region for Azure TTS voices.
[siliconflow]SiliconFlow API key for SiliconFlow TTS voices.
[ui]Web UI preferences such as hiding the log panel.

Build docs developers (and LLMs) love