Image Captioner API
Introducing our cutting-edge Image Captioner API, a powerful tool designed to provide accurate and contextually relevant descriptions for your images.
Last updated
Introducing our cutting-edge Image Captioner API, a powerful tool designed to provide accurate and contextually relevant descriptions for your images.
Last updated
curl -X 'POST' \
'https://prod.api.market/api/v1/magicapi/captioner/captioner' \
-H 'accept: application/json' \
-H 'x-api-market-key: API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"image": "https://telegra.ph/file/e4a72c3fc980534f4eb45.png",
"task": "image_captioning"
}'import requests
headers = {
'accept': 'application/json',
'x-api-market-key': 'API_KEY',
'Content-Type': 'application/json',
}
json_data = {
'image': 'https://telegra.ph/file/e4a72c3fc980534f4eb45.png',
'task': 'image_captioning',
}
response = requests.post('https://prod.api.market/api/v1/magicapi/captioner/captioner', headers=headers, json=json_data)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://prod.api.market/api/v1/magicapi/captioner/captioner');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'x-api-market-key: API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"image\": \"https://telegra.ph/file/e4a72c3fc980534f4eb45.png\",\n \"task\": \"image_captioning\"\n}");
$response = curl_exec($ch);
curl_close($ch);import axios from 'axios';
const response = await axios.post(
'https://prod.api.market/api/v1/magicapi/captioner/captioner',
{
'image': 'https://telegra.ph/file/e4a72c3fc980534f4eb45.png',
'task': 'image_captioning'
},
{
headers: {
'accept': 'application/json',
'x-api-market-key': 'API_KEY',
'Content-Type': 'application/json'
}
}
);fetch('https://prod.api.market/api/v1/magicapi/captioner/captioner', {
method: 'POST',
headers: {
'accept': 'application/json',
'x-api.market': 'API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'image': 'https://telegra.ph/file/e4a72c3fc980534f4eb45.png',
'task': 'image_captioning'
})
});{
"request_id": REQUEST_ID
}curl -X 'GET' \
'https://prod.api.market/api/v1/magicapi/captioner/predictions/REQUEST_ID' \
-H 'accept: application/json' \
-H 'x-api-market-key: API_KEY'import requests
headers = {
'accept': 'application/json',
'x-api-market-key': 'API_KEY',
}
response = requests.get('https://prod.api.market/api/v1/magicapi/captioner/predictions/REQUEST_ID', headers=headers)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://prod.api.market/api/v1/magicapi/captioner/predictions/REQUEST_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'x-api-market-key: API_KEY',
]);
$response = curl_exec($ch);
curl_close($ch);import axios from 'axios';
const response = await axios.get('https://prod.api.market/api/v1/magicapi/captioner/predictions/REQUEST_ID', {
headers: {
'accept': 'application/json',
'x-api-market-key': 'API_KEY'
}
});fetch('https://prod.api.market/api/v1/magicapi/captioner/predictions/REQUEST_ID', {
headers: {
'accept': 'application/json',
'x-api-market-key': 'API_KEY'
}
});{
"status": "succeeded",
"result": "RESULT_DESCRIPTION"
}