vectorizer / ai
Official PHP SDK for the Vectorizer.AI image vectorization API.
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
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.
For more information, please visit https://vectorizer.ai/support.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/clv/vectorizer-ai-php.git"
}
],
"require": {
"clv/vectorizer-ai-php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/VectorizerAI/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth $config = VectorizerAI\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new VectorizerAI\Api\AccountApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->getAccountStatus(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getAccountStatus: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.vectorizer.ai/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountApi | getAccountStatus | GET /account | Get account status |
| VectorizationApi | postDelete | POST /delete | Delete a retained image |
| VectorizationApi | postDownload | POST /download | Download a retained result |
| VectorizationApi | postVectorize | POST /vectorize | Vectorize an image |
Models
Authorization
Authentication schemes defined for the API:
basicAuth
- Type: HTTP basic authentication
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0- Package version:
1.0.0 - Generator version:
7.6.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen