Skip to main content

💬 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

  1. Open DevTools in your browser
  2. Go to Storage -> Local Storage -> api.pixai.art:token
  3. 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

  1. Send createGenerationTask to initiate image generation
  2. Receive generationId as acknowledgment.

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

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

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

Metadata

Release files for pixaiAPI 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixaiAPI 0.1.11
File Size Uploaded
pixaiAPI-0.1.11.tar.gz 3.7 kB Details

Release files / pixaiAPI-0.1.11.tar.gz

Download URL pixaiAPI-0.1.11.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
34e35900b7ddffc7d0ea85123fa3d89227653dd6800bad2c52baf9002ba97b79
BLAKE2b-256 checksum
How to use checksums
7307d37914401c47980d45ffe67bd74e7aca41c4cbb41677ab017fad953beb5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.1.11 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page