Alternative API for getting text completions from the g4f project
./start.shThen make requests:
curl -X POST http://localhost:8001/api/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Hello!"}]}'This API uses a whitelist approach for provider management. Only curated, working providers are enabled (see PROVIDER_WHITELIST in backend/dependencies.py). This ensures reliable responses and fast failures.
Test all whitelisted providers automatically:
uv run python3 test_providers.pyThis will test each provider and show you which ones are currently working. Update PROVIDER_WHITELIST based on the results.