Tag
Describe an image
Extract useful descriptions and visual aspects of your image
Google Colab
Try the example Jupyter notebook
Github
Find basic integration code on Github (Python)
Webapp
Quickly try our interactive webapp
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:
| Parameter | Example | Description |
|---|---|---|
file | @file.png | The image file as form data. |
url | https://example.com/image.png | A 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.
{
"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)