← Back to MoneyPrinterTurbo Guide

MoneyPrinterTurbo: g4f Not Working? Fix & Free Alternatives

You set llm_provider = "g4f" expecting free AI. Instead you got RetryProviderError — every provider failed. Here's why, and what to use instead.

What You're Seeing

You configured g4f in config.toml, started MPT, and tried to generate a video. One of these happened:

g4f promised free GPT access by routing through third-party APIs. That promise is now broken.

Why g4f Is Dead

g4f (GPT4Free) works by scraping free tiers of various AI providers — reverse-engineered APIs that were never meant for programmatic access. This was always fragile. In 2026, every single one has broken:

Don't bother debugging g4f. Installing missing deps, switching providers, or downgrading versions might get it working for one session — then it breaks again tomorrow. The time you spend debugging g4f is better spent setting up a real provider.

Fix 1: Qwen via DashScope (Recommended)

Best option for most users. Qwen is Alibaba's LLM. DashScope (also called Bailian/百炼) gives you free quota — no credit card, no VPN needed, works direct from China.

Step 1: Get a free API key

  1. Go to dashscope.console.aliyun.com
  2. Sign up with Aliyun account (or register — phone number required)
  3. Go to API Key management → Create API Key
  4. Copy the key. Free quota: ~1 million tokens

Step 2: Configure MPT

Open config.toml and set:

llm_provider = "qwen"
qwen_api_key = "sk-your-api-key-here"
qwen_model = "qwen-plus"

Available models: qwen-turbo (fastest, cheapest), qwen-plus (balanced), qwen-max (best quality). For MPT video scripts, qwen-plus is ideal.

Why Qwen wins for MPT: Free quota resets monthly. China-direct — no VPN needed for API calls. Script quality is solid — comparable to GPT-3.5 for the kind of short-form video scripts MPT generates. And the config change is one line in config.toml.

Fix 2: Moonshot (Kimi)

Moonshot's Kimi model is another good option, especially for Chinese-language video scripts.

  1. Register at platform.moonshot.cn
  2. Create API key (new accounts get free credits)
llm_provider = "moonshot"
moonshot_api_key = "sk-your-key-here"
moonshot_model = "moonshot-v1-8k"
Heads-up: Moonshot free credits are limited. Some users report Error 429 — account suspended due to insufficient balance after the initial quota runs out. If you hit this, switch to Qwen — their free tier is more generous and renews monthly.

Fix 3: Any OpenAI-Compatible Provider

MPT v1.1.0 supports llm_provider = "openai" natively. This works with any service that exposes an OpenAI-compatible endpoint — not just OpenAI itself.

llm_provider = "openai"
openai_api_key = "your-key-here"
openai_api_base = "https://your-provider.com/v1"
openai_model = "gpt-4o-mini"

Services that work with this pattern:

Which One Should You Use?

ProviderCostChina AccessScript QualityBest For
Qwen (DashScope) Free (1M tokens/mo) Direct, no VPN Good Most users — best default
Moonshot Free credits (limited) Direct, no VPN Good (Chinese) Chinese-language videos
DeepSeek Free credits Direct, no VPN Excellent Quality-focused users
OpenAI ~$0.01/video VPN required Excellent Best quality, budget OK
g4f Free VPN required Unreliable Don't use
Bottom line: Switch to Qwen. It takes 5 minutes to get an API key, the config change is one line, and you'll never see RetryProviderError again. The free quota is enough for hundreds of videos per month.

Related Fixes