Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lexicaart

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lexicaart

Search and create images using artificial intelligence. It is an unofficial implementation of the [LexicaArt](https://lexica.art) site to be able to use easily and quickly

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

LexicaArt

Search and create images using artificial intelligence. It is an unofficial implementation of the LexicaArt site to be able to use easily and quickly

Installation

Install this project with npm

  npm install --save lexicaart

Before running

You need to obtain the sessionToken and csrfToken data, which are obtained by entering the LexicaArt site, logging in, accessing the site's cookies and obtaining the values ​​of:

  • __Secure-next-auth.session-token
  • __Host-next-auth.csrf-token

Demo

Example of an image search

const LexicaArt = require('lexicaart');

const main = async () => {
  const lexicaart = new LexicaArt();
  const images = await lexicaart.search('A steampunk teddy with a knife');
  console.log('Title', images[0].prompt);
  console.log('images', images[0].images);
}

main();

Example of creating an image

const LexicaArt = require('lexicaart');

const main = async () => {
  const lexicaart = new LexicaArt({
    sessionToken: 'YOUR_SESSION_TOKEN',
    csrfToken: 'YOUR_CSRF_TOKEN'
  });
  const info = await lexicaart.create('A steampunk teddy with a knife');
  console.log('INFO', info);
}

main();

OUTPUTS

[
  {
    id: 'e9cdd....',
    prompt: 'A steampunk teddy with a knife',
    negativePrompt: '',
    grid: false,
    seed: '136972',
    c: 7,
    model: 'lexica-aperture-v2',
    width: 512,
    height: 768,
    userid: 'cldapr....',
    timestamp: '2023-01-24T21:13:15.545Z',
    ip_address: '201.22.....',
    is_private: false,
    fingerprint_id: '7W7J0D....',
    guidanceScale: 7,
    images: [
      {
        id: '82ce215....',
        url: 'https://lexica-serve-encoded-images2.sharif.workers.dev/full_jpg/82ce2153-1e86-46e9-9fef-4870f812b90f',
        promptid: 'e9cdd....',
        width: 512,
        height: 768,
        upscaledHeight: 3072,
        upscaledWidth: 2048,
        userId: 'cldap....',
        isUpscale: false
      },
      {
        id: '9671d9....',
        url: 'https://lexica-serve-encoded-images2.sharif.workers.dev/full_jpg/9671d9ff-9408-4d30-8b78-9867b9648972',
        promptid: 'e9cdd....',
        width: 512,
        height: 768,
        upscaledHeight: 3072,
        upscaledWidth: 2048,
        userId: 'cldapr....',
        isUpscale: false
      },
      ....
    ]
  }
]

Authors

FAQs

Package last updated on 25 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc