Catalog PyPI
PACKAGE EXPLORERView in registry

aiml-api

PyPI

AI/ML API library for a simple and seamless connection to AI/ML services.

Versions collected1
Direct dependencies2From release 0.1.4
Last observed21 Oct, 11:19 UTC

README

Version 0.1.4 documentation

AI/ML API Python library

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)

Documentation

Getting started with the AI/ML API is simple. Follow these steps to set up your integration:

1. Get Your API Key

To begin, you need an API key. You can obtain yours here:
🔑 Get Your API Key

2. Explore Available Models

Looking for a different model? Browse the full list of supported models:
📚 Full List of Models

3. Read the Documentation

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

4. Need Help?

If you have any questions, feel free to reach out. We’re happy to assist! 🚀 Discord

Installation

After obtaining your API key, create an .env file and copy the required contents into it.

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 aiml_api package

# install from PyPI
pip install aiml_api

Usage

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)

Running the Script

To execute the script, use:

python3 <your_script_name>.py

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.427 Feb 20252

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:ffbdda2dad34ed3184caa6e5e7507aac9167070de919776dbfa48169298cf91a