Okay, I understand. The user wants to create a new documentation page similar to providers-and-models.md but specifically for providers that require a token or API key for authentication. This will improve user-friendliness by clearly separating providers based on their authentication requirements.
Here's a breakdown of the proposed documentation, incorporating details from the existing providers-and-models.md and the other provided files:
New Documentation File: docs/providers-need-auth.md
markdown
# G4F - Providers Requiring Authentication
This document provides an overview of AI providers that require a token, API key, or login for access. It aims to help users understand the authentication methods and choose the suitable provider for their needs.
## Table of Contents
- [Authentication Methods](#authentication-methods)
- [Providers Needing Authentication](#providers-needing-authentication)
- [Usage Tips](#usage-tips)
---
## Authentication Methods
Providers listed in this document require authentication using one of the following methods:
* **API Key:** A unique key provided by the service, which is used to authenticate your requests.
* **Token:** A temporary credential, often acquired through a login process, used to authenticate requests.
* **Account Login:** Requires a valid user account with the provider, which may be authenticated via cookies, or a direct login.
## Providers Needing Authentication
| Website | Provider | Text Models | Image Models | Vision Models | Stream | Status | Auth Method |
|----------|-------------|--------------|---------------|--------|--------|------|-------------|
|[console.anthropic.com](https://console.anthropic.com)|`g4f.Provider.Anthropic`|✔ _**(8+)**_|❌|❌|✔|| API Key/Login |
|[bing.com/images/create](https://www.bing.com/images/create)|`g4f.Provider.BingCreateImages`|❌|`dall-e-3`|❌|❌|| Login |
|[inference.cerebras.ai](https://inference.cerebras.ai/)|`g4f.Provider.Cerebras`|✔ _**(3+)**_|❌|❌|✔|| API Key |
|[inference.cerebras.ai](https://inference.cerebras.ai/)|`g4f.Provider.CopilotAccount`|✔ _**(1+)**_|✔ _**(1+)**_|✔ _**(1+)**_|✔|| Login |
|[deepinfra.com](https://deepinfra.com)|`g4f.Provider.DeepInfra`|✔ _**(17+)**_|✔ _**(6+)**_|❌|✔|| API Key |
|[platform.deepseek.com](https://platform.deepseek.com)|`g4f.Provider.DeepSeek`|✔ _**(1+)**_|❌|❌|❌|| API Key |
|[gemini.google.com](https://gemini.google.com)|`g4f.Provider.Gemini`|`gemini, gemini-1.5-flash, gemini-1.5-pro`|`gemini`|`gemini`|❌|| Login |
|[ai.google.dev](https://ai.google.dev)|`g4f.Provider.GeminiPro`|`gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash`|❌|`gemini-1.5-pro`|❌|| API Key |
|[developers.sber.ru/gigachat](https://developers.sber.ru/gigachat)|`g4f.Provider.GigaChat`|✔ _**(3+)**_|❌|❌|❌|| API Key |
|[github.com/copilot](https://github.com/copilot)|`g4f.Provider.GithubCopilot`|✔ _**(4+)**_|❌|❌|❌|| Login |
|[glhf.chat](https://glhf.chat)|`g4f.Provider.GlhfChat`|✔ _**(22+)**_|❌|❌|❌|| API Key/Login |
|[console.groq.com/playground](https://console.groq.com/playground)|`g4f.Provider.Groq`|✔ _**(18+)**_|❌|✔|❌|| API Key |
|[huggingface.co/chat](https://huggingface.co/chat)|`g4f.Provider.HuggingChat`|`qwen-2.5-72b, llama-3.3-70b, command-r-plus, qwq-32b, nemotron-70b, nemotron-70b, llama-3.2-11b, mistral-nemo, phi-3.5-mini`|`flux-dev, flux-schnell`|❌|✔|| API Key/Login |
|[huggingface.co/chat](https://huggingface.co/chat)|`g4f.Provider.HuggingFace`|✔ _**(47+)**_|✔ _**(9+)**_|❌|✔|| API Key |
|[api-inference.huggingface.co](https://api-inference.huggingface.co)|`g4f.Provider.HuggingFaceAPI`|✔ _**(9+)**_|✔ _**(2+)**_|✔ _**(1+)**_|❌|| API Key |
|[meta.ai](https://www.meta.ai)|`g4f.Provider.MetaAI`|`meta-ai`|❌|❌|✔|| Login |
|[meta.ai](https://www.meta.ai)|`g4f.Provider.MetaAIAccount`|❌|`meta-ai`|❌|✔|| Login |
|[designer.microsoft.com](https://designer.microsoft.com)|`g4f.Provider.MicrosoftDesigner`|❌|`dall-e-3`|❌|❌|| Login |
|[platform.openai.com](https://platform.openai.com)|`g4f.Provider.OpenaiAPI`|✔|❌|❌|✔|| API Key |
|[chatgpt.com](https://chatgpt.com)|`g4f.Provider.OpenaiChat`|`gpt-4o, gpt-4o-mini, gpt-4` _**(8+)**_|✔_**(1)**_|✔_**(8+)**_|✔|| Login |
|[perplexity.ai](https://www.perplexity.ai)|`g4f.Provider.PerplexityApi`|✔ _**(6+)**_|❌|❌|✔|| API Key/Login |
|[poe.com](https://poe.com)|`g4f.Provider.Poe`|✔ _**(10+)**_|❌|❌|✔|| Login |
|[raycast.com](https://raycast.com)|`g4f.Provider.Raycast`|✔ _**(2+)**_|❌|❌|✔|| API Key/Login |
|[chat.reka.ai](https://chat.reka.ai)|`g4f.Provider.Reka`|`reka-core`|❌|✔|✔|| API Key |
|[replicate.com](https://replicate.com)|`g4f.Provider.Replicate`|✔ _**(1+)**_|❌|❌|✔|| API Key |
|[beta.theb.ai](https://beta.theb.ai)|`g4f.Provider.ThebApi`|✔ _**(21+)**_|❌|❌|✔|| API Key |
|[beta.theb.ai](https://beta.theb.ai)|`g4f.Provider.WhiteRabbitNeo`|✔|❌|❌|✔|| API Key |
|[whiterabbitneo.com](https://www.whiterabbitneo.com)|`g4f.Provider.WhiteRabbitNeo`|✔|❌|❌|✔|| API Key |
|[console.x.ai](https://console.x.ai)|`g4f.Provider.xAI`|✔|❌|❌|✔|| API Key/Login |
## Usage Tips
* **API Key Management**: Securely store and manage your API keys. Avoid hardcoding them directly in your scripts. Use environment variables or secure key management services.
* **Login Sessions**: For providers requiring login, ensure the session is correctly established and maintained. Session handling may require cookies or specific browser setups.
* **Authentication Errors**: If you encounter authentication errors, check the following:
* Verify that the API key or token is correctly set.
* Ensure that your account has the necessary permissions to access the service.
* Review provider-specific documentation for detailed authentication instructions.
* **Rate Limits**: Be mindful of rate limits imposed by providers. Implement retries and backoff mechanisms in your code.
* **Provider Specific Instructions:** Some providers might require specific setup or login steps. Check the documentation of each provider on how to obtain the API Key or Token to be able to use with g4f.
---
[Return to Home](/)
Explanation:
File Structure: The new document docs/providers-need-auth.md is created.
Introduction: The document starts with an introduction explaining its purpose.
Table of Contents: A table of contents is added for easy navigation.
Authentication Methods: A section describing the various authentication methods used by the providers.
Providers Table: A table is created containing similar information to the providers-and-models.md table, but with the addition of an "Auth Method" column to specify the type of authentication each provider needs:
Website: Link to the provider's website.
Provider: The g4f provider class name.
Text Models: List of available text models.
Image Models: List of available image models.
Vision Models: List of available vision models.
Stream: Whether the provider supports streaming.
Status: The current status of the provider using a badge.
Auth Method: The method of authentication required (API Key, Token, Login).
Usage Tips: This section gives users tips on using and managing authentication for the providers, also giving instructions for the most common errors.
Navigation: A link at the end to return to the homepage.
Integration with the existing documentation:
Add a link to this new document to the main README.md and the docs/providers-and-models.md for better discoverability.
Consider adding a reference to docs/authentication.md to provide more details on setting up authentication for the providers on the new documentation.
This new documentation file will help users easily identify which providers require authentication and understand the methods they need to use to access them. It improves the overall user experience by making the project more organized and easier to use.