summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-12 11:41:27 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-12 11:41:27 +0100
commitaba4b96f23ef38ca75195b3b78a88bb92035b4a9 (patch)
tree92575678f27d48e2258e823fa299ed21af6cbad2 /README.md
parentImprove preview in image generation of Gemini (diff)
downloadgpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.tar
gpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.tar.gz
gpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.tar.bz2
gpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.tar.lz
gpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.tar.xz
gpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.tar.zst
gpt4free-aba4b96f23ef38ca75195b3b78a88bb92035b4a9.zip
Diffstat (limited to '')
-rw-r--r--README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6734fe02..dc7ef933 100644
--- a/README.md
+++ b/README.md
@@ -226,6 +226,23 @@ docker-compose down
## 💡 Usage
+### New Client with Image Generation
+```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.