Skip to main content
Create Provider with AI Tool
To create a Provider with AI tool you need cloned gpt4free repository, not PyPi version
Call in your terminal the “create_provider” script:
  1. Enter your name for the new provider.
  2. Copy and paste the URL command from your browser developer tools.
  3. Let the AI create the provider for you.
  4. Customize the provider according to your needs.
Create provider without AI tools
List of list of potential providers available here
  1. Find provider.
  2. Create a new file in g4f/Provider with the name of the Provider.
  3. Implement a class that extends BaseProvider:
  1. Here, you can adjust the settings, for example, if the website does support streaming, set supports_stream to True…
  1. Write code to request the provider in create_async_generator and yield the response, even if it’s a one-time response, do not hesitate to look at other providers for inspiration
  2. Add the Provider Name in g4f/Provider/init.py:
  1. You are done! Test your provider by calling it: