Skip to main content

SDK for Humanized AI Text API

Project description

Humanize AI Text SDK

This SDK provides easy access to the Humanize AI Text API, allowing you to humanize AI-generated text effortlessly.

Repository

GitHub Repository

Installation

You can install the Humanize AI Text SDK using pip:

pip install humanize-ai-text

Usage

Here's a basic example of how to use the Humanize AI Text SDK:

from humanize_ai_text import HumanizedAI

humanizer = HumanizedAI(api_key='your-api-key-here')

try:
    result = humanizer.run('Your text to humanize goes here.')
    print(result['humanizedText'])
except Exception as e:
    print(f"An error occurred: {str(e)}")

API Reference

HumanizedAI(api_key, base_url=None)

Creates a new instance of the HumanizedAI client.

run(text)

Humanizes the given text.

  • text: The text to humanize.

Returns a dictionary with the following structure:

{
    'success': bool,
    'input_words': int,
    'output_words': int,
    'humanizedText': str
}

Error Handling

The SDK raises requests.exceptions.RequestException for API-related errors. You can catch these exceptions to handle errors in your code.

Example error handling:

from humanize_ai_text import HumanizedAI
import requests

humanizer = HumanizedAI(api_key='your-api-key-here')

try:
    result = humanizer.run('Your text here')
    print(result['humanizedText'])
except requests.exceptions.RequestException as e:
    print(f"API Error: {str(e)}")
    if hasattr(e, 'response'):
        print(f"Status: {e.response.status_code}")
        print(f"Response: {e.response.text}")
except Exception as e:
    print(f"An unexpected error occurred: {str(e)}")

Important Information

  1. API Key Security: Never expose your API key in client-side code. Always use this SDK in a secure server-side environment.

  2. Rate Limiting: Be aware of any rate limits imposed by the Humanize AI Text API. Implement appropriate error handling for rate limit errors.

  3. Input Text Length: There may be limitations on the length of text that can be processed in a single request. Refer to the API documentation for specific limits.

  4. Error Handling: Implement robust error handling in your application to gracefully handle API errors and network issues.

  5. API Versioning: The SDK defaults to the latest version of the API. If you need to use a specific version, you can set the base_url parameter when creating the HumanizedAI instance.

Support

For additional support or to learn more about our services, please visit our website at https://humanize-ai-text.ai.

License

MIT

humanize-ai-text-pypi

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

humanize-ai-text-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

humanize_ai_text-1.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file humanize-ai-text-1.0.0.tar.gz.

File metadata

  • Download URL: humanize-ai-text-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.3

File hashes

Hashes for humanize-ai-text-1.0.0.tar.gz
Algorithm Hash digest
SHA256 97677c81c46ca23d8deaf64b86c73fe8245f3c08440d93bdc36867b3eb44a35f
MD5 dc29b6369d572f3c8e747d99b5326836
BLAKE2b-256 a4ac723ff65913067b6975cc4aa98a217f9a1e39dab3ffae2e0fc1fef030a204

See more details on using hashes here.

File details

Details for the file humanize_ai_text-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for humanize_ai_text-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7145a55d46e4cfed1c5b0b89fec456dbd9eba90d66586464e734c1c2ee9d5159
MD5 d03fbbb376844acbe8a8fec5cff974a0
BLAKE2b-256 34c4d38dbfe32a02d099f8020cc6e180b5747eb2d297e5c4a5adb26731a2b32f

See more details on using hashes here.

Supported by

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