QUICK LINKS

GETTING STARTED

COMPONENTS

TUTORIALS

With our SDK, you can perform nearly every action available in the AryaXAI GUI.

To get started, you'll need an invitation to sign up. If you haven't received one yet, please reach out to our team at [email] with your request.

Once these steps are completed, a confirmation of account verification is sent to your inbox, through which your organization can be accessed.

Prerequisite:

  1. Sign up and log in to AryaXAI using the steps mentioned above.
  2. After logging in, generate an Access Token for your user account. You can find this option in the profile dropdown menu at the top right corner of AryaXAI dashboard.
  1. Set the environment variables ‘XAI_ACCESS_TOKEN’ with the generated value.

You can create multiple tokens from here.

NOTE: The SDK Access Token is unique and is linked to your User ID, not the Organization ID.

Once you've completed these steps, you're all set! Now, you can easily log in and start using the AryaXAI SDK:

  1. Log in by importing the "xai" object instance from the "arya_xai" package.
  2. Call the "login" method. This method automatically takes the access token value from the "XAI_ACCESS_TOKEN" environment variable and stores the JWT in the object instance. This means that all your future SDK operations will be authorized automatically, making it simple and hassle-free!
NOTE: The creation of tokens is limited to a maximum of five per user. Furthermore, each token can only be used in a single instance at any given time.

AryaXAI SDK installation and usage


#!pip3 install aryaxai --upgrade --no-cache

!pip3 show aryaxai

Importing & Authenticating SDK


import os

os.environ["XAI_ACCESS_TOKEN"]=''   # your access token

# Import arya xai module
from aryaxai import xai as aryaxai
## login() function authenticates user using token that can be generated in app.aryaxai.com/sdk

aryaxai.login()

Enter your Arya XAI Access Token: ··········
Authenticated successfully.

# See Notification you get across all workspaces and projects
aryaxai.get_notifications()