- open or go download NotePad++
- copy & paste the below code into notepad.
- replace the Bold code below; Add your OpenAI API, and a custom prompt
- save as Downloads, as a python file like; app.py or example.py or inneri.py or YourImageGenerator.py
- cd Downloads
- python YourImageGenerator.py
It should run a few seconds and then save to Downloads folder as generated_image.png
- get OpenAI API ,
- Latest version of Python
import openai
import requests
import json
# Authenticate with your API key
openai.api_key = "PUT_YOUR_OPENAI_API_HERE"
# Generate an image based on the prompt
response = openai.Image.create(
prompt="Create an image that captures the essence of consciousness for the Handshake domain name Inner I Network",
n=1,
size="1024x1024"
)
# Retrieve the URL of the generated image
image_url = response['data'][0]['url']
# Download the image
image_data = requests.get(image_url).content
# Save the image to a file
with open("generated_image.png", "wb") as f:
f.write(image_data)
stay up to date with Inner I Network;
