aigic
v1.0.0
Published
aigic js SDK
Downloads
5
Readme
AIGIC
AIGIC - JavaScript sdk for AIGIC A Node.js client for AIGIC. It lets you run models from your Node.js code, and everything else you can do with AIGIC HTTP API.
[!IMPORTANT] This library can't interact with AIGIC 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 aigic --save
Getting Started
Please follow the installation instruction and execute the following JS code:
const AIGIC = require("aigic");
const options = {
//get your api key or jwt token from https://console.aigic.ai
auth:"my api key or jwt token"
}
const aigic = new AIGIC(options);
let response = await aigic.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.aigic.ai
Constructor
const aigic = new AIGIC(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.aigic.ai