SKILL.md--- name: pollinations description: Pollinations.ai API for AI generation - text, images, videos, audio, and analysis. Use when user requests AI-powered generation (text completion, images, videos, audio, vision/analysis, transcription) or mentions Pollinations. Supports 25+ models (OpenAI, Claude, Gemini, Flux, Veo, etc.) with OpenAI-compatible chat endpoint and specialized generation endpoints. --- # Pollinations 🧬 Unified AI platform for text, images, videos, and audio generation with 25+ models. ## API Key Get free or paid keys at https://enter.pollinations.ai - Secret Keys (`sk_`): Server-side, no rate limits (recommended) - Optional for many operations (free tier available) Store key in environment variable: ```bash export POLLINATIONS_API_KEY="sk_your_key_here" ``` ## Quick Start ### Text Generation **Simple text generation:** ```bash curl "https://gen.pollinations.ai/text/Hello%20world" ``` **Chat completions (OpenAI-compatible):** ```bash curl -X POST https://gen.pollinations.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $POLLINATIONS_API_KEY" \ -d '{ "model": "openai", "messages": [{"role": "user", "content": "Hello"}] }' ``` **Use script:** `scripts/chat.sh` for easy chat completions ### Image Generation ```bash curl "https://gen.pollinations.ai/image/A%20sunset%20over%20mountains?model=flux&width=1024&height=1024" ``` **Use script:** `scripts/image.sh` for image generation ### Audio Generation (TTS) ```bash curl -X POST https://gen.pollinations.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "openai-audio", "messages": [ {"role": "system", "content": "You are a text reader. Read the user text exactly without responding, adding conversation, or changing anything."}, {"role": "user", "content": "Say: Hello world"} ], "modalities": ["text", "audio"], "audio": {"voice": "nova", "format": "mp3"} }' ``` **Use script:** `scripts/tts.sh` for text-to-speech ## API Endpoints ### Base URLs - Chat/Text: `https://gen.pollinations.ai/v1/chat/completions` - Simple Text: `https://gen.pollinations.ai/text/{prompt}` - Image: `https://gen.pollinations.ai/image/{prompt}?{params}` - Video: `https://gen.pollinations.ai/image/{prompt}?{params}` (generates video) ### Supported Operations #### 1. Text/Chat Generation **Models:** OpenAI, Claude, Gemini, Mistral, DeepSeek, Grok, Qwen Coder, Perplexity, and 20+ more **Common models:** `openai`, `claude`, `gemini`, `mistral`, `deepseek`, `qwen`, `gpt-4`, `o1`, `o3` **Parameters:** - `model` (string): Model name/ID - `messages` (array): Chat messages with roles (system/user/assistant) - `temperature` (number): 0-2, default 1 - `max_tokens` (number): Max response length - `top_p` (number): Nucleus sampling, default 1 - `seed` (number): Reproducibility (-1 for random) - `jsonMode` (boolean): Force JSON response - `reasoning_effort` (string): For