+
Skip to content

NotCookey/Lexica.art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lexica.art API

An easy-to-use reverse engineered Python API wrapper for Lexica.art

Usage

Searching For Images Using The API

from Lex import Lexica

lex = Lexica(query="icecream").images()
print(lex)

It will return you a list with the image links

Generating Images Using The API

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

Untitled

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

Additional Configurations

  • negativePrompt: Default to None
  • guidanceScale: Default to 7
  • portrait: Default to True (If set to False will generate a landscape image with ratio (768,512))

Demo Web UI made using the API Wrapper

If you are interested feel free to check it out, Aperture

image

Thank You

  • I hope you found this useful, If you did consider giving it a star <3

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载