Skip to main content

Ryzenth is a flexible Multi-API SDK with built-in support for API key management and database integration.

Project description

Ryzenth Library

Open Source Love Maintenance License PRs Welcome Ryzenth - Version pre-commit.ci status

Downloads API Tests

Image


Ryzenth is a powerful Multi-API SDK designed to seamlessly handle API keys and database connections with ease.

It provides native support for both synchronous and asynchronous operations, making it ideal for modern applications including AI APIs, Telegram bots, REST services, and automation tools.

Built with httpx and aiohttp integration, comprehensive logging features (including Telegram alerts), and database storage capabilities like MongoDB, Ryzenth empowers developers with a flexible, scalable, and customizable API client solution.

๐Ÿšจ Important Notes

HTTP 403 Error Fix

If you're encountering 403 Forbidden errors, ensure you're setting proper headers:

# โœ… CORRECT - Always use proper headers
from Ryzenth import RyzenthApiClient

clients = RyzenthApiClient(
    tools_name=["your-tool"],
    api_key={"your-tool": [{"Authorization": "Bearer your-token"}]},
    rate_limit=100,
    use_default_headers=True  # ๐Ÿ”ฅ IMPORTANT: Set this to True
)

# โœ… CORRECT - Custom headers example
clients = RyzenthApiClient(
    tools_name=["your-tool"],
    api_key={"your-tool": [{
        "Authorization": "Bearer your-token",
        "Accept": "application/json",
        "Content-Type": "application/json"
    }]},
    rate_limit=100,
    use_default_headers=True
)

# โŒ WRONG - Missing headers will cause 403 errors
clients = RyzenthApiClient(
    tools_name=["your-tool"],
    api_key={"your-tool": [{}]},  # Empty headers
    use_default_headers=False     # No default headers
)

Required Headers Format

The library automatically adds these headers when use_default_headers=True:

  • User-Agent: Ryzenth/Python v-{version}
  • Accept: application/json
  • Content-Type: application/json

Javascript Your own API

const ua = req.headers['User-Agent'];
const gh = req.headers['X-Github-Source'];
const ghVersion = req.headers['X-Ryzenth-Version'];

console.log(gh) // check valid whitelist TeamKillerX/Ryzenth

โœจ Features

  • ๐Ÿ”„ Dual Mode Support: Works with both sync and async clients
  • ๐Ÿ” Smart API Key Management: Built-in API key handling and rotation
  • ๐Ÿค– AI-Ready: Seamless integration with modern AI services (image generation, text processing, etc.)
  • โšก High Performance: Built on httpx for optimal speed and reliability
  • ๐Ÿ“Š Comprehensive Logging: Built-in logging with optional Telegram notifications
  • ๐Ÿ›ก๏ธ Error Handling: Robust error handling with automatic retries
  • ๐ŸŽฏ Context Managers: Proper resource management with async context support
  • ๐Ÿ“ฆ Database Integration: MongoDB and other database connectors included

๐Ÿ“ฆ Installation

Standard Installation

pip3 install ryzenth[fast]

Development Installation (Latest Features)

pip3 install git+https://github.com/TeamKillerX/Ryzenth.git

๐Ÿš€ Quick Start

๐Ÿ”— New Chaining API Support

Modern fluent API with method chaining:

from Ryzenth import RyzenthAuthClient

# ๐ŸŒŸ Fluent API with chaining
response = await RyzenthAuthClient()\
    .with_credentials("68750d3b92828xxxxxxxx", "sk-ryzenth-*")\
    .use_tool("instatiktok")\
    .set_parameter("&url={url}&platform=facebook")\
    .retry(2)\
    .cache(True)\
    .timeout(10)\
    .execute()

print(response)

# ๐Ÿ”ง Traditional client approach
clients = await RyzenthApiClient(
    tools_name=["ryzenth-v2"],
    api_key={"ryzenth-v2": [{}]},
    rate_limit=100,
    use_default_headers=True
)

๐Ÿค– AI Features (No API Key Required)

Supports multiple AI models: grok, deepseek-reasoning, evil, unity, sur, rtist, hypnosis-tracy, llama-roblox

from Ryzenth import RyzenthTools

rt = RyzenthTools()

# ๐Ÿ’ฌ Chat Ultimate - Multiple AI Models
response_grok = await rt.aio.chat.ask_ultimate(
    "What is Durov's role in Telegram?",
    model="grok"
)
print(await response_grok.to_result())

# ๐ŸŽฏ OpenAI V2 Integration
response_openai = await rt.aio.chat.ask("What's the capital of Japan?")
print(await response_openai.to_result())

# ๐ŸŽจ Image Generation
response_content = await rt.aio.images.create("generate a blue cat")
await response_content.to_save()

# ๐Ÿ‘€ Image Analysis with Upload
response_see = await rt.aio.images.create_upload_to_ask(
    "Describe this image:",
    "/path/to/example.jpg"
)
result = await response_see.to_result()

# ๐Ÿงน Proper cleanup
await rt.aio.chat.close()
await rt.aio_client.images.close()

๐ŸŽฅ Advanced AI Features

# ๐Ÿ–ผ๏ธ Multiple image operations
await rt.aio.images.create()
await rt.aio.images.create_gemini_and_captions()
await rt.aio_client.images.create_gemini_to_edit(
    "add Lamborghini background",
    "/path/to/example.jpg"
)  # Use response.to_buffer_and_list()

await rt.aio.images.create_upload_to_ask()
await rt.aio.images.create_multiple()

# ๐Ÿ’ญ Chat operations
await rt.aio.chat.ask()
await rt.aio.chat.ask_ultimate()

๐ŸŽฌ Image & Video Generation with Qwen AI

Generate high-quality images and videos using Qwen AI with dot notation access:

from Ryzenth import RyzenthTools

rt = RyzenthTools("your-qwen-api-key")

# ๐Ÿ–ผ๏ธ Generate Image
response = await rt.aio.qwen_images.create("generate a blue cat running")
output = await response.create_task_and_wait(max_retries=120, poll_interval=1.0)

print("๐ŸŽจ Image URL:", output.results[0].url)

# ๐ŸŽฌ Generate Video
response_video = await rt.aio.qwen_videos.create("blue cat running in slow motion")
output_video = await response_video.create_task_and_wait(max_retries=120, poll_interval=1.0)

print("๐ŸŽฅ Video URL:", output_video.video_url)

โš ๏ธ Version Note: Dot notation access may be limited in version 2.2.3+ due to API changes. Check our GitHub Discussions for updates.


๐Ÿ› ๏ธ Developer Tools & Supported APIs

Available API Tools

Choose from our extensive list of supported APIs:

Tool Name Status Description
itzpire โŒ Dead Legacy API service
ryzenth โœ… Active Main Ryzenth API
ryzenth-v2 โœ… Active Enhanced Ryzenth API
siputzx โœ… Active (Auto block) Community API
fgsi โœ… Active FGSI API Service
onrender โœ… Active Render-based API
deepseek โœ… Active DeepSeek AI API
cloudflare โœ… Active Cloudflare Workers API
paxsenix โœ… Active PaxSenix API
exonity โœ… Active Exonity API
yogik โŒ Dead Legacy API
ytdlpyton โœ… Active YouTube downloader
openai โœ… Active OpenAI API
cohere โœ… Active Cohere AI API
claude โœ… Active Anthropic Claude API
grok โœ… Active Grok AI API
alibaba โœ… Active Alibaba Qwen API
gemini โœ… Active Google Gemini API
gemini-openai โœ… Active Gemini OpenAI Compatible

๐Ÿ”ง Custom API Implementation

from Ryzenth import RyzenthApiClient

# ๐ŸŽฏ Example with SiputZX API
clients = RyzenthApiClient(
    tools_name=["siputzx"],
    api_key={"siputzx": [{"Authorization": "Bearer test"}]},
    rate_limit=100,
    use_default_headers=True  # ๐Ÿ”ฅ Always enable for 403 fix
)

# Your implementation logic here
response = await clients.get(
    tool="siputzx",
    path="/api/endpoint",
    params={"query": "your-query"}
)

๐Ÿ“š Resources:


๐Ÿ—๏ธ Legacy Examples (Deprecated)

Async Example

from Ryzenth import ApiKeyFrom
from Ryzenth.types import QueryParameter

ryz = ApiKeyFrom(..., is_ok=True)

await ryz.aio.send_message(
    "hybrid",
    QueryParameter(query="hello world!")
)

Sync Example

from Ryzenth import ApiKeyFrom
from Ryzenth.types import QueryParameter

ryz = ApiKeyFrom(..., is_ok=True)
ryz._sync.send_message(
    "hybrid",
    QueryParameter(query="hello world!")
)

๐Ÿค– Multi-Platform AI Support

Grok AI Integration

from Ryzenth.tool import GrokClient

g = GrokClient(api_key="sk-grok-xxxx")

response = await g.chat_completions(
    messages=[
        {
            "role": "system",
            "content": "You are Grok, a chatbot inspired by the Hitchhiker's Guide to the Galaxy."
        },
        {
            "role": "user",
            "content": "What is the meaning of life, the universe, and everything?"
        }
    ],
    model="grok-3-mini-latest",
    reasoning_effort="low",
    temperature=0.7,
    timeout=30
)
print(response)

๐Ÿ”‘ API Keys & Documentation

๐Ÿค– AI Platform Documentation

๐Ÿ” Get Your API Keys

Platform Get API Key Official Website
Ryzenth Get Key Official Ryzenth Portal
OpenAI Get Key OpenAI Platform
Cohere Get Key Cohere Dashboard
Alibaba Get Key Alibaba Console
Claude Get Key Anthropic Console
Grok Get Key X.AI Console

๐Ÿ† Credits & Contributors

๐ŸŒ API Provider Partners

๐Ÿ™ Special Thanks

  • xtdevs - Lead Developer & Creator
  • TeamKillerX - Core Development Team
  • AkenoX Project - Original inspiration and foundation
  • Google Developer Tools - AI integration support
  • Open Source Community - Contributions and feedback

๐Ÿ’– Support Development

Your support helps us continue building and maintaining this project!

๐Ÿ’ฐ Donation Options

  • Bank Transfer (DANA): Send to Bank Jago 100201327349
  • Cryptocurrency: Contact us for wallet addresses
  • GitHub Sponsors: Sponsor on GitHub

Every contribution, no matter the size, makes a difference! ๐Ÿš€


๐Ÿ“„ License

MIT License ยฉ 2025 Ryzenth Developers from TeamKillerX

This project is open source and available under the MIT License.


๐ŸŒŸ Star us on GitHub if you find this project useful!

GitHub stars GitHub forks GitHub watchers

Made with โค๏ธ by the Ryzenth Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ryzenth-2.2.5.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ryzenth-2.2.5-py3-none-any.whl (79.1 kB view details)

Uploaded Python 3

File details

Details for the file ryzenth-2.2.5.tar.gz.

File metadata

  • Download URL: ryzenth-2.2.5.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ryzenth-2.2.5.tar.gz
Algorithm Hash digest
SHA256 841abf7265880ce8add0bc7a7ae1bf876d7a46249dc02aa025e6e7cb44a4900a
MD5 a42db4806876776f8ca2b7ca47249d47
BLAKE2b-256 f94428810fa338e0ec9f8f4341b1a85d8697b1bd78a16a3ce9d3b4ed458e74c1

See more details on using hashes here.

File details

Details for the file ryzenth-2.2.5-py3-none-any.whl.

File metadata

  • Download URL: ryzenth-2.2.5-py3-none-any.whl
  • Upload date:
  • Size: 79.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ryzenth-2.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f37cb1906c05cb893749fc63c2e65f126af3a0695485fb06ab0f2529acad122d
MD5 ab545329a188ba975fb2d3bb32b079b4
BLAKE2b-256 2df907efc03b3744a4a0e3a70868c61fb268790bf686b74fceaad9ea0aaa3eaa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page