This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1
- Package version: 1.0.0
- Generator version: 7.4.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.7+
You can install the package using:
pip install git+https://github.com/deep-image-ai/python-client.git(you may need to run pip with root permission: sudo pip install git+https://github.com/deep-image-ai/python-client.git)
Then import the package:
import deep_image_ai_clientInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import deep_image_ai_clientPlease follow the installation procedure and then run the following:
import deep_image_ai_client
from deep_image_ai_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://deep-image.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = deep_image_ai_client.Configuration(
host = "https://deep-image.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with deep_image_ai_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = deep_image_ai_client.DefaultApi(api_client)
process_payload = {"url":"https://deep-image.ai/api-example2.jpg","width":"200%","height":"200%"} # ProcessPayload |
try:
# Schedules a job to perform selected enhancement options.
api_response = api_instance.rest_api_process_post(process_payload)
print("The response of DefaultApi->rest_api_process_post:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->rest_api_process_post: %s\n" % e)All URIs are relative to https://deep-image.ai
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultApi | rest_api_process_post | POST /rest_api/process | Schedules a job to perform selected enhancement options. |
| DefaultApi | rest_api_process_result_post | POST /rest_api/process_result | Schedules a job to perform selected enhancement options and waits for the result. |
| DefaultApi | rest_api_result_hash_get | GET /rest_api/result/{hash} | Returns processing job result. |
- BackgroundParameters
- BackgroundRemoveTypes
- ColorEnhancementTypes
- ColorParameters
- CropTypes
- DeblurEnhancementModelTypes
- DeblurParameters
- DenoiseEnhancementModelTypes
- DenoiseParameters
- EnhancementTypes
- Error
- ErrorCode
- ErrorMessage
- FitType
- FitTypeOneOf
- FitTypes
- GenerateAdapterTypes
- GenerateParameters
- Height
- LightEnhancementTypes
- LightParameters
- OutputFormat
- Padding
- Preset
- PresetTypes
- PrintSize
- ProcessPayload
- ProcessResult
- RestApiProcessResultPost400Response
- RestApiProcessResultPost500Response
- RestApiProcessResultPostRequestParameters
- WhiteBalanceParameters
- Width
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header