This document verifies that PolliLibPy (Python) and PolliLibJS (JavaScript) have 100% coverage of all Pollinations.AI API features as documented in the official API documentation.
Last updated: 2025-11-17
| Endpoint | Python | JavaScript | Status |
|---|---|---|---|
GET /prompt/{prompt} |
✅ text_to_image.py |
✅ text-to-image.js |
Complete |
GET /models |
✅ model_retrieval.py::list_image_models() |
✅ model-retrieval.js::listImageModels() |
Complete |
GET /feed |
✅ streaming_mode.py::monitor_feed() |
✅ streaming-mode.js::monitorFeed() |
Complete |
| Endpoint | Python | JavaScript | Status |
|---|---|---|---|
GET /{prompt} |
✅ text_to_text.py::generate_text() |
✅ text-to-text.js::generateText() |
Complete |
POST /openai |
✅ text_to_text.py::chat() |
✅ text-to-text.js::chat() |
Complete |
GET /models |
✅ model_retrieval.py::list_text_models() |
✅ model-retrieval.js::listTextModels() |
Complete |
GET /feed |
✅ streaming_mode.py::monitor_feed() |
✅ streaming-mode.js::monitorFeed() |
Complete |
| Endpoint | Python | JavaScript | Status |
|---|---|---|---|
GET /{prompt}?model=openai-audio&voice={voice} (TTS) |
✅ text_to_speech.py::generate_speech() |
✅ text-to-speech.js::generateSpeech() |
Complete |
POST /openai (STT via multimodal) |
✅ speech_to_text.py::transcribe() |
✅ speech-to-text.js::transcribe() |
Complete |
All parameters from the official API documentation are fully supported:
| Parameter | Type | Default | Python | JavaScript |
|---|---|---|---|---|
prompt |
string | Required | ✅ | ✅ |
model |
string | flux | ✅ | ✅ |
width |
integer | 1024 | ✅ | ✅ |
height |
integer | 1024 | ✅ | ✅ |
seed |
integer | random | ✅ | ✅ |
nologo |
boolean | false | ✅ | ✅ |
enhance |
boolean | false | ✅ | ✅ |
private |
boolean | false | ✅ | ✅ |
safe |
boolean | false | ✅ (added) | ✅ (added) |
Supported Models: flux, turbo, stable-diffusion, kontext
Special Feature: Image-to-image transformation with kontext model
- ✅ Python:
image_to_image.py::transform_image() - ✅ JavaScript:
image-to-image.js::transformImage()
| Parameter | Type | Default | Python | JavaScript |
|---|---|---|---|---|
prompt |
string | Required | ✅ | ✅ |
model |
string | openai | ✅ | ✅ |
temperature |
float | varies | ✅ | ✅ |
seed |
integer | random | ✅ | ✅ |
system |
string | — | ✅ | ✅ |
json |
boolean | false | ✅ | ✅ |
stream |
boolean | false | ✅ | ✅ |
| Parameter | Type | Python | JavaScript |
|---|---|---|---|
messages |
array | ✅ | ✅ |
model |
string | ✅ | ✅ |
temperature |
float | ✅ | ✅ |
max_tokens |
integer | ✅ | ✅ |
stream |
boolean | ✅ | ✅ |
tools |
array | ✅ function_calling.py |
✅ function-calling.js |
reasoning_effort |
string | ✅ | ✅ |
top_p |
float | ✅ | ✅ |
stop |
array | ✅ (as stop_sequences) |
✅ (as stopSequences) |
safe |
boolean | ✅ (added) | ✅ (added) |
Supported Models: openai, openai-fast, openai-reasoning, mistral, gemini-search
Reasoning Effort Levels: minimal, low, medium, high
- ✅ Python: Fully implemented
- ✅ JavaScript: Fully implemented
All 6 Official Voices Supported:
| Voice | Description | Python | JavaScript |
|---|---|---|---|
alloy |
Neutral, professional voice | ✅ | ✅ |
echo |
Deep, resonant voice | ✅ | ✅ |
fable |
Storyteller vibe voice | ✅ | ✅ |
onyx |
Warm, rich voice | ✅ | ✅ |
nova |
Bright, friendly voice | ✅ | ✅ |
shimmer |
Soft, melodic voice | ✅ | ✅ |
TTS Features:
- ✅ Voice selection
- ✅ MP3 and WAV export formats
- ✅ Sample rate configuration
- ✅ Streaming playback option
- ✅ Loudness normalization
- ✅ Multi-voice generation
STT Features:
- ✅ Base64-encoded audio input via multimodal endpoint
- ✅ Multiple audio format support (wav, mp3, etc.)
- ✅ Word-level timestamps
- ✅ Punctuation restoration
- ✅ Speaker diarization support
- ✅ JSON and SRT export formats
- ✅ Noise reduction preprocessing
Supported Vision Models:
- ✅ openai
- ✅ openai-large
- ✅ claude-hybridspace
| Input Method | Python | JavaScript |
|---|---|---|
| Image URL | ✅ image_to_text.py::analyze_image_url() |
✅ image-to-text.js::analyzeImageUrl() |
| Base64-encoded images | ✅ image_to_text.py::analyze_image_file() |
✅ image-to-text.js::analyzeImageFile() |
| Data URL format | ✅ data:image/{format};base64,{data} |
✅ data:image/{format};base64,{data} |
| Input Method | Python | JavaScript |
|---|---|---|
| Base64-encoded audio | ✅ speech_to_text.py::transcribe() |
✅ speech-to-text.js::transcribe() |
| Format specification | ✅ input_audio with data and format |
✅ input_audio with data and format |
Reasoning Effort Presets:
- ✅ minimal: Quick responses
- ✅ low: Light reasoning
- ✅ medium: Balanced approach
- ✅ high: Deep thinking
Compatible Models: openai, openai-fast, openai-reasoning
Implementation:
- ✅ Python:
text_to_text.py::chat(reasoning_effort="...") - ✅ JavaScript:
text-to-text.js::chat({reasoningEffort: "..."})
Safety Features:
- ✅
safe=trueparameter for NSFW filtering - ✅ Prompt safety checks
- ✅ Clear blocked content reporting
- ✅ Applies to both text and image generation
Implementation:
- ✅ Python:
safe=Trueparameter intext_to_text.pyandtext_to_image.py - ✅ JavaScript:
safe: trueparameter in both modules
Tool Definition Schema:
- ✅ JSON schema validation
- ✅ Function parameter typing
- ✅ Required/optional parameter handling
- ✅ Multiple tool support
Example Functions Implemented:
- ✅ Math operations (add, subtract, multiply, divide)
- ✅ Random number generation
- ✅ Equation evaluation
- ✅ Web value extraction
- ✅ Normalization utilities
Implementation:
- ✅ Python:
function_calling.pywith complete schema support - ✅ JavaScript:
function-calling.jswith complete schema support
Streaming Features:
- ✅ Token-by-token text streaming
- ✅ Progress events for image/audio
- ✅ Heartbeat messages during idle
- ✅ Retry guidance in headers
- ✅ Client cancellation support
- ✅ Real-time feed monitoring
Implementation:
- ✅ Python:
streaming_mode.py::stream_text(),monitor_feed() - ✅ JavaScript:
streaming-mode.js::streamText(),monitorFeed()
Retry Strategy:
- ✅ Jittered exponential backoff
- ✅ Respect for
Retry-Afterheaders - ✅ Configurable max attempts
- ✅ Idempotency key support
- ✅ Retry logging and tagging
Implementation:
- ✅ Python:
pollylib.py::retry_request()andretry_backoff.py - ✅ JavaScript:
pollylib.js::retryRequest()
Seed Features:
- ✅ Fixed seed for reproducible outputs
- ✅ Cross-platform seed handling
- ✅ Randomness source selection
- ✅ Variance comparison across seeds
- ✅ Seed logging with outputs
Implementation:
- ✅ Python:
seedparameter in all generation functions - ✅ JavaScript:
seedparameter in all generation functions
API key authentication is supported (per official docs):
| Key Type | Use Case | Python | JavaScript |
|---|---|---|---|
Publishable (pk_) |
Client-side apps | ✅ api_key parameter |
✅ apiKey option |
Secret (sk_) |
Backend services | ✅ api_key parameter |
✅ apiKey option |
Get API Key: https://enter.pollinations.ai
Implementation:
- ✅ Python:
PollinationsAPI(api_key="pk_...") - ✅ JavaScript:
new PollinationsAPI({apiKey: "pk_..."})
Auth Methods:
- Header:
Authorization: Bearer YOUR_API_KEY - Query param:
?key=YOUR_API_KEY
All fields from the TODO requirements are implemented:
- ✅ name and description
- ✅ max input tokens
- ✅ reasoning capability flag
- ✅ tier (anonymous, seed, flower, nectar)
- ✅ community supported flag
- ✅ input types array
- ✅ output types array
- ✅ tool use / function calling flag
- ✅ aliases array
- ✅ vision flag
- ✅ audio flag
- ✅ voices array
- ✅ system messages supported flag
- ✅ uncensored flag
All fields from the TODO requirements are implemented:
- ✅ name and description
- ✅ style tags
- ✅ input/output limits (width, height)
- ✅ supported formats (PNG, JPEG)
- ✅ image-to-image support flag
Implementation:
- ✅ Python:
model_retrieval.py::_normalize_text_models()and_normalize_image_models() - ✅ JavaScript:
model-retrieval.js::_normalizeTextModels()and_normalizeImageModels()
Kontext Model Features:
- ✅ Source image input
- ✅ Text prompt-guided transformation
- ✅ Inpainting with mask input
- ✅ Outpainting with canvas expansion
- ✅ Text overlay with styling
- ✅ Meme template mode
- ✅ EXIF preservation option
Implementation:
- ✅ Python:
image_to_image.py(full module) - ✅ JavaScript:
image-to-image.js(full module)
Both libraries include comprehensive testing frameworks:
| Feature | Python | JavaScript |
|---|---|---|
| Sample Corpus Management | ✅ test_utils.py::SampleCorpus |
✅ test-utils.js::SampleCorpus |
| Prompt Fuzzing | ✅ test_utils.py::PromptFuzzer |
✅ test-utils.js::PromptFuzzer |
| Chaos Testing | ✅ test_utils.py::ChaosTestRunner |
✅ test-utils.js::ChaosTestRunner |
| Memory Profiling | ✅ test_utils.py::MemoryProfiler |
✅ test-utils.js::MemoryProfiler |
| Binary Data Handling | ✅ test_utils.py::BinaryDataHandler |
✅ test-utils.js::BinaryDataHandler |
| Cold Start Simulation | ✅ test_utils.py::ColdStartSimulator |
✅ test-utils.js::ColdStartSimulator |
- ✅ 3/3 Image endpoints
- ✅ 4/4 Text endpoints
- ✅ 2/2 Audio endpoints
- ✅ 9/9 Image parameters (including safe)
- ✅ 7/7 Simple text parameters
- ✅ 9/9 OpenAI endpoint parameters
- ✅ All 6 TTS voices
- ✅ All STT features
- ✅ All vision/multimodal features
- ✅ All authentication methods
- ✅ All advanced features (streaming, reasoning, safety, tools, etc.)
- ✅ All image models (flux, turbo, stable-diffusion, kontext)
- ✅ All text models (openai, openai-fast, openai-reasoning, mistral, gemini-search)
- ✅ All audio models (openai-audio)
- ✅ All vision models (openai, openai-large, claude-hybridspace)
- ✅ Python implementation complete
- ✅ JavaScript implementation complete
- ✅ Feature-for-feature parity between both languages
PolliLibPy and PolliLibJS provide complete, production-ready implementations of the entire Pollinations.AI API surface area.
- Every documented API endpoint is accessible
- Every documented parameter is supported
- Every advanced feature is implemented
- Both languages have identical capabilities
- Additional testing utilities enhance development workflow
Python (PolliLibPy/):
pollylib.py- Base API client with auth and retry logicmodel_retrieval.py- Model listing and metadatatext_to_image.py- Image generationtext_to_text.py- Text generation (GET and POST)text_to_speech.py- TTS with all 6 voicesspeech_to_text.py- STT via multimodalimage_to_text.py- Vision/image analysisimage_to_image.py- Image transformationfunction_calling.py- Tool use and function callingstreaming_mode.py- SSE streaming and feedsretry_backoff.py- Advanced retry strategiestest_utils.py- Comprehensive testing framework__init__.py- Package initialization
JavaScript (PolliLibJS/):
pollylib.js- Base API client with auth and retry logicmodel-retrieval.js- Model listing and metadatatext-to-image.js- Image generationtext-to-text.js- Text generation (GET and POST)text-to-speech.js- TTS with all 6 voicesspeech-to-text.js- STT via multimodalimage-to-text.js- Vision/image analysisimage-to-image.js- Image transformationfunction-calling.js- Tool use and function callingstreaming-mode.js- SSE streaming and feedstest-utils.js- Comprehensive testing frameworkindex.js- Package entry point
- Official API Documentation: https://github.com/pollinations/pollinations/blob/master/APIDOCS.md
- Auth Dashboard: https://auth.pollinations.ai
- Pollinations.ai: https://pollinations.ai
Last Verified: 2025-11-17 API Version: Latest (as of documentation date) Coverage Status: ✅ COMPLETE - 100%