Skip to content

TeamKillerX/ryzenth-api-coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

img

The Ryzenth API offers free, unlimited access to services like the /api/v1/ultimate-chat endpoint, so you can use it as much as you want without an API key.


Code Examples: Generate Image Using openAI (GET)
from Ryzenth import RyzenthApiClient

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

response = await clients.get(
    tool="ryzenth-v2",
    path="/api/v1/openai-imagen?x-api-key=sk-ryzenth-*",
    timeout=100,
    params=clients.get_kwargs(
        accountId="account-id",
        input="A beautiful sad yellow cat"
    )
)

image_base64 = clients.dict_convert_to_dot(response)
result_img = clients.to_buffer(
    image_base64.data[0].b64_json,
    return_image_base64=True
)

print(f"image saved: {result_img}")
Code Examples: Edit Image (Face-To-Anime Using openAI (POST)
from Ryzenth import RyzenthApiClient

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

response = await clients.post(
    tool="ryzenth-v2",
    path="/api/v1/openai-imagen/edit-image?x-api-key=sk-ryzenth-*",
    timeout=100,
    params=clients.get_kwargs(accountId="account-id")
    json={"base64Image": "....."},
)

image_base64 = clients.dict_convert_to_dot(response)
result_img = clients.to_buffer(
    image_base64.data.image.result,
    return_image_base64=True
)

print(f"image saved: {result_img}")
Code Examples: Generate Image (not openAI) without api key (GET)
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 = await clients.get(
    tool="ryzenth-v2",
    path="/api/tools/generate-image",
    timeout=30,
    params=clients.get_kwargs(prompt="A beautiful cat yellow"),
    use_type=ResponseType.IMAGE # this response content
)
Code Examples: gpt-4-vision-preview (img-to-text) using openAI without api key (GET)
from Ryzenth import RyzenthApiClient
from Ryzenth.helper import Helpers

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

response = await clients.post(
    tool="ryzenth-v2",
    path="/api/v1/openai-v2/image-vision",
    timeout=30,
    json={
        "input": "Describe this image:",
        "base64Image": Helpers.encode_image_base64("/path/to/example.jpg")
    }
)

print(response)

© 2025 Ryzenth Developers from TeamKillerX

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •