Open output link in Browser

Hey there,

I wanted to use the OpenAI image generation so I created a simple Python script. Everything works fine, but instead of only outputting the link, I want it to open in my browser so I don’t always have to copy and paste the link. This is the code I have:

import os
import openai 
import sys
import webbrowser

prompt01 = input("Enter Text: ")

openai.api_key = "MYKEY"
response = openai.Image.create(





#d = "temp.txt"

f = open(d,'w')
print(response["data"][0]["url"], file=f)

#with open('temp.txt', 'r') as file:
#    temptext =

#temptext01 = temptext

Is there any way of doing this? (the excluded code and unused imports are from trying to solve it myself which obviously didn’t work)