apiverve_imagecaption 1.2.4
apiverve_imagecaption: ^1.2.4 copied to clipboard
Image Caption generates natural language descriptions for uploaded image files. Upload a JPG, PNG, or GIF up to 5MB to receive an automated caption for alt text and media tagging.
Image Caption API - Dart/Flutter Client #
Image Caption generates natural language descriptions for uploaded image files. Upload a JPG, PNG, or GIF up to 5MB to receive an automated caption for alt text and media tagging.
This is the Dart/Flutter client for the Image Caption API.
Installation #
Add this to your pubspec.yaml:
dependencies:
apiverve_imagecaption: ^1.2.4
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage #
import 'package:apiverve_imagecaption/apiverve_imagecaption.dart';
void main() async {
final client = ImagecaptionClient('YOUR_API_KEY');
try {
// This API requires a file upload — a JSON body is rejected with a 400.
final response = await client.executeWithFile('/path/to/your-file');
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response #
{
"status": "ok",
"error": null,
"data": {
"caption": "A golden retriever running through a grassy field on a sunny day"
}
}
API Reference #
- API Home: Image Caption API
- Documentation: docs.apiverve.com/ref/imagecaption
Authentication #
All requests require an API key. Get yours at apiverve.com.
License #
MIT License - see LICENSE for details.
Built with Dart for APIVerve