You set llm_provider = "g4f" expecting free AI. Instead you got RetryProviderError — every provider failed. Here's why, and what to use instead.
You configured g4f in config.toml, started MPT, and tried to generate a video. One of these happened:
RetryProviderError: RetryProvider failed after 3 attemptsNo provider found or individual provider errors for each one MPT triesImportError for curl_cffi, undetected_chromedriver, or platformdirsg4f promised free GPT access by routing through third-party APIs. That promise is now broken.
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:
curl_cffi, undetected_chromedriver, platformdirs that aren't in MPT's requirements.txtBest 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.
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.
config.toml.
Moonshot's Kimi model is another good option, especially for Chinese-language video scripts.
llm_provider = "moonshot"
moonshot_api_key = "sk-your-key-here"
moonshot_model = "moonshot-v1-8k"
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.
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:
api_base = "https://api.deepseek.com", free credits availableapi_base = "https://openrouter.ai/api/v1", pay-as-you-goapi_base = "https://api.groq.com/openai/v1", free tier with rate limitsapi_base = "http://localhost:11434/v1"| Provider | Cost | China Access | Script Quality | Best 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 |
RetryProviderError again. The free quota is enough for hundreds of videos per month.