Rᴇɴᴅʏ Pʀᴏɪᴇᴄᴛs
223 subscribers
1.04K photos
29 videos
17 files
743 links
tgcore is open source. Built for production Telegram apps.

https://github.com/TeamKillerX/tgcore/
Download Telegram
🖼️ Create Safe, Better-Looking Images Simply

With the Ryzenth API, you can make images that are safe and of great quality, and you don't even need an API key. Just set the settings how you like, and you'll get good results without a problem.

✅ Here's what is_safe and is_enhance do:

is_safe=true
Makes sure the image doesn't show anything unsafe or sensitive.
Perfect for work or normal viewing.

is_enhance=true
Immediately makes the picture's quality, resolution, and sharpness better, so it looks nicer.
from Ryzenth import RyzenthApiClient
from Ryzenth.enums import ResponseType

clients = RyzenthApiClient(
tools_name=["ryzenth-v2"],
api_key={"ryzenth-v2": [{}]},
rate_limit=100,
use_default_headers=True
)

response_content = await clients.get(
tool="ryzenth-v2",
path="/api/tools/generate-image",
timeout=30,
params=clients.get_kwargs(
prompt="A beautiful cat yellow and background gray",
is_enhance="true",
is_safe="true"
),
use_type=ResponseType.IMAGE
)

result_img = await clients.to_image_class(response_content, "default.jpg")

Notes:
- The image generation tool is located at: /api/tools/generate-image
- Everyone can use it for free.
- You don't need an API key to access this tool.
- It's great for making safe, clean, and good-looking images.

~ Just Update from Github
Ryzenth Inline V3 Ultra Max (Versi Final - 2028)

Source: https://ryzenths.dpdns.org/s/ryzenth-inline-v3
⚠️ Heads Up:

Problem:
You might see an error saying, Cannot send a request, as the client has been closed.

Why it happens:
This usually pops up if you start RyzenthApiClient outside of an async function. The HTTP client inside (like httpx or aiohttp) closes itself before your request can go through.

❌ Incorrect Usage
clients = RyzenthApiClient(
tools_name=["ryzenth-v2"],
api_key={"ryzenth-v2": [{}]},
rate_limit=100,
use_httpx=True,
use_default_headers=True
)

await clients.get(...) # ❌ RuntimeError: client has been closed

- This is failing because the client wasn't created in an async environment, so it closes before it can be used.

✅ Correct Usage (recommended)
async def todo_something():
clients = RyzenthApiClient(
tools_name=["ryzenth-v2"],
api_key={"ryzenth-v2": [{}]},
rate_limit=100,
use_default_headers=True
)
await clients.get(...)

- When creating an API client, do it within an async def function. This keeps the HTTP session active while requests are being made.

Quick advice:
- Avoid use_httpx=True unless you know about its session lifecycle.
- The standard setting (aiohttp) works better and it's simpler for tasks that run for a long time, such as bots or API chains.
Using Gemini with Ryzenth API Client

You can access Gemini models via an OpenAI-compatible API when using RyzenthApiClient.

This is handy for models like:
- gemini-2.5-flash
- imagen-3.0-generate-002 (for image creation)
- Any Gemini proxy that works with OpenAI.
import asyncio
from Ryzenth import RyzenthApiClient

GEMINI_API_KEY = ""

async def gemini_openai(prompt: str):
if not GEMINI_API_KEY:
return

clients = RyzenthApiClient(
tools_name=["gemini-openai"],
api_key={"gemini-openai": [{"Authorization": f"Bearer {GEMINI_API_KEY}"}]},
rate_limit=100,
use_default_headers=True
)

return await clients.post(
tool="gemini-openai",
path="/chat/completions",
json={
"model": "gemini-2.5-flash",
"reasoning_effort": "low",
"messages": [
{"role": "user", "content": prompt}
]
}
)

async def main():
response = await gemini_openai("Testing hello")
print(response)

asyncio.run(main())

You can try Gemini-supported models too, like:
  "model": "imagen-3.0-generate-002"

To create great images, use a prompt.

The API call setup is like OpenAI's (same as /chat/completions or /images/generate).

This setup is similar to bots like @GeminiAIDev_Bot, which also use Gemini with OpenAI-style endpoints.

⚠️ Note:
If you don't have a Gemini key, skip this.
If you're using Ryzenth premium tools (like /openai-imagen/turn-text), you don't need to use tool/openai.py.

That’s just for managing premium AI requests.
from Ryzenth import RyzenthApiClient

DASHSCOPE_API_KEY = ""

async def qwen_imagen(prompt: str):
clients = RyzenthApiClient(
tools_name=["alibaba"],
api_key={"alibaba": [
{
"Authorization": f"Bearer {DASHSCOPE_API_KEY}",
"Content-Type": "application/json",
"X-DashScope-Async": "enable"
}
]},
rate_limit=100,
use_default_headers=True
)
response_status_json = await clients.post(
tool="alibaba",
path="/api/v1/services/aigc/text2image/image-synthesis",
json={
"model": "wan2.2-t2i-flash",
"input": {
"prompt": prompt
},
"parameters": {
"size": "1024*1024",
"n": 1
}
},
timeout=100
)
while True:
if response_status_json["output"]["task_status"] == "SUCCEEDED":
task_id = response_status_json["output"]["task_id"]
response_status = await clients.get(
tool="alibaba",
path=f"/api/v1/tasks/{task_id}",
timeout=100
)
if response_status["output"]["task_status"] == "SUCCEEDED":
return response_status["output"]["results"][0]["url"]
if response_status["output"]["task_status"] == "FAILED":
return "Ok Failed"

if response_status_json["output"]["task_status"] == "FAILED":
raise Exception("down gay")
break

result_url = await qwen_imagen("A flower shop with exquisite windows")
print(result_url)

Base: Alibaba Qwen AI (required api key)
Pypi: Ryzenth (not recommended)
Endpoints: text-to-img
Coder by: @zxyeor
You can image single or image multiple
from Ryzenth import RyzenthTools

new_client = RyzenthTools()
file_path = await new_client.aio_client.images.create("make a generate cat blue")
print(file_path)

file_path_multiple = await new_client.aio_client.images.create_multiple(
prompts=["make a generate cat blue", "make a generate cat yellow"],
concurrent_limit=3
)
print(file_path_multiple)
Update faster: https://pypi.org/project/Ryzenth/2.2.2/

New method:
from Ryzenth import RyzenthTools

new_client = RyzenthTools()

response = await new_client.aio_client.chat.ask("what is telegram?")

print(response)

response_2 = await new_client.aio_client.chat.ask_ultimate("what is GTA 5?", model="grok")

print(response_2)

response_3 = await new_client.aio_client.images.upload_ask("Describe this image:", "/path/to/example.jpg")

print(response_3)

• Happy Coding 😎
• Coder by @zxyeor
if you're still on version 2.2.2 (which we don't advise):
response = await new_client.aio_client.images.upload_ask("Describe this image:", "/path/to/example.jpg")
print(response)

So the syntax is updated on GitHub:
Now use create_upload_ask() instead of upload_ask().

- New added to_base64() and to_fileobj()
response_content = await new.aio_client.images.create("make a generate cat blue")
await response_content.to_save()

response = await new.aio_client.images.create_upload_ask("Describe this image:", "/path/to/example.jpg")
await response.to_result()

response = await new.aio_client.chat.ask("What's the capital of Japan?")
print(await response.to_result())
⚡1
Wih, fitur baru nih sekarang lo bisa generate gambar + caption cuma modal 1 API call doang ga perlu ribet² pake dua model terpisa tinggal kirim prompt langsung dapet gambar deskripsi keren ala gemini.
from Ryzenth import RyzenthTools

gemini_magic = RyzenthTools()

response = await gemini_magic.aio_client.images.create_gemini_and_captions(
"Bikin gambar 3D babi pake sayap jet + kacamata hitam"
"lagi terbang di atas kota cyberpunk yang ujan neon"
)

img, caption = await response.to_buffer_and_list()

await message.reply_photo(
photo=img,
caption=caption
)

Kenapa pilih Ryzenth? 🗿
Ga pake lama proses cepet ga nunggu loading kayak nunggu gorengan. ⏳

No ribet token ga perlu setel config bertele tele.

Dijamin stabil backend pake TypeScript jadi jarang error.
await new.aio_client.images.create()
await new.aio_client.images.create_gemini_and_captions()
await new.aio_client.images.create_gemini_to_edit("add background Lamborghini", "/path/to/example.jpg") # use response.to_buffer_and_list()
await new.aio_client.images.create_upload_to_ask()
await new.aio_client.images.create_multiple()
await new.aio_client.chat.ask()
await new.aio_client.chat.ask_ultimate()
Kadang orang tanya: "bisa nggak sih bikin library sendiri yang nyambung ke Ryzenth?"

Jawabannya: tentu bisa.

Kamu bebas kasih nama apa pun unik khas kamu lalu hubungkan langsung ke API Ryzenth.

Contoh:
from Ryzenth import RyzenthApiClient

class CustomName:
def __init__(self):
self.client = RyzenthApiClient()

async def sapa(self):
pass

Aku sendiri sudah lama bikin macam macam: Ryzenth, RyuzakiLib, sampai akenoai.
Semuanya lahir dari rasa penasaran ide iseng dan sedikit ambisi founder yang nggak bisa diem.
Next Update 🚶‍♂️

qwen_response = await aio.client.images.create_qwen_flash()

url = await qwen_response.create_task_and_wait(return_url=True)

Original code: https://t.me/c/1558215042/3287
from Ryzenth import RyzenthTools

_ = RyzenthTools("your-api-key-from-qwen")

response = await _.aio_client.qwen_images.create_qwen_flash("make a generate cat blue")

url = await response.create_task_and_wait(
max_retries=120,
poll_interval=1.0,
return_url=True
)
print(url)

Coder by: @zxyeor
Pypi: https://pypi.org/project/Ryzenth/2.2.3/
Using Qwen AI for Image & Video Generation

With RyzenthTools, it is simple to use Qwen AI for generating images and videos in an asynchronous manner.

You can also access results by dot notation (output.results[0].url), which makes your code neater and easier to read.
from Ryzenth import RyzenthTools

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

# ---------------------------
# 1. Generate Image
# ---------------------------
response = await rt.aio.qwen_images.create("make a generate cat blue")
output = await response.create_task_and_wait(max_retries=120, poll_interval=1.0)

print("Image URL:", output.results[0].url)

# ---------------------------
# 2. Generate Video
# ---------------------------
response_two = await rt.aio.qwen_videos.create("make a generate cat blue run")
output_two = await response_two.create_task_and_wait(max_retries=120, poll_interval=1.0)

print("Video URL:", output_two.video_url)

Notes:
If you are using version 2.2.3 or above, dot notation access may not be available due to the APIs changing.

For associated problems and updates, check the discussion:
🔗 GitHub Discussion
🚨 Service Notice: @aknuserbot Currently Down

Hey everyone, sorry but @aknuserbot is temporarily offline along with all our multi-bot services.

Why?
Every dang August our systems seem to hit a snag (blame it on August curse or server gremlins). We’re working on a fix

Thanks for bearing with us 🚶‍♂️

Sleep deprived devs who hate August