From 77a1f500a88a040aca5935510cce5e2356f652d2 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 20 May 2024 15:59:06 +0200 Subject: Improve async client readme, Fix print styling, Add image api example --- etc/examples/image_api.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 etc/examples/image_api.py (limited to 'etc') diff --git a/etc/examples/image_api.py b/etc/examples/image_api.py new file mode 100644 index 00000000..dbae22ed --- /dev/null +++ b/etc/examples/image_api.py @@ -0,0 +1,9 @@ +import requests +url = "http://localhost:1337/v1/images/generations" +body = { + "prompt": "heaven for dogs", + "provider": "OpenaiAccount", + "response_format": "b64_json", +} +data = requests.post(url, json=body, stream=True).json() +print(data) \ No newline at end of file -- cgit v1.2.3