Supported SDKs
A description of the software development kits (SDKs) that can be used to interact with the AIML API.
This page describes the SDKs that can be used to call our API.
Also take a look at the INTEGRATIONS section — it covers many third-party services and libraries (workflow platforms, coding assistants, etc.) that allow you to integrate our models in various ways.
REST API
We use the REST API because it’s fast, simple, and easy to understand. Only in Python do you need to import a separate library (requests), while cURL and JavaScript (Node.js) already have built-in support for HTTP requests. Therefore, REST API is used in the documentation examples for all of our models.
Installation
In Python examples, you need to import the requests library. The Node.js and cURL examples do not require any additional imports.
Install the library first:
pip install requestsImport the library in every Python code snippet where you make calls to the REST API.
Authorization
Our API authorization is based on a Bearer token. Include it in the Authorization HTTP header within the request. Example:
Request Example
OpenAI
The OpenAI SDK is a convenient library that simplifies working with our API. It automatically handles JSON responses, includes built-in error handling and retry logic, and provides simple, easy-to-use methods for all API features such as chat, embeddings, and completions.
Installation
Example Code
AI/ML API Python library
We have started developing our own SDK to simplify the use of our service.
If you’d like to contribute to expanding its functionality, feel free to reach out to us on Discord!
Installation
After obtaining your AIML API key, create an .env file and copy the required contents into it.
Copy the code below, paste it into your .env file, and set your API key in AIML_API_KEY="<YOUR_AIMLAPI_KEY>", replacing <YOUR_AIMLAPI_KEY> with your actual key:
Install the package:
Request Example
To execute the script, use:
Next Steps
Last updated
Was this helpful?