summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-02-12 12:08:26 +0100
committerGitHub <noreply@github.com>2024-02-12 12:08:26 +0100
commitdd5478636460560bd6538c6b08a81c92d61b6595 (patch)
tree128a4681385f6f1adc8bee8cf745affc0103d204 /README.md
parentMerge pull request #1577 from hlohaus/openai (diff)
parentAdd variant example (diff)
downloadgpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.tar
gpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.tar.gz
gpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.tar.bz2
gpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.tar.lz
gpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.tar.xz
gpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.tar.zst
gpt4free-dd5478636460560bd6538c6b08a81c92d61b6595.zip
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6f6c9e52..c5b59f86 100644
--- a/README.md
+++ b/README.md
@@ -226,6 +226,26 @@ docker-compose down
## 💡 Usage
+### New Client with Image Generation
+
+#### not jet released
+
+```python
+from g4f.client import Client
+
+client = Client()
+response = client.images.generate(
+ model="gemini",
+ prompt="a white siamese cat",
+ ...
+)
+image_url = response.data[0].url
+```
+Result:
+[![Image with cat](/docs/cat.jpeg)](/docs/client.md)
+
+[to the client API](/docs/client.md)
+
### The Web UI
To start the web interface, type the following codes in the command line.