clevrML-background_edited.jpg

Athena Documentation

Screenshot%202021-04-20%2011.50_edited.p

Welcome to the Athena documentation! Please note that you need to be accepted into clevrML's early access program to use any of the Athena APIs. All requests will be rejected without a valid API Key.

 

Introduction to Athena

Screenshot%25202021-04-20%252011_edited.

clevrML is an Artificial Intelligence company that is focused on finding better AI technologies for developers and businesses. Our Athena project is the result of recent research and development to make adaptable AI models with our Active Memory Learning technology. 

Practically, Athena is a single Artificial Intelligence model (program) that has the ability to do many different "classification" tasks. Currently, Athena can predict almost any image, text or categorical task with a few learning examples. Because Athena was engineered for flexibility, Athena does not know any "labels" (things to predict); It knows how to learn new things quickly.

 

Say for example you have AI model "M" and Athena. With model "M", you may be able to predict images of cats, dogs, planes and people (these are "labels"). As a developer, you would be able to send a single image and get a prediction back if your image was one of the four "labels". However, model "M" would not be capable of predicting anything outside of these bounds because it is not "trained" to do so. Athena by default does not know any of these labels, in fact, it does not know any labels. Instead, Athena is an end-to-end real-time learning algorithm. With Athena, you would supply 3 to 5 examples of a cat, dog, plane, and peoople to make a prediction with a new image. If you wanted to predict a new label, you simply provide a few examples and Athena will be able to make a prediction. Athena can do this with images, text and categorical data. Whereas you would have to build 3 separate "M" models for the different data types, Athena does it all. This allows for huge flexibility within your application or service.

The biggest benefits of using Athena are the following:

  • No more AI model engineering: With current AI methods, you have to spend lots of time engineering the right model to fit your data. As a real-time learning algorithm, Athena has been built for you ahead of time so you can easily set it to your task.

  • Little to no data collection: Integrating AI into a service or business can be difficult because of how data-hungry current AI technologies are. For example, you typically need on the order of 10,000 to 100,000 examples to build very robust AI systems. With Athena, you only need to collect 3 to 5 examples per label. This saves you massive amounts of time and money.

  • Predictable Pricing: ​A common challenge with AI projects is estimating how much development will cost. The reason for this is nature of how AI is built: AI needs to be trained for hours, days or even weeks on high-end computing. The underlying technology behind Athena allows us to take out training and instead utilize a flexible memory. With this model, we offer fixed monthly pricing instead of variable pricing. Athena makes it easier for developers and businesses to plan financially compared to any other AI API. 

 

Athena is currently only available through application into clevrML's Early Access Program. Because Athena is in a pilot project phase, it's important to outline what to expect when using Athena and our general recommendations.

Expectations

  • No AI model is perfect, and neither is Athena: It's easy to get excited about newly emerging AI technologies like Athena. It's always important to remember that Athena is still AI; In other words, it's not perfect. AI systems are always prone to unexpected behavior at any level (mispredictions, false positives, etc). 

  • There will be minor bugs: We have done our best that we can up until this point to squash any common bugs that we foresee. It is important to remind everyone using Athena that it is in a pilot phase; In other words, we have released Athena earlier to diagnose/ improve on any possible bugs. In exchange, you will receive access to any of our future iterations of Athena prior to anyone else who is not in the first group of beta testers.

  • Expect Some Latency: Our first pilot group has been limited to 20 companies. Usage within each of these companies may vary which could result in lower-traffic to the Athena API, which will increase "cold starting". As we grow our pilot group, we expect latency to go down.

Recommendations:

  • Use Athena experimentally first: We give every early access member 150 free predictions. Our intention with this is to give our early access members a chance to see if Athena will fit their application without any risk. If you decide to upgrade to a paid plan, we still recommend using Athena experimentally at first or to a limited scope of users.

  • Use Our Python SDK: Athena is a REST API that can be used with any programming language or web method. However, we highly recommend using our Python SDK to stop preventable bugs within your API call. We have built the SDK with ease of use in mind.

Expectations For Athena

Pricing

All early access members receive 150 free predictions that can be activated within the Athena Dashboard. After your free tier, the following pricing plans can be activated:

Experiment: $15/Month

- 1000 Athena predictions per month

- $0.009 per prediction after 1000 predictions

Develop: $35/Month

- 10,000 Athena predictions per month

- $0.008 per prediction after 10,000 predictions

Create: $100/Month

- 100,000 Athena predictions per month

- $0.007 per prediction after 100,000 predictions

Scale: $800/Month

- 1,000,000 Athena predictions per month

- $0.005 per prediction after 1,000,000 predictions

At this time we are not offering enterprise pricing.

 

Please note: extra usage (i.e: over 1000, over 10,000 etc.) will be billed at the end of each billing period.

 

Getting Started

To get started with Athena, please read the following steps:

Activate Free Trial (150 Free Predictions):
1. Go to the Athena Dashboard
2. On the main page, click the "Activate Now" button on the left-most card
3. Follow on-screen instructions 
4. Copy your trial API Key

Activate Paid Plan
1. Go to the Athena Dashboard
2. On the main page, click the "Activate Now" button on the center card
3. Select a plan
4. Enter payment credentials 
5. If your payment card was valid, you will be taken to a page to copy your API key



Install Python SDK

Copy to Clipboard

Copied!

pip install clevrml

 

API Documentation

Image Classification

Run image classification predictions with Athena.

Endpoint:

https://earlyaccess.api.clevrml.com/athena/v1/predict

Method: POST/JSON

Arguments:                  required                          optional

api_key (string): The API key associated with your Athena early access account. This key is sent to you by clevrML.

learning_object (Dictionary/Object): An object containing all of the examples you show to allow Athena to perform real-time learning. For image classification, you must include the key       that has a value of a two-dimensional list/array. The secondary dimension of the list/array must contain two strings that represent the image path and its label. For instance:

 inference (Dictionary/Object): An object/dictionary containing the path to the inference image. This object/dictionary must contain the key                     with its value being a path to the inference image (string). For instance:

allow_keep (Boolean): A boolean value that allows clevrML to keep the data you send to Athena. We use this data to further improve Athena and build new models. Set to True to allow, otherwise set to False.

trial (Boolean): A boolean value for users still using trial API keys. If you are using the 150 free predictions, set this parameter to True, otherwise set to False by default.

"image"

"image": [

           ["path1.jpg", "label-1"],

           ["path2.jpg", "label-1"],

           ["path3.jpg", "label-2"]

              ....

]

"image"

{"image": "inference-path.jpg"}

Python

Copy to Clipboard

Copied!

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

 from  clevrml import Athena
import os
 
key = os.environ[
'API-KEY']
athena = Athena()
 
athena.predict(
    api_key=key,
    learning_object={
       
'image': [
            [
'dog1.jpg', 'dog'],
            [
'dog2.jpg', 'dog'],
            [
'cat1.jpg', 'cat'],
            [
'cat2,jpg', 'cat']
        ]
      },
    inference={
     
'image': 'cat-prediction.jpg'
    },
    allow_keep=
True
)

 

Text Classification

Run text classification predictions with Athena.

Endpoint:

https://earlyaccess.api.clevrml.com/athena/v1/predict

Method: POST/JSON

Arguments:                  required                          optional

api_key (string): The API key associated with your Athena early access account. This key is sent to you by clevrML.

learning_object (Dictionary/Object): An object containing all of the examples you show to allow Athena to perform real-time learning. For text classification, you must include the key       that has a value of a two-dimensional list/array. The secondary dimension of the list/array must contain two strings that represent the text example and its label. For instance:

 inference (Dictionary/Object): An object/dictionary containing the string to the inference text snippet. This object/dictionary must contain the key                     with its value being a string. For instance:

allow_keep (Boolean): A boolean value that allows clevrML to keep the data you send to Athena. We use this data to further improve Athena and build new models. Set to True to allow, otherwise set to False.

trial (Boolean): A boolean value for users still using trial API keys. If you are using the 150 free predictions, set this parameter to True, otherwise set to False by default.

"text"

"text": [

           ["sentence1", "label-1"],

           ["sentence2", "label-1"],

           ["sentence3", "label-2"]

              ....

]

"text"

{"text": "sentence used for prediction"}

Python

Copy to Clipboard

Copied!

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

 from  clevrml import Athena
import os
 
key = os.environ[
'API-KEY']
athena = Athena()
 
athena.predict(
    api_key=key,
    learning_object={
       
'text': [
            [
'sentence1', 'positive'],
            [
'sentence2', 'positive'],
            [
'sentence3, 'negative'],
            [
'sentence4', 'negative']
        ]
      },
    inference={
     
'text': 'This is a great day!!'
    },
    allow_keep=
True
)

"categorical"

Categorical Classification

Run categorical classification predictions with Athena.

Endpoint:

https://earlyaccess.api.clevrml.com/athena/v1/predict

Method: POST/JSON

Arguments:                  required                          optional

api_key (string): The API key associated with your Athena early access account. This key is sent to you by clevrML.

learning_object (Dictionary/Object): An object containing all of the examples you show to allow Athena to perform real-time learning. For categorical classification, you must include the key             that has a value of a two-dimensional list/array. The secondary dimension of the list/array must contain two strings that represent the categorical data points and its label. For instance:

 inference (Dictionary/Object): An object/dictionary containing the inference value (categorical data points). This object/dictionary must contain the key                                  with its value being a list/array of data. For instance:

 

allow_keep (Boolean): A boolean value that allows clevrML to keep the data you send to Athena. We use this data to further improve Athena and build new models. Set to True to allow, otherwise set to False.

trial (Boolean): A boolean value for users still using trial API keys. If you are using the 150 free predictions, set this parameter to True, otherwise set to False by default.

"categorical": [  # second dimension can be any length

           ["data-point1", "data-point2", "label-1"],

           ["data-point3", "data-point4", "label-1"],

           ["data-point5", "data-point6", "label-2"]

              ....

]

"categorical"

{"categorical": ["data-point1", "data-point2"]}

# Since you are trying to predict the label, your array should be one less in length compare to the "learning_object" arrays

Python

Copy to Clipboard

Copied!

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

 from  clevrml import Athena
import os
 
key = os.environ[
'API-KEY']
athena = Athena()
 
athena.predict(
    api_key=key,
    learning_object={
     
'categorical': [
       [
'sunny', 'clear', 'Yes'],
       [
'sunny', 'overcast', 'Yes'],
       [
'Foggy', 'Rain', 'No'],
       [
'Cloudy', 'overcast', No]
     ]
    },
    inference={
      
'categorical': [
'Cloudy', 'overcast']
    },
    allow_keep=
True
)