Skip to main content

Using AON with Python

AGIN - Python sdk for AON A Python lib for AON. It lets you run models from your Python code, and everything else you can do with HTTP API.

  • Python version: 3.9
  • API version: 1.0
  • Package version: 1.0.0

Installation

For Python

npm

Install it from pip:

pip install agin

Getting Started

Please follow the installation instruction and execute the following JS code:

import agin.agin as agin

#get your api key or jwt token from https://console.aonet.ai
api_key = "my api key or jwt token"

agin_instance = agin.AGIN(api_key)

data = {
"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
}
}

result = agin_instance.prediction("/predictions/ai/ssd-1b",data)

print(result)

API

All URIs are default relative to https://api.aonet.ai

Constructor

agin_instance = agin.AGIN(auth,host,headers)
nametypeDescription
hoststringThe request host
authstringRequired.You can choose either API key or JWT token for authentication.

Docs

For more information, please visit the site https://docs.aonet.ai