Rest API

Arize AI for Model Monitoring, Troubleshooting, and Explainability

Overview

Arize's APIs are the main ingresses for data which powers our platform. Most applications will use an existing SDK in the language of your choice, but it's important to know what the underlying API looks like first in case you want to work in a language without a current SDK implementation.

Authentication

Arize uses API keys in conjunction with a Space key in order to authenticate request. You will receive your keys once you sign up for our product. Your API and Space keys are the keys to your data castle so be sure to keep them secure. Do not share your keys in public forums including Github, StackOverflow, logs, etc. The API key is authenticated via auth header, use -H 'Authorization: API_KEY_VALUE' while the Space key is included on the body of the request

Response Codes

Arize uses conventional HTTP response codes to convey resulting success or failure of a given request. Codes in the 2XX range indicate success, 4XX range indicate content failure, 5XX indicate errors with Arize's edge servers.

Full Record

To send an individual prediction record, you should hit Arize's log API https://api.arize.com/v1/log

Supported label types

Request Example (numeric label)

curl --request POST 'https://api.arize.com/v1/log' \
--header 'Authorization: API_KEY' \
--data-raw '{
   "model_id":"example_model_id",
   "prediction_id":"ef00f52c-d6d4-4e48-84cd-70166b3f423f",
   "prediction":{
      "timestamp":"2020-10-02T00:37:30.208687Z",   //Optional, defaults to now()
      "model_version":"v0.1",
      "label":{
         "numeric":0.1
      },
      "features":{
         "feature_1_float":{
            "double":0.6604474844066184
         },
         "feature_2_str":{
            "string":"str val"
         },
         "feature_4_bool":{
            "string":"True"
         },
         "feature_2_float":{
            "double":0.02876647860632975
         },
         "feature_3_float":{
            "double":0.3358383777892534
         },
         "feature_0_np_ll":{
            "int":"77"
         },
         "feature_3_bool":{
            "string":"True"
         },
         "feature_1_str":{
            "string":"str val"
         },
         "feature_1_np_ll":{
            "int":"1"
         },
         "feature_4_float":{
            "double":0.9681327640084113
         },
         "image_embedding":{
            "embedding":{
               "vector":[
                  1.0,
                  2.0,
                  3.0
               ],
               "link_to_data":"https://my-bucket.s3.us-west-2.amazonaws.com/puppy.png"
            }
         },
         "feature_2_bool":{
            "string":"True"
         },
         "feature_2_np_ll":{
            "int":"91"
         },
         "feature_0_str":{
            "string":"str val"
         },
         "feature_4_np":{
            "double":0.543297819558724
         },
         "feature_1_bool":{
            "string":"True"
         },
         "feature_3_np":{
            "double":0.5149428483266209
         },
         "feature_4_str":{
            "string":"str val"
         },
         "nlp_embedding_sentence":{
            "embedding":{
               "vector":[
                  4.0,
                  5.0,
                  6.0,
                  7.0
               ],
               "link_to_data":"",
               "raw_data":{
                  "tokenArray":{
                     "tokens":[
                        "This is a test sentence"
                     ]
                  }
               }
            }
         },
         "feature_2_np":{
            "double":0.29966708188607294
         },
         "feature_3_np_ll":{
            "int":"46"
         },
         "feature_1_np":{
            "double":0.8751167134832335
         },
         "feature_0_np":{
            "double":0.3854629460534247
         },
         "feature_0_bool":{
            "string":"True"
         },
         "feature_4_np_ll":{
            "int":"74"
         },
         "feature_0_float":{
            "double":0.5696514798125208
         },
         "feature_3_str":{
            "string":"str val"
         },
         "nlp_embedding_tokens":{
            "embedding":{
               "vector":[
                  4.0,
                  5.0,
                  6.0,
                  7.0
               ],
               "link_to_data":"",
               "raw_data":{
                  "tokenArray":{
                     "tokens":[
                        "This",
                        "is",
                        "a",
                        "test",
                        "token",
                        "array"
                     ]
                  }
               }
            }
         }
      },
      "tags":{
         "tag_str":{
            "string":"arize"
         },
         "tag_int":{
            "int":"0"
         },
         "tag_double":{
            "double":20.2
         },
         "tag_bool":{
            "string":"True"
         }
      }
   },
   "actual":{
      "label":{
         "numeric":0.1
      },
      "tags":{
         "tag_str":{
            "string":"arize"
         },
         "tag_int":{
            "int":"0"
         },
         "tag_double":{
            "double":20.2
         },
         "tag_bool":{
            "string":"True"
         }
      }
   },
   "space_key":"YOUR SPACE KEY HERE",
   "environment_params":{
      "production":{
         
      }
   }
}'

Actual

To send an individual actual record, you should hit Arize's log API https://api.arize.com/v1/log

Supported label types

Request Example (score categorical label)

curl --request POST 'https://api.arize.com/v1/log' \
--header 'Authorization: API_KEY' \
--data-raw '
{
   "model_id":"example_model_id",                          //Required
   "prediction_id":"027ed30c-6333-4eab-9492-61e117b1b46f", //Required
   "actual":{                                              //Required
      "label":{
         "score_categorical":{
            "score_category":{
               "category":"orange",
               "score":1.0
            }
         }
      }
   },
   "space_key":"YOUR SPACE KEY HERE",                      //Required
   "environment_params":{                                  //Required
      "production":{
         
      }
   }
}'

Questions? Email us at support@arize.com or Slack us in the #arize-support channel

Last updated

Copyright © 2023 Arize AI, Inc