An easy-to-use reverse engineered Python API wrapper for Lexica.art
from Lex import Lexica
lex = Lexica(query="icecream").images()
print(lex)
It will return you a list with the image links
You must have a registered account on Lexica first.
Once you're registered you need the cookie from the site. To find the cookie open Inspect Tools then navigate to the Network
Tab and start recording the requests. Generate an image and intercept the requests, there you'll find a request named generator
open the requests and scroll down until you find the cookie
parameter in the headers section of the request
Copy the entire cookie value and store it in a variable or a file.
from Lex import Lexica
cookie="YOUR COOKIE"
lex = Lexica(query="icecream",cookie=cookie).generate()
print(lex)
It will return you a list with the image links
- negativePrompt: Default to
None
- guidanceScale: Default to
7
- portrait: Default to
True
(If set toFalse
will generate a landscape image with ratio (768,512))
If you are interested feel free to check it out, Aperture
- I hope you found this useful, If you did consider giving it a star <3