aonet
v1.0.3
Published
aonet js SDK
Downloads
7
Readme
AON
AON - JavaScript sdk for AON A Node.js client for AON. It lets you run models from your Node.js code, and everything else you can do with AON HTTP API.
[!IMPORTANT] This library can't interact with AON API directly from a browser.
- API version: 1.0.0
- Package version: 1.0.0
Installation
For Node.js
npm
Install it from npm:
npm install aonet --save
Getting Started
Please follow the installation instruction and execute the following JS code:
const AI = require("aonet");
const options = {
//get your api key or jwt token from https://console.aonet.ai
auth:"my api key or jwt token"
}
const aonet = new AI(options);
let response = await aonet.prediction("/predictions/ai/ssd-1b",
{
input:{
"seed": 36446545872,
"width": 768,
"height": 768,
"prompt": "with smoke, half ice and half fire and ultra realistic in detail.wolf, typography, dark fantasy, wildlife photography, vibrant, cinematic and on a black background",
"scheduler": "K_EULER",
"num_outputs": 1,
"guidance_scale": 9,
"negative_prompt": "scary, cartoon, painting",
"num_inference_steps": 25
}
});
console.log("test",response);
API
All URIs are relative to https://api.aonet.ai
Constructor
const aonet = new AI(options);
name | type | Description ------------ | ------------- | ------------- host | string | The request host auth | string | Required.You can choose either API key or JWT token for authentication.
Docs
For more information, please visit the site https://docs.aonet.ai