Pixai Api 0.1.11 | Coderz Repository

pixaiAPI 0.1.11

Last updated:

0 purchases

pixaiAPI 0.1.11 Image
pixaiAPI 0.1.11 Images

Free

Languages

Categories

Add to Cart

Description:

pixaiAPI 0.1.11

πŸ’¬ Pixai.art
An unofficial API for Pixai.art for Python using request
πŸ’» Installation
pip install PixaiAPI

πŸ”‘ Get Token
The token is needed for authorization and operation of requests from your account

Open DevTools in your browser
Go to Storage -> Local Storage -> api.pixai.art:token
Copy value

α… 
πŸ“™ Example
from pixai import PixaiAPI

client = PixaiAPI('TOKEN')

startGeneration = client.createGenerationTask(
prompts='girl, white hair, winter',
steps='20',
modelId='1648918127446573124'
)

imageurlurl = client.getTaskById(startGeneration)
image = client.DownloadImage(imageurlurl)

⛏️How is work (short)
Due to the unofficial nature of the API, the approach to image generation deviates from standard methods

Send createGenerationTask to initiate image generation
Receive generationId as acknowledgment.

To track the progress or retrieve the generated image, use the getTaskById endpoint, passing in your generationId

Use getTaskById with your generationId to get a link to the image
Dowload image by link

Workflow Summary
createGenerationTask -> receive generationId -> getTaskById with generationId -> receive url_to_image -> Download image from link

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.