pollinations_ai 0.0.1
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:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
copied to clipboard
- Commit your changes
git commit -m 'Add amazing feature'
copied to clipboard
- Push to the branch
git push origin feature/amazing-feature
copied to clipboard
- Open a Pull Request
Acknowledgments #
A big thank you to pollinations and all contributors for their efforts in making this possible.