1.0.3 • Published 11 months ago
@realengineai/client v1.0.3
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.