kavel 0.2.0 copy "kavel: ^0.2.0" to clipboard
kavel: ^0.2.0 copied to clipboard

Generate and edit images from Dart and Flutter with no API key and no account, via the free tier of kavel.ai.

example/kavel_example.dart

// dart run example/kavel_example.dart "an isometric coffee shop, pastel palette"
import 'package:kavel/kavel.dart';

Future<void> main(List<String> args) async {
  final kavel = Kavel();
  try {
    final img = args.isNotEmpty && args[0] == '--edit'
        ? await kavel.edit(args[1], args[2])
        : await kavel.generate(args.isEmpty ? 'a paper boat at sunrise' : args[0]);
    print('${img.url} (watermarked: ${img.watermarked})');
  } on KavelException catch (e) {
    print('${e.kind}: ${e.message}');
  } finally {
    kavel.close();
  }
}
0
likes
160
points
--
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Generate and edit images from Dart and Flutter with no API key and no account, via the free tier of kavel.ai.

Homepage
Repository (GitHub)
View/report issues

Topics

#image-generation #ai #text-to-image #image-editing

License

MIT (license)

Dependencies

http

More

Packages that depend on kavel