Skip to content

Latest commit

 

History

History
123 lines (96 loc) · 3.17 KB

ai.image.tagging.md

File metadata and controls

123 lines (96 loc) · 3.17 KB

ai.image.tagging

Image tagging generates a list of words or tags that are relevant to the content of the supplied image.

Basic usage

To tag an image, send a POST request to Intento API at https://api.inten.to/ai/image/tagging. Specify the source image and the desired provider in JSON body of the request as in the following example:

curl -XPOST -H 'apikey: YOUR_API_KEY' 'https://api.inten.to/ai/image/tagging' -d '{
    "context": {
        "image": "..."
    },
    "service": {
        "provider": "ai.image.tagging.amazon.recognition_detect_labels_api"
    }
}'

The response contains the speech transcribe results:

{
    "results": "...",
    "meta": {},
    "service": {
        "provider": {
            "id": "ai.image.tagging.amazon.recognition_detect_labels_api"
        }
    }
}

If the provider doesn't have capabilities (e.g. language) to process request, 413 error will be returned:

{
  "error": {
    "code": 413,
    "message": "Provider ai.image.tagging.amazon.recognition_detect_labels_api constraint(s) violated."
  },
  "request_id": "..."
}

Getting available providers

To get a list of available providers, send a GET request to https://api.inten.to/ai/image/tagging.

curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/image/tagging'

The response contains a list of the providers available for given constraints:

[
    {
        "id": "ai.image.tagging.baidu.image_classify_api",
        "api_id": "baiduimageclassify",
        "name": "Baidu",
        "description": "Image Classify",
        "own_auth": true
    }
]

Filtering providers by capabilities

The list of providers may be further constrained by adding desired parameter values to the GET request:

curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/image/tagging?language=ru'

Response:

[
    {
        "id": "ai.image.tagging.amazon.recognition_detect_labels_api",
        "description": "API Detect Labels",
        "name": "Amazon Rekognition",
        "integrated": false,
        "own_auth": true,
        "stock_model": false,
        "custom_model": false
    },
    ...
]

More on provider flags and capabilities.

Getting information about a provider

To get information about a provider with a given ID, send a GET request to https://api.inten.to/ai/image/tagging/PROVIDER_ID.

curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/image/tagging/ai.image.tagging.google.cloud_vision_annotate_api.1-0'

The response contains a list of the metadata fields and values available for the provider:

{
    "id": "ai.image.tagging.google.cloud_vision_annotate_api.1-0",
    "name": "Google Cloud",
    "description": "Vision API",
    "own_auth": true,
    "stock_model": true,
    "custom_model": false,
}