pollinations_ai 0.0.1 copy "pollinations_ai: ^0.0.1" to clipboard
pollinations_ai: ^0.0.1 copied to clipboard

The pollinations.ai SDK for Flutter/Dart enables seamless access to AI-powered media generation tools, including images, audio, and text, via the Pollinations platform.

Pollinations.ai Flutter/Dart SDK #

Pollinations.ai

Effortlessly integrate the best generative AI models from Pollinations into your Flutter/Dart applications with this powerful SDK.
copied to clipboard

Features #

  • Image Generation: Create stunning visuals using state-of-the-art AI models.
  • Text Generation: Generate coherent and creative text with advanced language models.
  • Model Exploration: Easily explore and list available AI models for both image and text generation

Installing #

Install the package by running the following command:

flutter pub add pollinations_ai
copied to clipboard

Usage Examples #

Image Generation #

import 'package:pollinations_ai/pollinations_ai.dart';

final ai = ImageAi(model: "flux");
ImageAi image= await ai.call("A beautiful sunset");
print(image.prompt, image.response)
image.save("pollinations-image.png");
copied to clipboard

Text Generation #

import 'package:pollinations_ai/pollinations_ai.dart';

final ai = TextAi(model: "gpt-3.5-turbo");
final TextAi text= await ai.call(display:false, // Simulate typing,
        encode=True  // Use proper encoding
        prompt: "A beautiful sunset");
print(text.response);

copied to clipboard

List all models #

import 'package:pollinations_ai/pollinations_ai.dart';

Future<List<String>> image_generation_ai_models = ImageAi.models();
Future<List<String>> futurelist text_ai_models = TextAi.models();
copied to clipboard

Contributing #

🤝 We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/amazing-feature
copied to clipboard
  1. Commit your changes
git commit -m 'Add amazing feature' 
copied to clipboard
  1. Push to the branch
git push origin feature/amazing-feature
copied to clipboard
  1. Open a Pull Request

Acknowledgments #

A big thank you to pollinations and all contributors for their efforts in making this possible.

1
likes
140
points
112
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.19 - 2025.04.03

The pollinations.ai SDK for Flutter/Dart enables seamless access to AI-powered media generation tools, including images, audio, and text, via the Pollinations platform.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

dartdoc, enum_to_string, flutter, http, path_provider

More

Packages that depend on pollinations_ai