Documentation
Images and classifications
The API use is conditioned by having an API key for authentication. This service is unusable without an authentication way even if you use it in trial mode. For that particular one you have to register and subscribe to the free plan to get a valid API key to start using the service. None of the API services and endpoints is available without authentication.
POST /api/v1/image-classification/tags
The main endpoint of the API is image-classification API. You can use this endpoint to ask for the classification of your images. This endpoint needs to be called with the tags as an element of the path. The value has to be an integer between 1 and 5 and corresponds to the number of labels you want to get from your image. You need to specify this number of labels in the path just after the endpoint and not as a parameter.
This endpoint has to be called joining in the request the image file with the image_file key and the image file as value and your API key with the Authorization key and Token <api key> as value. You can also specify a language for the labels you want to get between English and French using the lang key and adding respectively en and fr as value. If the label is not available in the language you requested the lang parameter will be ignored and the label will be returned in the default available language. The response you will get will fit the shape on the right.
GET /api/v1/profile
PUT /api/v1/profile
You can also use the API to get information about your profile using the endpoint called profile API. This endpoint doesn’t take any parameter or additional element. You just need to join your API key with the Authorization key and Token <api key> as value in your request. Calling this endpoint using the GET method will return a json object with your profile data as shown on the right.
Calling this endpoint with the PUT method allows you to bring some modifications to your profile data. You can add one or several parameters among first_name, last_name, civility, status, company, siret, address, address_complement, postal_code, city, phone or mobile_phone in your request. All the parameters you add in your request will be modified and you will get the json object corresponding to your updated profile with the shape shown on the right.
GET /api/v1/images
GET /api/v1/images/?q=7173095073798789242
POST /api/v1/images
The API also allows you to upload images to your account without classifying it. You will be able to get labels from it later. For it you can call the endpoint called images API. You just need to call the API with the POST method and join the file with the image_file key and the image file as value and your API key for authentication with the Authorization key and Token <api key> as value.
If you already uploaded several images you can also get the image data and direct link to one or several image(s) calling the endpoint with the GET method. Without any parameter the response will contain all the images you uploaded and associated to your account. To get one specific image you can add the q parameter to your request specifying the reference or the link to the image as it is shown in the example above. You can also get one or several images specifying just part of the reference or the path in that same parameter to make it work as a partial search query. In both cases the json object you will get as a response will look as it is shown on the right.
GET /api/v1/classifications
GET /api/v1/classifications/?q=8090763167613689842
When you already sent some images to get the classifications you can get that previous classifications also using the Images Vision API calling the classifications API endpoint with the GET method. If you call the endpoint without any parameter you will get all your classifications back in the json response object. You can add the q parameter to search for a specific classification specifying the exact reference or a part of it as it is shown on the example above. You need to call this endpoint with the Authorization key associated to your API key for authentication with that particular shape Token <api key> as value. The response you will get will be one or several object(s) which look as shown on the right.
Subscriptions
GET /api/v1/subscriptions
GET /api/v1/susbcriptions/?q=enterprise
You can use the API also to get information about your current and cancelled subscription(s) as you can do navigating in your client space with graphic interface. To get your current and or the cancelled subscriptions, you need to call with the GET method the subscriptions API endpoint. If you call it without any parameter you will get all the subscriptions associated to your account whether they are active or cancelled. As it is shown above you can use the q parameter to make a search in it to sort them by name or periodicity. Subscriptions haven’t any reference so you can’t search for one subscription in particular using a unique identifier. You have to call this endpoint joining your API key with that format Token <api key> as value associating it to the Authorization key for your authentication. The json object(s) you will get as a response from this endpoint will look individually as the json object shown on the right.
GET /api/v1/contributions
GET /api/v1/contributions/?q=8362966363
You can also get using Images Vision API data about your invoices calling the contributions API endpoint with the GET method as you can do it navigating in your client space with the provided graphic interface. To get all the contributions that are registered and associated to your account and your active and/or previous subscriptions you can call this endpoint without any parameter. If you want to get a particular invoice you can specify the exact reference or a part of it using the q parameter in your request. This parameter also accepts the name of a subscription to get all the invoices related to it. All the calls made on this endpoint need to be associated to the Authorization key with your valid API Key as value passed with the following shape Token <api key>. The json object(s) you will get as a response from this endpoint will individually look as the one shown on the right.