Ryter Pro Python SDK Documentation | AI Humanizer API
Ryter Logo - AI Humanizer & Content Detection Services
All integrations

Official Python SDK

Build text humanization into your Python workflow.

The Ryter Pro Python SDK wraps authentication, request formatting, and the humanization endpoint in a small, direct client.

Current releasev0.1.0
Python 3.9 or later and an active Ryter Pro API key.

Install

pip install ryterpro

Overview

Use the SDK when your application, data pipeline, or automation is already written in Python.

The client sends requests to the Ryter Pro text humanization API and returns the complete JSON response as a Python dictionary. You keep control of when requests run and how the rewritten text is stored or displayed.

The package is intentionally lightweight and uses the same Ryter Pro credits and API key as the REST API.

Installation

Install the package from PyPI in your application environment.

shell
pip install ryterpro

To pin the current release for reproducible deployments, install ryterpro==0.1.0.

Authentication

Create an API key in your Ryter Pro account and load it from an environment variable.

shell
export RYTERPRO_API_KEY="YOUR_API_KEY"

Keep API keys outside source control. You can create and manage keys from the API Keys page.

Quick start

Create a client and call humanize with the text you want to rewrite.

python
import os
from ryterpro import RyterPro

client = RyterPro(api_key=os.environ["RYTERPRO_API_KEY"])

result = client.humanize(
    text="AI tools can help teams draft content more efficiently."
)

print(result["data"]["beautified_text"])

The optional mode argument can be used when you want to select a supported humanizer mode.

Read the response

The SDK returns the API response without hiding useful request information.

python
if result.get("success"):
    humanized_text = result["data"]["beautified_text"]
    credits_used = result.get("credits_used")

    print(humanized_text)
    print(f"Credits used: {credits_used}")
else:
    print(result.get("error"))

See the text humanization API reference for the full request and response format.

Handle errors

Network and non-success HTTP responses are raised by the underlying requests client.

python
import requests

try:
    result = client.humanize(text="Text to rewrite")
except requests.HTTPError as error:
    print(f"Ryter Pro returned {error.response.status_code}")
    print(error.response.text)
except requests.RequestException as error:
    print(f"Request could not be completed: {error}")