Tag

Describe an image

Extract useful descriptions and visual aspects of your image

You will need an API token to send HTTP requests. See Authentication for instructions.

Quick start

Firstly, you'll need to upload the image you want to process. These parameters must be supplied as multipart form data and only either one of file or url must be used:

ParameterExampleDescription
file@file.pngThe image file as form data.
urlhttps://example.com/image.pngA static link to an image on the web. Our servers will fetch it for you.

Please note that we only support the following formats: WEBP, JPEG and PNG.

Response
{
  "data": {
    "long_description": "A man wearing a crown and glasses is standing in a room.",
    "short_description": "A man wearing a crown and glasses.",
    "colors": "['brown', 'orange', 'white', 'black', 'green']",
    "objects_present": "['crown', 'glasses', 'man']",
    "mood": "Humorous"
  }
}

Describing images

Our advanced Vision Language Model (VLM) is able to describe in detail any image you send to our API. The response will contain:

  • Both a long and short description of the image in natural language
  • Dominant colors present in the image
  • Common objects' presence
  • General mood of the picture
import requests
from pprint import pprint

api_url = "https://api.piktid.com/api"
access_token = "your_access_token"
target_path = "path_to_image"


with open(target_path, "rb") as target:
  response = requests.post(
      api_url + "/getCaption/v2",
      headers={"Authorization": "Bearer " + access_token},
      files={
          "file": target,
      },
  ).json()

pprint(response)