An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# Lexica

> API wrapper around [Lexica](https://lexica.art) for searching Stable Diffusion images.

[![NPM](https://img.shields.io/npm/v/lexica-api.svg)](https://www.npmjs.com/package/lexica-api) [![Build Status](https://github.com/transitive-bullshit/lexica-api/actions/workflows/test.yml/badge.svg)](https://github.com/transitive-bullshit/lexica-api/actions/workflows/test.yml) [![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/transitive-bullshit/lexica-api/blob/main/license) [![Prettier Code Formatting](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](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 twitter