A simple and easy to use client for the RealEngine.ai API
npm install @realengineai/client
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")
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.
This package supports the following minimum versions:
- Runtime:
node >= 18
- Type definitions (optional):
typescript >= 4.5
Contributions are welcome!
This project is licensed under the terms of the MIT license. See the License file for details.