OpenAPI 3.0 specification for the Vectorizer.AI image vectorization API. Authenticate with HTTP Basic auth, using your API Id as the username and your API Secret as the password.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.6.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://vectorizer.ai/support
Python 3.7+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/clv/vectorizer-ai-python.git(you may need to run pip with root permission: sudo pip install git+https://github.com/clv/vectorizer-ai-python.git)
Then import the package:
importvectorizer_aiInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
importvectorizer_aiExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
importvectorizer_aifromvectorizer_ai.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://api.vectorizer.ai/api/v1# See configuration.py for a list of all supported configuration parameters.configuration=vectorizer_ai.Configuration(
host="https://api.vectorizer.ai/api/v1"
)
# 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 HTTP basic authorization: basicAuthconfiguration=vectorizer_ai.Configuration(
username=os.environ["USERNAME"],
password=os.environ["PASSWORD"]
)
# Enter a context with an instance of the API clientwithvectorizer_ai.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=vectorizer_ai.AccountApi(api_client)
try:
# Get account statusapi_response=api_instance.get_account_status()
print("The response of AccountApi->get_account_status:\n")
pprint(api_response)
exceptApiExceptionase:
print("Exception when calling AccountApi->get_account_status: %s\n"%e)All URIs are relative to https://api.vectorizer.ai/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountApi | get_account_status | GET /account | Get account status |
| VectorizationApi | post_delete | POST /delete | Delete a retained image |
| VectorizationApi | post_download | POST /download | Download a retained result |
| VectorizationApi | post_vectorize | POST /vectorize | Vectorize an image |
Authentication schemes defined for the API:
- Type: HTTP basic authentication