Skip to content

Aiii Algorithm Documents

We are providing our services to all users, Python SDK is currently available, more languages to come.

The Aiii SDK is the only necessary tool for any program to embed any available algorithm, to use the Aiii SDK, please sign in or sign on to the Aiii console to register an api key first.

Once the registration is complete and your api key is created, please use the SDK as below:

Initialization

The initialization process is for the program to include the Aiii library for further use.

# Importing the Aiii Library
import Aiii

# Initializing the Aiii client for future use
client = Aiii.Client("YOUR_API_KEY")

Calling an algorithm

The data variable can only be a dictionary with the data you want to call the algorithm with sign to the key "data". In the example below, the input data is a string. Some algorithms take in multiple inputs, and you can follow the algorithm instructions to specify different inputs.

Note: No binary data can be passed in with this method. To use binary data, see the section below.

# Using string as input data
data = {"data": "This is some string."}

# Using list as input data
data = {"data": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}

# Using dictionary as input data
data = {
    "data": {
        "string_data": "A very nice string.",
        "list_data": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    }
}

Using file as input

The only exception is for local files. When using local files as algorithm inputs, you can send the data in binary:

You can open the file yourself:

with open("YOUR_LOCAL_FILE_PATH", "rb") as file:
    data = file.read()

Or you can simply pass in the local file path:

data = "YOUR_LOCAL_FILE_PATH"

Calling an algorithm

data = {"data": "Jason"}

# Indicating which algorithm to use
algo = client.algo('algo://adamleo/hw/')

# Call the algorithm with the data you prepared previously.
response = algo.pipe(data)

print(response)
>>> Jason: Hello world!


# ...... Continue your application.


Go to different algorithms listed on the left to use them for free!