# akenoai-lib
[](https://github.com/TeamKillerX/akenoai-lib)
[](https://github.com/TeamKillerX/akenoai-lib/graphs/commit-activity)
[](https://github.com/TeamKillerX/akenoai-lib)
[](https://github.com/TeamKillerX/akenoai-lib/blob/main/LICENSE)
[](https://makeapullrequest.com)
[](https://pypi.org/project/akenoai)
[](https://pypi.org/project/akenoai)
[](https://results.pre-commit.ci/latest/github/TeamKillerX/akenoai-lib/main)
### 🚨 Important Notice:
> [!IMPORTANT]
> Read Before Using!
>
> 📜 Read the Code of Conduct:
> 🔗 [`CODE_OF_CONDUCT`](https://github.com/TeamKillerX/akenoai-lib/blob/main/CODE_OF_CONDUCT.md)
```
- ⚠️ Public copy-pasting without permission violates the rules!
- 🚨 This may result in a GitHub copyright report.
- ⚠️ Your developer account could be blacklisted.
- ❌ You may lose access to your GitHub username permanently.
- 📢 Respect open-source rules & contribute responsibly! 🚀
```
### installation
🔹 <b>Recommended Installation:</b>
✅ Install via [`PYPI`](https://pypi.org/project/akenoai) for the latest updates. e.g.: `pip3 install akenoai[fast]`
✅ Install via github
- Create a requirements.txt file in the project root containing the following dependency to ensure you can install the GitHub version:
- `git+https://github.com/TeamKillerX/akenoai-lib.git#egg=akenoai[fast]`
### How to learn python
- Usage Examples:
```py
class RandyDev(BaseDev):
def __init__(self, public_url: str = "https://your-api-endpoint/api/v1"):
super().__init__(public_url)
self.chat = self.Examples(self)
class Examples:
def __init__(self, parent: BaseDev):
self.parent = parent
@fast.log_performance
async def create(self, model: str = None, is_obj=False, **kwargs):
# your code
pass
```
- Please fork the repository and submit a pull request
- Your Own API
- `https://your-api-endpoint/api/v1`
- An API key is required here.
```
dl/{model}
user/{model}
ai/{model}
```
You can use `AkenoXToJs()` passing
```py
js = AkenoXToJs(public_url="https://your-api-endpoint/api/v1")
js.randydev.chat.create(...)
```
AkenoXToJs automatically configures the connection, so there's no need to manually initialize it using OldAkenoXToJs and its randydev method.
```py
js = OldAkenoXToJs(public_url="https://your-api-endpoint/api/v1")
js.randydev("api/endpoint", api_key="", custom_dev_fast=True)
```
### FastAPI Demo
- Use `main.py`
- Try running `python3 main.py`
```py
from akenoai.runner import run_fast
# run_fast initializes a FastAPI server with example routes and configurations.
run_fast()
```
### Code examples
> [!TIP]
> Trip PRO Usage Example:
- Use Access API key V2 Premium
```py
from akenoai import AkenoXToJs
js = AkenoXToJs()
response = await js.randydev.chat.create(
model="qwen/qwen1.5-1.8b-chat",
api_key="<your-api-key-premium>",
is_obj=True,
query="Hello, how are you?"
)
print(response)
```
- 📥 Example Downloader:
```py
from akenoai import AkenoXToJs
js = AkenoXToJs()
download_response = await js.randydev.downloader.create(
model="instagram-v4",
api_key="<your-api-key-free>",
is_obj=False,
url="https://www.instagram.com/reel/DA0p2NoyN_O/?igsh=MWJvejMxZmZ5ZHd3YQ=="
)
print(download_response)
```
### 🌐 Streamlit + AkenoX API
- installation: `pip3 install akenoai[streamlit]`
- You can use `streamlit run app.py`
- `akenoai[fast]` → <b> no import Pyrogram error:</b> *There is no current event loop* (<b>Stuck in Streamlit</b>)
- Full Example usage:
Note: The import path changed from `akenoai import AkenoXToJs` to `akenoai.streamlit import StreamlitToJs` to clearly separate the streamlit integration functionality from the core API. The previous import path is now deprecated.
```py
import requests
import json
import time
from akenoai.streamlit import StreamlitToJs as js
class GithubUsername:
def __init__(self, username):
self.username = username
def get_github_data(self):
req = requests.get(f"https://api.github.com/users/{self.username}").json()
try:
return req
except Exception as e:
base_msg = f"**Error!** \n\n**Traceback:** \n `{e}` \n\n`Make sure that you've sent the command with the correct username!`"
return base_msg
js_st = js.stl()
js_st.title("Welcome to akenoai-lib APP")
js_st.write("Developed by RandyDev")
js_st.write("GitHub User Information")
with js_st.form("github"):
username = js_st.text_input("Enter GitHub username:")
submit_checkbox = js_st.checkbox("Allow users", value=False)
submitted = js_st.form_submit_button("Submit")
if submitted and submit_checkbox:
js_st.spinner("Fetching GitHub data...")
github_data = GithubUsername(username).get_github_data()
if isinstance(github_data, dict):
js_st.json(github_data)
else:
js_st.error(github_data)
js_st.title("Examples JSON by AkenoX API")
with js_st.form("json"):
submitted = js_st.form_submit_button("Submit")
if submitted:
js_st.spinner("Loading......")
try:
js_st.json(
js.no_async_randydev("json/all", is_obj=False)
)
except Exception as e:
js_st.error(str(e))
js_st.title("ChatGPT AI")
with js_st.form("openai"):
text = js_st.text_area('Enter text:', 'How to JavaScript code?')
submitted = js_st.form_submit_button('Submit')
placeholder = js_st.empty()
free_api_key_on = js_st.toggle("Free API Key")
if submitted:
try:
if free_api_key_on:
with placeholder, js_st.spinner("Processing......"):
time.sleep(5)
js_st.write(
js.no_async_randydev("ai/openai/gpt-old", is_obj=True, query=text).results
)
js_st.success("Join Channel Telegram : @RendyProjects")
else:
js_st.warning('Use button Free API Key', icon="⚠️")
except Exception as e:
js_st.error(str(e))
js.waifu_random()
js.hide_streamlit_watermark(unsafe_allow_html=True)
```
> [!WARNING]
>
>⚠️ Breaking Change ⚠️
> Note: The import path has changed!
>
> To better separate Streamlit integration from the core API, the import path has been updated:
> ❌ <b>Deprecated:</b>
> `from akenoai import AkenoXToJs`
>
> ✅ Use this <b>instead:</b>
> `from akenoai.streamlit import StreamlitToJs`
>
> Make sure to update your imports to avoid issues. 🚀
- [X] If using API `[fast]` for <b>full-stack</b>, move to `akenoai.clients`:
```py
from akenoai.clients import create_pyrogram # Use [fast]
```
### 🛠️ Custom OpenAI
```py
from akenoai import OldAkenoXToJs
js = OldAkenoXToJs()
fast_app = js.get_app()
js.custom_openapi(
app=fast_app,
logo_url="https://github-production-user-asset-6210df.s3.amazonaws.com/90479255/289277800-f26513f7-cdf4-44ee-9a08-f6b27e6b99f7.jpg",
title="AkenoX Beta AI API",
version="1.0.0",
summary="Use It Only For Personal Projects",
description="Free API By akenoai-lib",
routes=fast_app.routes,
)
```
### 🥷 Full-Stack Examples
- [X] Powerful & Super Fast Performance
- [X] Recommended RAM: 8GB / 16GB
- [X] Supports `bot_token` & `session_string`
- [X] Custom Web Frontend with HTML & CSS
```py
import logging
from akenoai import OldAkenoXToJs
from akenoai.runner import run_fast
from akenoai.clients import create_pyrogram
js = OldAkenoXToJs()
logger = logging.getLogger(__name__)
LOGS = logging.getLogger("[akenox]")
logger.setLevel(logging.DEBUG)
from akenoai.models import BaseModel
class Items(BaseModel):
message: str
fast_app = js.get_app()
js.add_cors_middleware()
assistant = create_pyrogram(
name="fastapi-bot",
api_id=1234,
api_hash="asdfghkl",
bot_token="1235:asdfh"
)
user_client = create_pyrogram(
name="fastapi-user",
api_id=1234,
api_hash="asdfghkl",
session_string="session"
)
@fast_app.on_event("startup")
async def startup_event():
bot = await assistant.start()
user = await user_client.start()
LOGS.info(f"Started UserBot & Assistant: {user.me.first_name} || {bot.me.first_name}")
@fast_app.get("/api/cohere")
async def cohere(query: str):
return await js.randydev(
"ai/cohere/command-plus",
api_key="<your_api_key>",
custom_dev_fast=True,
query=query,
chatHistory=[],
system_prompt="You are a helpful AI assistant designed to provide clear and concise responses."
)
@fast_app.get("/item")
async def example_test(item: Items):
return {"message": item.message}
@fast_app.get("/test")
async def example_json():
async with js.fasthttp().ClientSession() as session:
async with session.get("https://jsonplaceholder.typicode.com/todos/1") as response:
title = js.dict_to_obj(await response.json()).title
return {"message": title}
@fast_app.get("/api/tg/send_message")
async def send_message(text: str, chat_id: str):
response_json = await client.send_message(chat_id, text)
return {"message_id": response_json.id}
js.custom_openapi(
app=fast_app,
logo_url="https://github-production-user-asset-6210df.s3.amazonaws.com/90479255/289277800-f26513f7-cdf4-44ee-9a08-f6b27e6b99f7.jpg",
title="AkenoX Beta AI API",
version="1.0.0",
summary="Use It Only For Personal Project",
description="Free API By akenoai-lib",
routes=fast_app.routes,
)
run_fast(build=fast_app)
```
### 🔹 <b>Method Definition:</b>
- [X] Parameters:
- `endpoint:` The API endpoint to call.
- `api_key:` (Optional) API key for authentication.
- `is_obj:` Boolean flag indicating whether the response should be returned as a Python object (True) or in the default format (False).
- `**params:` Allows passing additional parameters as a dictionary, which will be sent as JSON.
### 🔹 <b>User Creation Date:</b>
This feature retrieves the date when the user's account was initially created. It provides a reliable audit trail and allows users or administrators to verify the account's age, which can be important for purposes such as eligibility verification, security audits, or account management.
```py
import os
from akenoai import OldAkenoXToJs
js = OldAkenoXToJs()
response = await js.randydev(
"user/creation-date",
custom_dev_fast=True,
user_id=client.me.id
)
return response
```
### 🔑 API Key
> [!NOTE]
> How to Get an API Key for AkenoX API?
>
> Different V1 Free and V2 Access Premium
>
> You can set up your API key using environment variables:
```env
AKENOX_KEY=akeno_xxxxxx
```
- To get an API key, [`@aknuserbot`](https://t.me/aknuserbot)
- 🚀 Thank you to our 2.7 million users per request!
### ⚠️ Problem Double Fix:
🛠️ **Double Fix for Connection Issues**
- ❌ **Cannot connect to host**
- 🚫 **IP address blocked issue**
- 🌐 **Different DNS settings**
```py
from akenoai import OldAkenoXToJs
js = OldAkenoXToJs()
proxy_url = "http://PROXY.YOUR-SERVER.COM:8080"
return await js.randydev(
"ai/openai/gpt-old",
api_key="akeno_xxxxxxx",
proxy_url=proxy_url, # Use proxy if needed
post=False,
custom_dev_fast=True
)
```
---
### **📌 Custom API endpoints**
| Feature | **Itzpire API** (Proxy Required) | **AkenoX API** (No Proxy)
|---------------|--------------------------------|--------------------------|
| **API Key** | ❌ Not required | ✅ Required |
| **Speed** | ⚠️ Slower (Proxy used) | 🚀 Fast (Direct request) |
| **Stability** | ✅ Works even if blocked | ✅ Stable & optimized |
| **Use Case** | 🔄 Bypassing restrictions | ⚡ Direct & fast access |
| **IP Ban Status** | 🚷 IP address has been banned. | ✅ IP address not banned |
| **Rate Limit** | ✅ Unlimited | ⏳ 100 requests per minute |
| **Network** | ❌ No Limits | ✅ Limited Network access |
| **Custom Public Url** | `https://itzpire.com` | ✅ Default |
---
---
| Feature | **OpenAI** | **Deepseek**
|---------------|--------------------------------|--------------------------|
| **API Key** | ✅ Required | ✅ Required |
| **Speed** | ? | ? |
| **Stability** | ✅ Stable & optimized | ✅ Stable & optimized |
| **Use Case** | ? | ? |
| **IP Ban Status** | ? | ? |
| **Rate Limit** | ? | ? |
| **Network** | ? | ? |
| **Custom Public Url** | `https://api.openai.com/v1` | `https://api.deepseek.com/v1` |
---
### ❤️ Special Thanks To
- [`Kurigram`](https://github.com/KurimuzonAkuma/pyrogram)
- [`FastAPI`](https://github.com/fastapi/fastapi)
- Thank you all developers 😊
# Contributing
If you find a bug or have a feature request, please open an issue on our GitHub repository.
We welcome contributions from the community. If you'd like to contribute, please fork the repository and submit a pull request.
# License
[](LICENSE)
TeamKillerX is licensed under [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.en.html) v3 or later.
<h4 align="center">Copyright (C) 2019 - 2025 The AkenoAI <a href="https://github.com/TeamKillerX">TeamKillerX</a>
<a href="https://t.me/xtdevs">@xtdevs</a>
</h4>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Project [akenoai-lib](https://github.com/TeamKillerX/) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Raw data
{
"_id": null,
"home_page": null,
"name": "akenoai",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.7",
"maintainer_email": null,
"keywords": "API, akeno-lib",
"author": "TeamKillerX",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/83/3c/5fc9fce23bf097080e474095b7f537802b5708ae2a4dbaad9843a9605749/akenoai-1.7.2.tar.gz",
"platform": null,
"description": "# akenoai-lib\n[](https://github.com/TeamKillerX/akenoai-lib)\n[](https://github.com/TeamKillerX/akenoai-lib/graphs/commit-activity)\n[](https://github.com/TeamKillerX/akenoai-lib)\n[](https://github.com/TeamKillerX/akenoai-lib/blob/main/LICENSE)\n[](https://makeapullrequest.com)\n[](https://pypi.org/project/akenoai)\n[](https://pypi.org/project/akenoai)\n[](https://results.pre-commit.ci/latest/github/TeamKillerX/akenoai-lib/main)\n\n### \ud83d\udea8 Important Notice:\n> [!IMPORTANT]\n> Read Before Using!\n>\n> \ud83d\udcdc Read the Code of Conduct:\n> \ud83d\udd17 [`CODE_OF_CONDUCT`](https://github.com/TeamKillerX/akenoai-lib/blob/main/CODE_OF_CONDUCT.md)\n```\n- \u26a0\ufe0f Public copy-pasting without permission violates the rules!\n- \ud83d\udea8 This may result in a GitHub copyright report.\n- \u26a0\ufe0f Your developer account could be blacklisted.\n- \u274c You may lose access to your GitHub username permanently.\n\n- \ud83d\udce2 Respect open-source rules & contribute responsibly! \ud83d\ude80\n```\n\n### installation\n\ud83d\udd39 <b>Recommended Installation:</b>\n\n\u2705 Install via [`PYPI`](https://pypi.org/project/akenoai) for the latest updates. e.g.: `pip3 install akenoai[fast]`\n\n\u2705 Install via github\n- Create a requirements.txt file in the project root containing the following dependency to ensure you can install the GitHub version:\n- `git+https://github.com/TeamKillerX/akenoai-lib.git#egg=akenoai[fast]`\n\n### How to learn python\n- Usage Examples:\n```py\nclass RandyDev(BaseDev):\n def __init__(self, public_url: str = \"https://your-api-endpoint/api/v1\"):\n super().__init__(public_url)\n self.chat = self.Examples(self)\n\n class Examples:\n def __init__(self, parent: BaseDev):\n self.parent = parent\n\n @fast.log_performance\n async def create(self, model: str = None, is_obj=False, **kwargs):\n # your code\n pass\n```\n- Please fork the repository and submit a pull request\n- Your Own API\n- `https://your-api-endpoint/api/v1`\n- An API key is required here.\n```\ndl/{model}\nuser/{model}\nai/{model}\n```\nYou can use `AkenoXToJs()` passing\n```py\njs = AkenoXToJs(public_url=\"https://your-api-endpoint/api/v1\")\njs.randydev.chat.create(...)\n```\nAkenoXToJs automatically configures the connection, so there's no need to manually initialize it using OldAkenoXToJs and its randydev method.\n```py\njs = OldAkenoXToJs(public_url=\"https://your-api-endpoint/api/v1\")\njs.randydev(\"api/endpoint\", api_key=\"\", custom_dev_fast=True)\n```\n### FastAPI Demo\n- Use `main.py`\n- Try running `python3 main.py`\n```py\nfrom akenoai.runner import run_fast\n\n# run_fast initializes a FastAPI server with example routes and configurations.\n\nrun_fast()\n```\n### Code examples\n> [!TIP]\n> Trip PRO Usage Example:\n\n- Use Access API key V2 Premium\n```py\nfrom akenoai import AkenoXToJs\n\njs = AkenoXToJs()\n\nresponse = await js.randydev.chat.create(\n model=\"qwen/qwen1.5-1.8b-chat\",\n api_key=\"<your-api-key-premium>\",\n is_obj=True,\n query=\"Hello, how are you?\"\n)\n\nprint(response)\n```\n- \ud83d\udce5 Example Downloader:\n```py\nfrom akenoai import AkenoXToJs\n\njs = AkenoXToJs()\n\ndownload_response = await js.randydev.downloader.create(\n model=\"instagram-v4\",\n api_key=\"<your-api-key-free>\",\n is_obj=False,\n url=\"https://www.instagram.com/reel/DA0p2NoyN_O/?igsh=MWJvejMxZmZ5ZHd3YQ==\"\n)\n\nprint(download_response)\n```\n### \ud83c\udf10 Streamlit + AkenoX API\n- installation: `pip3 install akenoai[streamlit]`\n- You can use `streamlit run app.py`\n- `akenoai[fast]` \u2192 <b> no import Pyrogram error:</b> *There is no current event loop* (<b>Stuck in Streamlit</b>)\n\n- Full Example usage:\n\n Note: The import path changed from `akenoai import AkenoXToJs` to `akenoai.streamlit import StreamlitToJs` to clearly separate the streamlit integration functionality from the core API. The previous import path is now deprecated.\n```py\nimport requests\nimport json\nimport time\nfrom akenoai.streamlit import StreamlitToJs as js\n\nclass GithubUsername:\n def __init__(self, username):\n self.username = username\n\n def get_github_data(self):\n req = requests.get(f\"https://api.github.com/users/{self.username}\").json()\n try:\n return req\n except Exception as e:\n base_msg = f\"**Error!** \\n\\n**Traceback:** \\n `{e}` \\n\\n`Make sure that you've sent the command with the correct username!`\"\n return base_msg\n\njs_st = js.stl()\njs_st.title(\"Welcome to akenoai-lib APP\")\njs_st.write(\"Developed by RandyDev\")\njs_st.write(\"GitHub User Information\")\n\nwith js_st.form(\"github\"):\n username = js_st.text_input(\"Enter GitHub username:\")\n submit_checkbox = js_st.checkbox(\"Allow users\", value=False)\n submitted = js_st.form_submit_button(\"Submit\")\n if submitted and submit_checkbox:\n js_st.spinner(\"Fetching GitHub data...\")\n github_data = GithubUsername(username).get_github_data()\n if isinstance(github_data, dict):\n js_st.json(github_data)\n else:\n js_st.error(github_data)\n\njs_st.title(\"Examples JSON by AkenoX API\")\n\nwith js_st.form(\"json\"):\n submitted = js_st.form_submit_button(\"Submit\")\n if submitted:\n js_st.spinner(\"Loading......\")\n try:\n js_st.json(\n js.no_async_randydev(\"json/all\", is_obj=False)\n )\n except Exception as e:\n js_st.error(str(e))\n\njs_st.title(\"ChatGPT AI\")\n\nwith js_st.form(\"openai\"):\n text = js_st.text_area('Enter text:', 'How to JavaScript code?')\n submitted = js_st.form_submit_button('Submit')\n placeholder = js_st.empty()\n free_api_key_on = js_st.toggle(\"Free API Key\")\n if submitted:\n try:\n if free_api_key_on:\n with placeholder, js_st.spinner(\"Processing......\"):\n time.sleep(5)\n js_st.write(\n js.no_async_randydev(\"ai/openai/gpt-old\", is_obj=True, query=text).results\n )\n js_st.success(\"Join Channel Telegram : @RendyProjects\")\n else:\n js_st.warning('Use button Free API Key', icon=\"\u26a0\ufe0f\")\n except Exception as e:\n js_st.error(str(e))\n\njs.waifu_random()\njs.hide_streamlit_watermark(unsafe_allow_html=True)\n```\n> [!WARNING]\n>\n>\u26a0\ufe0f Breaking Change \u26a0\ufe0f\n\n> Note: The import path has changed!\n>\n> To better separate Streamlit integration from the core API, the import path has been updated:\n\n> \u274c <b>Deprecated:</b>\n> `from akenoai import AkenoXToJs`\n>\n> \u2705 Use this <b>instead:</b>\n> `from akenoai.streamlit import StreamlitToJs`\n>\n> Make sure to update your imports to avoid issues. \ud83d\ude80\n\n- [X] If using API `[fast]` for <b>full-stack</b>, move to `akenoai.clients`:\n```py\nfrom akenoai.clients import create_pyrogram # Use [fast]\n```\n\n### \ud83d\udee0\ufe0f Custom OpenAI\n```py\nfrom akenoai import OldAkenoXToJs\n\njs = OldAkenoXToJs()\n\nfast_app = js.get_app()\n\njs.custom_openapi(\n app=fast_app,\n logo_url=\"https://github-production-user-asset-6210df.s3.amazonaws.com/90479255/289277800-f26513f7-cdf4-44ee-9a08-f6b27e6b99f7.jpg\",\n title=\"AkenoX Beta AI API\",\n version=\"1.0.0\",\n summary=\"Use It Only For Personal Projects\",\n description=\"Free API By akenoai-lib\",\n routes=fast_app.routes,\n)\n```\n### \ud83e\udd77 Full-Stack Examples\n- [X] Powerful & Super Fast Performance\n- [X] Recommended RAM: 8GB / 16GB\n- [X] Supports `bot_token` & `session_string`\n- [X] Custom Web Frontend with HTML & CSS\n```py\nimport logging\nfrom akenoai import OldAkenoXToJs\nfrom akenoai.runner import run_fast\nfrom akenoai.clients import create_pyrogram\n\njs = OldAkenoXToJs()\n\nlogger = logging.getLogger(__name__)\nLOGS = logging.getLogger(\"[akenox]\")\nlogger.setLevel(logging.DEBUG)\n\nfrom akenoai.models import BaseModel\n\nclass Items(BaseModel):\n message: str\n\nfast_app = js.get_app()\njs.add_cors_middleware()\n\nassistant = create_pyrogram(\n name=\"fastapi-bot\",\n api_id=1234,\n api_hash=\"asdfghkl\",\n bot_token=\"1235:asdfh\"\n)\n\nuser_client = create_pyrogram(\n name=\"fastapi-user\",\n api_id=1234,\n api_hash=\"asdfghkl\",\n session_string=\"session\"\n)\n\n@fast_app.on_event(\"startup\")\nasync def startup_event():\n bot = await assistant.start()\n user = await user_client.start()\n LOGS.info(f\"Started UserBot & Assistant: {user.me.first_name} || {bot.me.first_name}\")\n\n@fast_app.get(\"/api/cohere\")\nasync def cohere(query: str):\n return await js.randydev(\n \"ai/cohere/command-plus\",\n api_key=\"<your_api_key>\",\n custom_dev_fast=True,\n query=query,\n chatHistory=[],\n system_prompt=\"You are a helpful AI assistant designed to provide clear and concise responses.\"\n )\n\n@fast_app.get(\"/item\")\nasync def example_test(item: Items):\n return {\"message\": item.message}\n\n@fast_app.get(\"/test\")\nasync def example_json():\n async with js.fasthttp().ClientSession() as session:\n async with session.get(\"https://jsonplaceholder.typicode.com/todos/1\") as response:\n title = js.dict_to_obj(await response.json()).title\n return {\"message\": title}\n\n@fast_app.get(\"/api/tg/send_message\")\nasync def send_message(text: str, chat_id: str):\n response_json = await client.send_message(chat_id, text)\n return {\"message_id\": response_json.id}\n\njs.custom_openapi(\n app=fast_app,\n logo_url=\"https://github-production-user-asset-6210df.s3.amazonaws.com/90479255/289277800-f26513f7-cdf4-44ee-9a08-f6b27e6b99f7.jpg\",\n title=\"AkenoX Beta AI API\",\n version=\"1.0.0\",\n summary=\"Use It Only For Personal Project\",\n description=\"Free API By akenoai-lib\",\n routes=fast_app.routes,\n)\n\nrun_fast(build=fast_app)\n```\n\n### \ud83d\udd39 <b>Method Definition:</b>\n\n- [X] Parameters:\n- `endpoint:` The API endpoint to call.\n- `api_key:` (Optional) API key for authentication.\n- `is_obj:` Boolean flag indicating whether the response should be returned as a Python object (True) or in the default format (False).\n- `**params:` Allows passing additional parameters as a dictionary, which will be sent as JSON.\n\n### \ud83d\udd39 <b>User Creation Date:</b>\n\nThis feature retrieves the date when the user's account was initially created. It provides a reliable audit trail and allows users or administrators to verify the account's age, which can be important for purposes such as eligibility verification, security audits, or account management.\n\n```py\nimport os\nfrom akenoai import OldAkenoXToJs\n\njs = OldAkenoXToJs()\n\nresponse = await js.randydev(\n \"user/creation-date\",\n custom_dev_fast=True,\n user_id=client.me.id\n)\nreturn response\n```\n### \ud83d\udd11 API Key\n> [!NOTE]\n> How to Get an API Key for AkenoX API?\n>\n> Different V1 Free and V2 Access Premium\n>\n> You can set up your API key using environment variables:\n```env\nAKENOX_KEY=akeno_xxxxxx\n```\n- To get an API key, [`@aknuserbot`](https://t.me/aknuserbot)\n\n- \ud83d\ude80 Thank you to our 2.7 million users per request!\n\n### \u26a0\ufe0f Problem Double Fix:\n\ud83d\udee0\ufe0f **Double Fix for Connection Issues**\n- \u274c **Cannot connect to host**\n- \ud83d\udeab **IP address blocked issue**\n- \ud83c\udf10 **Different DNS settings**\n\n```py\nfrom akenoai import OldAkenoXToJs\n\njs = OldAkenoXToJs()\n\nproxy_url = \"http://PROXY.YOUR-SERVER.COM:8080\"\n\nreturn await js.randydev(\n \"ai/openai/gpt-old\",\n api_key=\"akeno_xxxxxxx\",\n proxy_url=proxy_url, # Use proxy if needed\n post=False,\n custom_dev_fast=True\n)\n```\n---\n\n### **\ud83d\udccc Custom API endpoints**\n| Feature | **Itzpire API** (Proxy Required) | **AkenoX API** (No Proxy)\n|---------------|--------------------------------|--------------------------|\n| **API Key** | \u274c Not required | \u2705 Required |\n| **Speed** | \u26a0\ufe0f Slower (Proxy used) | \ud83d\ude80 Fast (Direct request) |\n| **Stability** | \u2705 Works even if blocked | \u2705 Stable & optimized |\n| **Use Case** | \ud83d\udd04 Bypassing restrictions | \u26a1 Direct & fast access |\n| **IP Ban Status** | \ud83d\udeb7 IP address has been banned. | \u2705 IP address not banned |\n| **Rate Limit** | \u2705 Unlimited | \u23f3 100 requests per minute |\n| **Network** | \u274c No Limits | \u2705 Limited Network access |\n| **Custom Public Url** | `https://itzpire.com` | \u2705 Default |\n---\n\n---\n\n| Feature | **OpenAI** | **Deepseek**\n|---------------|--------------------------------|--------------------------|\n| **API Key** | \u2705 Required | \u2705 Required |\n| **Speed** | ? | ? |\n| **Stability** | \u2705 Stable & optimized | \u2705 Stable & optimized |\n| **Use Case** | ? | ? |\n| **IP Ban Status** | ? | ? |\n| **Rate Limit** | ? | ? |\n| **Network** | ? | ? |\n| **Custom Public Url** | `https://api.openai.com/v1` | `https://api.deepseek.com/v1` |\n---\n\n### \u2764\ufe0f Special Thanks To\n- [`Kurigram`](https://github.com/KurimuzonAkuma/pyrogram)\n- [`FastAPI`](https://github.com/fastapi/fastapi)\n- Thank you all developers \ud83d\ude0a\n\n# Contributing\nIf you find a bug or have a feature request, please open an issue on our GitHub repository.\n\nWe welcome contributions from the community. If you'd like to contribute, please fork the repository and submit a pull request.\n\n# License\n[](LICENSE)\nTeamKillerX is licensed under [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.en.html) v3 or later.\n\n<h4 align=\"center\">Copyright (C) 2019 - 2025 The AkenoAI <a href=\"https://github.com/TeamKillerX\">TeamKillerX</a>\n<a href=\"https://t.me/xtdevs\">@xtdevs</a>\n</h4>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nProject [akenoai-lib](https://github.com/TeamKillerX/) is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <https://www.gnu.org/licenses/>.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "AkenoAi Python Wrapper For Plus+",
"version": "1.7.2",
"project_urls": {
"Issues": "https://github.com/TeamKillerX/akenoai-lib/issues",
"Source": "https://github.com/TeamKillerX/akenoai-lib/"
},
"split_keywords": [
"api",
" akeno-lib"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "dcb5556382661449788ac8fb7d98e8aae2390b3f66bf6017f32941d32437afaa",
"md5": "982f2e8df84c9c1d439b86610225610c",
"sha256": "e30429f2b98162e009f1b1f46326469033a9656b0e1539b749aeb33c8f83d102"
},
"downloads": -1,
"filename": "akenoai-1.7.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "982f2e8df84c9c1d439b86610225610c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.7",
"size": 31012,
"upload_time": "2025-02-23T01:29:54",
"upload_time_iso_8601": "2025-02-23T01:29:54.598951Z",
"url": "https://files.pythonhosted.org/packages/dc/b5/556382661449788ac8fb7d98e8aae2390b3f66bf6017f32941d32437afaa/akenoai-1.7.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "833c5fc9fce23bf097080e474095b7f537802b5708ae2a4dbaad9843a9605749",
"md5": "9dcec2ebfdcbc688895b4617e530bceb",
"sha256": "7ae0793a2e576b522574311685ede0a728df2ea6d38f881431a2913b42d215e1"
},
"downloads": -1,
"filename": "akenoai-1.7.2.tar.gz",
"has_sig": false,
"md5_digest": "9dcec2ebfdcbc688895b4617e530bceb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.7",
"size": 30634,
"upload_time": "2025-02-23T01:29:56",
"upload_time_iso_8601": "2025-02-23T01:29:56.461440Z",
"url": "https://files.pythonhosted.org/packages/83/3c/5fc9fce23bf097080e474095b7f537802b5708ae2a4dbaad9843a9605749/akenoai-1.7.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-23 01:29:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TeamKillerX",
"github_project": "akenoai-lib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohttp",
"specs": []
},
{
"name": "wget",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "httpx",
"specs": []
},
{
"name": "python-box",
"specs": []
}
],
"lcname": "akenoai"
}