Autoenhance.ai
  • Overview
  • Getting Started
    • Obtaining an API key
    • Quickstart
      • Single Image
      • HDR Brackets
    • Code Examples
      • JavaScript
        • Uploading Single Bracket
        • Uploading HDR
        • Uploading 360
      • API Integrations Repository
  • SDKs
    • Web (Beta)
      • Changelog
    • JavaScript
      • Changelog
    • Python
      • Changelog
  • File & Camera Guidelines
    • File Formats
    • Metadata
    • 360
    • Lens Correction
  • Images
    • Managing Images
      • Creating & Uploading
      • Reprocessing
      • Retrieveing
      • Deleting
      • Reporting
    • Settings
      • Enhancement Style
      • Sky Replacement
      • Lens Correction
      • Vertical Correction
      • Window Pull
      • Auto Privacy
      • Usage Example
    • Downloading Images
      • Original
      • Preview
      • Enhanced
  • Orders
    • Managing Orders
      • Creating
      • Editing
      • Retrieving
      • Listing and Pagination
      • Deleting
    • Grouping Brackets and Processing Orders
  • Webhooks
  • API Versions
  • AI Versions
  • Links
    • API Specification
    • Support
Powered by GitBook
On this page
  • Requirements
  • Installation
  • Configuration
  • Examples
  1. SDKs

Python

Our SDK will help you easily integrate Autoenhance.ai into your codebase in a matter of minutes. We've prepared methods for interacting with our API in all possible ways you might need.

PreviousChangelogNextChangelog

Last updated 5 months ago

Requirements

  • Basic Python knowledge

  • Autoenhance.ai API key ()

You can find the PyPI package for our SDK on

Installation

Install Autoenhance.ai SDK with a simple CLI command

With pip:

pip install autoenhance

With poetry:

poetry add autoenhance

Configuration

Follow these simple steps in order to implement and configure our SDK

Import Autoenhance SDK package:

import autoenhance

Create a constant, and add your

autoenhance = autoenhance.Autoenhance('YOUR API KEY');

Boom, that's it! Now you can interact with our API in a matter of seconds.

Examples

Uploading image

  import requests

  def upload_image(image_properties: dict, image_buffer):

    response = autoenhance.create_image(**image_properties)
    requests.put(
      response.s3_put_object_url,
      headers={
        "Content-Type": "image/jpeg",
      },
      body=image_buffer
    )

Retrieving order

  def get_order(order_id):
    order = autoenhance.retrieve_order(orderId)

Retrieving list of orders

  def get_orders():
    response = autoenhance.list_orders()
    orders = response.orders

Downloading enhanced image

  def download_image(image_id):
    image_url = autoenhance.download_enhanced_image(image_url, size="large")
    return image_url.url
How to obtain an API key
pypi
API key