-
Notifications
You must be signed in to change notification settings - Fork 7
Methods
Zenafey edited this page May 16, 2023
·
1 revision
Before starting creating images, obtain your api key on Prodia API page
Now, you need to define api key in you script, to do this user prodia.Client()
:
import prodia
prodia.Client(api_key="paste here your api key")
#...
🚧 This is a list with generating methods that is not
asynchronous
and blocks script until completing generation
image = prodia.txt2img(prompt="kittens on cloud")
image = prodia.img2img(
imageUrl='https://cdn.discordapp.com/attachments/1083332256493482014/1107954523881873459/6AAE9DB9.png',
prompt="photo of dog"
) #imageUrl and prompt are required arguments
🚧 This is a list of generating methods that is
asynchronous
and work only insideasynchronous
function
async def test():
#...
image = await prodia.arunv1(prompt="kittens on cloud")
async def test():
#...
image = await prodia.arunv2(
imageUrl="https://cdn.discordapp.com/attachments/1083332256493482014/1107954523881873459/6AAE9DB9.png",
prompt="photo of dog"
)
📘 Note that all methods(at the moment) returns url of generated image