Image Captioning Ai
Drag & drop an image here or click to select
Supports JPEG, PNG, WebP, GIF, BMP, TIFF up to 10MB
API Integration Examples
const formData = new FormData();
formData.append('image_file', fileInput.files[0]);
formData.append('fast_mode', true);
fetch('https://api.text-generator.io/api/v1/image-caption', {
method: 'POST',
headers: {
'secret': 'Loading...'
},
body: formData
})
.then(response => response.json())
.then(data => {
console.log('Caption:', data.caption);
console.log('Model:', data.model);
console.log('Fast mode:', data.fast_mode);
});
import requests
url = 'https://api.text-generator.io/api/v1/image-caption'
headers = {'secret': 'Loading...'}
files = {'image_file': open('image.jpg', 'rb')}
data = {'fast_mode': True}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(f"Caption: {result['caption']}")
curl -X POST "https://api.text-generator.io/api/v1/image-caption" \
-H "secret: Loading..." \
-F "[email protected]" \
-F "fast_mode=true"
Example Response
{
"caption": "a red car parked on the street",
"filename": "example.jpg",
"fast_mode": true,
"model": "microsoft/git-base"
}
Features
High Accuracy
Uses Microsoft's GIT-base model for precise image understanding
Fast Processing
Fast mode processes images in ~200ms, Quality mode in ~500ms
Multiple Formats
Supports JPEG, PNG, WebP, GIF, BMP, TIFF up to 10MB
Optimized Performance
Mixed precision FP16, JIT compilation, and persistent caching