Image Captioning
studio-captionSend an image URL (or several) plus an optional prompt and get a caption back synchronously. The caption is at data.response; per-image dimensions are in images_meta.
POST imageUrl (single) OR imageUrls (multiple) with an optional prompt. The caption comes back at data.response, along with images_meta (per-image dimensions). Synchronous — no job polling.
/v1/proxy/studio-analyze-captionCaption an image (synchronous)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
imageUrl | string | optional | Public URL of one image. Send imageUrl OR imageUrls. |
imageUrls | array<string> | optional | Multi-image input — returns one shared caption describing all the images together. |
prompt | string | optional | Instruction for the caption. Default: "Describe the image(s) in detail." |
max_new_tokens | integer | optional | Maximum caption length, in tokens. Default 512. |
curl -X POST https://api.cn8.io/v1/proxy/studio-analyze-caption \
-H "X-API-Key: <cn8_api_key>" \
-H "Content-Type: application/json" \
-d '{"imageUrl":"https://example.com/file","imageUrls":["https://example.com/file"],"prompt":"your text here"}'{
"status": "success",
"data": {
"status": "success",
"response": "A sunlit park with a wooden bench under a large oak tree.",
"images_meta": [{ "width": 1600, "height": 738 }]
}
}
Field names
The caption is at data.response (NOT data.caption). Per-image dimensions are in images_meta (a plural array).