diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-05-20 15:59:06 +0200 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-05-20 15:59:06 +0200 |
commit | 77a1f500a88a040aca5935510cce5e2356f652d2 (patch) | |
tree | 936bc18ad7bc053cedba9897d6032c032e5bb19f /etc | |
parent | Merge pull request #1984 from hlohaus/leech (diff) | |
download | gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.tar gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.tar.gz gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.tar.bz2 gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.tar.lz gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.tar.xz gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.tar.zst gpt4free-77a1f500a88a040aca5935510cce5e2356f652d2.zip |
Diffstat (limited to 'etc')
-rw-r--r-- | etc/examples/image_api.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 |