Observed since 21 Oct, 11:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI/ML API library for a simple and seamless connection to AI/ML services.
The AI/ML Python library provides convenient access to the AI/ML API.
(Currently, only chat completion and embeddings are supported. If you'd like to help improve this library, feel free to join our Discord)
Getting started with the AI/ML API is simple. Follow these steps to set up your integration:
To begin, you need an API key. You can obtain yours here:
🔑 Get Your API Key
Looking for a different model? Browse the full list of supported models:
📚 Full List of Models
For detailed setup instructions and usage guidelines, refer to the official documentation. If you’d like to get started quickly, check out our examples below.
And don’t forget the first step—you’ll need an API key! ^^
📖 AI/ML API Docs
If you have any questions, feel free to reach out. We’re happy to assist! 🚀 Discord
touch .env
Then, copy the code below, paste it into your .env file, and set your API key to AIML_API_KEY="".
AIML_API_KEY = ""
AIML_API_URL = "https://api.aimlapi.com/v1"
# install from PyPI
pip install aiml_api
from aiml_api import AIML_API
api = AIML_API()
completion = api.chat.completions.create(
model="mistralai/Mistral-7B-Instruct-v0.2",
messages=[
{"role": "user", "content": "Explain the importance of low-latency LLMs"},
],
temperature=0.7,
max_tokens=256,
)
response = completion.choices[0].message.content
print("AI:", response)
To execute the script, use:
python3 <your_script_name>.py
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.4 | 27 Feb 2025 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ffbdda2dad34ed3184caa6e5e7507aac9167070de919776dbfa48169298cf91a