@realengineai/client
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

RealEngine.ai SDK for JavaScript

A simple and easy to use client for the RealEngine.ai API

Installation

npm install @realengineai/client

Usage

Import and initialize a client using an API token from the RealEngine AI Dashboard.

import RealEngineAIClient from "@realengineai/client"

// Initializing a client
const realEngineAIClient = new RealEngineAIClient(
  process.env.REAL_ENGINE_AI_TOKEN
)

Make a request to get captions for an image.

const caption = await client.getCaption("http://link.to/image.jpg")

Handling errors

If the API returns an unsuccessful response, the returned Promise rejects with a RealEngineAIError.

The error contains a unique error ID that can be used by RealEngine AI support team.

Requirements

This package supports the following minimum versions:

  • Runtime: node >= 18
  • Type definitions (optional): typescript >= 4.5

Contributing

Contributions are welcome!

License

This project is licensed under the terms of the MIT license. See the License file for details.

Package Sidebar

Install

npm i @realengineai/client

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

21.1 kB

Total Files

7

Last publish

Collaborators

  • yaivanov