Download OpenAPI specification:Download
Welcome to the API documentation of CaptionAI.
Get SEO-friendly caption/alternate-text, description and other metadata of an image queued via POST /caption endpoint.
This endpoint can also be used to get response details for successful POST /alt and POST /categorize requests. Note that unsuccessful requests are not logged for these endpoints.
You can find job id in the response header X-Job-Id
of your POST requests or on the
CaptionAI dashboard. No credit is deducted from your
account for this request. However, the request is rate-limited based on your plan.
See request and response examples for more details.
id required | string ID of the resource |
caption | string The caption or alternate text of the image. |
description | string A few line of description for the image. |
seo_filename | string The proposed seo-friendly filename of the image. |
tags | Array of strings 3 to 5 tags for the image. |
curl -X GET "https://api.captionai.co/v1/request/<job-id>" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json"
{- "caption": "string",
- "description": "string",
- "seo_filename": "string",
- "tags": [
- "string"
]
}
Classify image based on given categories.
The purpose of this endpoint is to classify images into predefined categories, providing a convenient way to categorize and organize your image data.
You can either pass the publicly accessible location of an image or a local path to an image file.
Most of the standard image formats are supported: jpeg
, png
, gif
, webp
, etc.
Maximum allowed file size for this request is 3MB.
Same as other endpoints, successful requests are logged and are available on the CaptionAI dashboard.
A job ID is returned in the response header X-Job-Id
for the successful requests. You can use this ID to fetch the response details
via GET /request/{job-id} endpoint without exhausting your API credit. The request is rate-limited
based on your plan.
See request and response examples for more details.
image | string A publicly downloadable image location or base64 encoded image string. |
categories | Array of strings The categories to classify the image into. |
category | string A category of the image. |
relevance | number The relevance of the category. |
{- "categories": [
- "nature",
- "beach",
- "dog",
- "laptop"
]
}
[- {
- "category": "string",
- "relevance": 0
}
]