diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/client.md | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/docs/client.md b/docs/client.md index 9621e3c2..b4f351d3 100644 --- a/docs/client.md +++ b/docs/client.md @@ -154,7 +154,7 @@ from g4f.client import Client client = Client() response = client.images.generate( - model="dall-e-3", + model="flux", prompt="a white siamese cat" # Add any other necessary parameters ) @@ -164,6 +164,23 @@ image_url = response.data[0].url print(f"Generated image URL: {image_url}") ``` + +#### Base64 Response Format +```python +from g4f.client import Client + +client = Client() + +response = client.images.generate( + model="flux", + prompt="a white siamese cat", + response_format="b64_json" +) + +base64_text = response.data[0].b64_json +print(base64_text) +``` + ### Creating Image Variations |