diff options
Diffstat (limited to 'etc/examples')
-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 |