summaryrefslogblamecommitdiffstats
path: root/etc/examples/image_api.py
blob: 9a438f9b8ac671aeb2618ac079b9cc90459f6640 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                   


                                   


                                                        
import requests
url = "http://localhost:1337/v1/images/generations"
body = {
    "model": "dall-e",
    "prompt": "hello world user",
    #"response_format": "b64_json",
}
data = requests.post(url, json=body, stream=True).json()
print(data)