https://github.com/transitive-bullshit/lexica-api
API wrapper around Lexica.art for searching Stable Diffusion images.
https://github.com/transitive-bullshit/lexica-api
Last synced: about 1 month ago
JSON representation
API wrapper around Lexica.art for searching Stable Diffusion images.
- Host: GitHub
- URL: https://github.com/transitive-bullshit/lexica-api
- Owner: transitive-bullshit
- License: mit
- Created: 2022-11-29T00:33:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-02T22:48:45.000Z (over 2 years ago)
- Last Synced: 2025-05-06T19:13:08.105Z (about 1 month ago)
- Language: TypeScript
- Size: 106 KB
- Stars: 17
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
# Lexica
> API wrapper around [Lexica](https://lexica.art) for searching Stable Diffusion images.
[](https://www.npmjs.com/package/lexica-api) [](https://github.com/transitive-bullshit/lexica-api/actions/workflows/test.yml) [](https://github.com/transitive-bullshit/lexica-api/blob/main/license) [](https://prettier.io)
- [Intro](#intro)
- [Install](#install)
- [Usage](#usage)
- [Docs](#docs)
- [License](#license)## Intro
This package is a simple Node.js wrapper around the [Lexica](https://lexica.art/docs) API for searching Stable Diffusion images.
It uses `got` and TypeScript.
## Install
```bash
npm install --save lexica-api
# or
yarn add lexica-api
# or
pnpm add lexica-api
```## Usage
```ts
import { LexicaAPI } from 'lexica-api'const lexica = new LexicaAPI()
// normal search
const results0 = await lexica.search('apples')// reverse image search
const results1 = await lexica.reverseImageSearch(
'https://media.gettyimages.com/photos/crete-senesi-countryside-in-summer-tuscany-italy-picture-id1411845730'
)
```## Docs
See the [auto-generated docs](./docs/modules.md).
## License
MIT © [Travis Fischer](https://transitivebullsh.it)
Support my open source work by following me on twitter
![]()