mirror of https://github.com/xtekky/gpt4free
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
248 B
Python
9 lines
248 B
Python
4 months ago
|
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)
|