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.

pub package License: MIT

This is the Dart/Flutter client for the Image Caption API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_imagecaption: ^1.2.5

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

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_imagecaption
Image Caption API client for Dart/Flutter