Appearance
First steps with CalypsoAI API
Find out what you need at the start of your journey with our API.
Before you start using our products, make sure you follow these simple steps.
Get your authorization token
To communicate with our API, you must use a token. You can create a token in our CalypsoAI Platform.
To create a token:
- Log in to CalypsoAI.
- From the menu, in the Configuration section, select API tokens.
- Depending on the type of token you require, select either the Global tab or the Personal tab.
- Select Generate API token.
- In the popup, do the following:
- In ID name, enter a name for your token.
The name is displayed in the list of all your tokens. - In Expires at, select the date when your token stops being valid.
CHANGING TOKENS
As a best security practice, change tokens regularly, at least once a year.
- In ID name, enter a name for your token.
- Select Save.
- In the popup, copy the token value.
STORING THE TOKEN
Make sure you store the token value securely — you will not see this value again.
Add a provider
A provider is a connection to an LLM or application, for example, an internally hosted model or an LLM created and hosted by a company. To connect to the required AI models, first you need to add the relevant provider.
PROVIDERS, CONNECTIONS, MODELS AND APPLICATIONS
In our system, depending on the context, we use four closely-related terms.
- Provider: A general backend term used in our API.
- Connection: An API integration with a model or an application.
- Model: A connection for both the Inference Defend and the Inference Red-Team products. This is an AI model.
- Application: A connection for the Red-Team product. This can be an AI model, a chatbot, or a text-based application.
ROLES AND PERMISSIONS
To create providers, users need to have required permissions and roles in our system.
Adding a provider is a bit different for Defend and Red-Team users. Both Defend and Red-Team users can add model connections, but only Red-Team users can add application connections.
To add a model (Defend and Red-Team):
- Log in to CalypsoAI.
- From the menu, in the Configuration section, select Connections.
- On the Models tab, add a connection.
- If you want to use one of our recommended providers, follow these steps:
- Find the provider in the list and select Add.
- Provide the relevant values.
- Provider Display Name: Enter a unique name for your provider that will be displayed in the list of all connections.
- Model name: Enter the exact name of the model offered by the provider.
WRONG NAME
This field is case-sensitive. If you enter a wrong name, the connection will fail.
- API key: Paste the relevant authorization token for the selected model.
- Select Test and Connect.
- Fix any errors, if required.
Your model is added to the system.
- If you want to use a different provider, follow these steps:
- Select Add other providers.
- Provide the relevant values.
- Provider Display Name: Enter a unique name for your provider that will be displayed in the list of all connections.
- Example configuration: From the list, select the template for your connection.
The Inputs and Configuration sections get filled with template code. - Model Display Name: Enter a unique name for your model that will be displayed in the list of all models.
- Key / Value: Enter the key and value of your API secret generated for that model.
You should get your API secret from the provider's website.
- In the Inputs section, edit the template code as required.
This section contains environment variables used when running the script, for example, model names or URLs. - In the Configuration section, edit the template code as required.
This section contains relevant backend scripts. - Select Test and Connect.
- Fix any errors, if required.
Your model is added to the system.
- Select Add other providers.
- If you want to use one of our recommended providers, follow these steps:
To add an application (Red-Team only):
- Log in to CalypsoAI.
- From the menu, in the Configuration section, select Connections.
- On the Applications tab, select Add application.
- Provide the relevant values.
- Example configuration: From the list, select the template for your connection.
The Inputs and Configuration sections get filled with template code. - Application display name: Enter a unique name for your application that will be displayed in the list of all connections.
- Key / Value: Enter the key and value of your API secret generated for that model.
You should get your API secret from the provider's website.
- Example configuration: From the list, select the template for your connection.
- In the Inputs section, edit the template code as required.
This section contains environment variables used when running the script, for example, model names or URLs. - In the Configuration section, edit the template code as required.
This section contains relevant backend scripts. - If you want to add a logo for your application, in the App logo section, select Upload a logo, and select the relevant image file.
- Select Test and Connect.
- Fix any errors, if required.
Your application is added to the system, and you can use it for attack campaigns.
Install the SDK
Our dedicated Python SDK is the recommended way of interacting with CalypsoAI API.
To install our SDK:
Make sure you have pip installed.
Run the following command:
shellpip install https://www.us1.calypsoai.app/backend/v1/sdk/calypsoai-2.47.0-py3-none-any.whl
Next steps
Now, you're ready to start using our products! Check the following tutorials to complete your CalypsoAI onboarding journey.