Open-source project
pollinations/pollinations avatar
pollinations/pollinations

pollinations.ai: A Unified Open-Source API for AI Generation

Your Friendly Open-Source Gen-AI Platform

5,170 stars1,166 forksTypeScriptMIT

At a glance

What is it?
pollinations.ai is an open-source platform that routes text, image, audio, video, 3D, and embedding generation requests through a single endpoint at gen.pollinations.ai. It runs on a Pollen credit system at approximately one US dollar per Pollen, offers a CLI, and exposes an OAuth 2.1 PKCE flow for third-party app builders.
Who is it for?
pollinations.ai suits developers who want to add AI image, text, or audio generation to a project without building separate integrations for each provider, and app builders who need a credit-delegation mechanism so their own users pay for generation. It is not a self-hostable single-model inference server: the platform is a managed multi-provider routing layer.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 3, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What pollinations.ai Does and Who It Is For

pollinations.ai is described by its README as open-source AI for people who make things. The platform centralizes generation requests across multiple AI modalities, including image, text, audio, video, 3D, and embeddings, behind one API endpoint at gen.pollinations.ai. Instead of managing separate provider keys for Flux, GPT-series models, Claude, Gemini, and others, a developer sends requests to one address and specifies a model by its publisher/model ID.

The platform targets two distinct audiences. Individual developers use API keys to call models directly. App builders use a separate app-key mechanism to track usage from third-party apps that operate under the BYOP model, short for Bring Your Own Pollen, where end users supply their own credits when using the app. Both flows are documented in the monorepo. The recent apps section of the README shows a catalog of apps built on the platform: image generators, text-to-speech tools, arcade games driven by live AI prompts, and job-fit analyzers.

The Unified Endpoint and Model Catalog

The unified endpoint at gen.pollinations.ai handles all generation types. Model IDs follow a publisher/model naming convention introduced as a breaking change and announced at the top of the README. The old short IDs remain supported as aliases, so existing code does not break, but new integrations should use the canonical form. For example, `flux` resolves to `black-forest-labs/flux.1-schnell`. The model catalog is browsable at enter.pollinations.ai/models and returns current ID mappings.

Recent model additions documented in the README include GPT-6 Sol and Luna with vision, tool use, structured output, and streaming; MiniMax H3 Max for 5-, 10-, and 15-second video clips up to 1080p with synchronized audio; Gemini 3.8 for speech in 30 voices with style instructions; Qwen Image 2.1 for image generation and editing with up to 10 reference images; and Recraft V4.1 Flash for text-to-image work. The API documentation at gen.pollinations.ai/docs covers generation parameters for each type. This is a platform that models join and leave; the live catalog is the authoritative source.

Getting Started with the CLI

The fastest way to try the platform without writing code is the CLI:

bash
npx @pollinations/cli

The source lives in packages/polli-cli inside the monorepo. The CLI is described in the README as a tool for humans and AI agents. The README also shows a one-line integration with tgpt, a terminal-based tool:

bash
polli harness tgpt on

This connects tgpt to Pollinations using `openai/gpt-5.4-nano` as the default model and lets you turn it off again with `polli harness tgpt off` without modifying the existing tgpt configuration.

For code-based integration, the SDK lives at packages/sdk in the monorepo. The npm workspace installs the SDK with:

bash
npm install --prefix packages/sdk

The README shows the full workspace install command as `npm run install:all`, which covers the root dependencies, the SDK, and the MCP package at packages/mcp. API documentation is at gen.pollinations.ai/docs.

Pollen Credits and API Keys

The credit system uses a unit called Pollen. The README describes it as a simple pay-as-you-go system with approximately one US dollar equivalent to one Pollen unit. Developers purchase Pollen through the dashboard at enter.pollinations.ai.

Two types of keys exist. Secret API keys authorize direct model usage and should not be exposed in client-side code. App keys track usage from BYOP-mode apps where the end user authenticates with their own Pollinations account and spends their own Pollen balance. The BYOP mechanism is documented in the BRING_YOUR_OWN_POLLEN.md file in the repository root.

The Pollen credit model has a direct consequence for app builders: an app that uses BYOP does not pay for its users' generation costs. The user signs into their own Pollinations account within the app and the Pollen deductions come from their balance. Apps that want to pay on behalf of users would use the secret API key path instead and absorb the cost themselves. The economics file at operations/economics/web in the monorepo documents the platform's cost structure.

OAuth 2.1 PKCE Flow for App Builders

Third-party apps authenticate users through an OAuth 2.1 PKCE flow hosted at enter.pollinations.ai. The README's recent apps section documents several apps that implement this flow: they redirect to enter.pollinations.ai/authorize with a public app key (starting with pk_) as the client_id, plus a redirect_uri and optional scope parameters. After the user approves, the app receives an authorization code it exchanges for a token.

The README also references a Quest system where app builders can earn Pollen rewards by submitting apps that fulfill open quests. A quest is a challenge posted on the platform; when an approved app closes a quest, the submitter can claim the posted Pollen reward. This creates an incentive loop for expanding the app catalog. The quest and reward mechanism is described as of 2026-09-27 in the README.

The monorepo provides documentation on the auth flow in the packages/auth workspace and in the BUILD_YOUR_OWN_AGENT.md file at the repository root. These cover the PKCE implementation details that frontend apps need, specifically how to redirect, receive the code, and exchange it without a backend server involved in the exchange.

Monorepo Structure and Self-Development

The repository is a TypeScript monorepo using npm workspaces. The top-level package.json lists the workspace members: shared, enter.pollinations.ai, gen.pollinations.ai, packages/auth, packages/sdk, packages/ui, apps/react, and operations/economics/web. Development requires running two services concurrently:

bash
npm run dev

This starts enter.pollinations.ai and gen.pollinations.ai in parallel using `concurrently`. The dev scripts for each service are available separately as `npm run dev:enter` and `npm run dev:gen` for isolated testing. The gen service depends on the enter worker, so the full stack command `npm run dev:gen-stack` starts the enter worker first, waits 12 seconds, then starts gen.

Code formatting uses Biome, configured in biome.jsonc. The `format:changed` script runs Biome only over files changed relative to origin/main, which keeps CI fast on large diffs. The repository also includes a packages/mcp workspace for Model Context Protocol support, documented in AGENTS_AND_MCP.md. The DEVELOP.md file in the repository root covers local development prerequisites and environment setup.

Limitations and Alternative Approaches

pollinations.ai is a managed multi-provider routing layer, not a self-hostable single-model inference server. Developers who need to run a specific model on their own hardware, control the model's weights, or operate without an external API dependency cannot replace it with this platform. Tools like Ollama are designed for local model execution and do not require cloud credits.

Model availability and IDs change as providers join or update their offerings on the platform. A model that works today may be renamed, repriced, or retired. The recommendation in the README to browse the live catalog at enter.pollinations.ai/models before integrating reflects this: any model dependency should be verified against the current catalog, not assumed from documentation that may be stale.

The MIT license covers the monorepo's code: the generation infrastructure, the SDK, and the CLI. It does not affect the terms under which the individual AI models are offered through the API; those terms are set by each model provider. Teams with compliance requirements around specific model licenses should check each model's terms separately from the platform license.

Editorial conclusion

pollinations.ai suits developers who want to add AI image, text, or audio generation to a project without building separate integrations for each provider, and app builders who need a credit-delegation mechanism so their own users pay for generation. It is not a self-hostable single-model inference server: the platform is a managed multi-provider routing layer. Before integrating, confirm the model IDs you depend on from the catalog at enter.pollinations.ai/models, since the platform migrated to publisher/model format (for example, black-forest-labs/flux.1-schnell) while keeping old IDs as aliases. The MIT license covers the monorepo code, not the individual models routed through the API.

Frequently asked questions

What is pollinations.ai?

pollinations.ai is an open-source AI generation platform that routes text, image, audio, video, 3D, and embedding requests through a unified endpoint at gen.pollinations.ai. It supports models from multiple providers including Flux, GPT-series, Claude, Gemini, and others, addressable by their publisher/model ID.

Is pollinations.ai free to use?

The platform uses a pay-as-you-go Pollen credit system at approximately one US dollar per Pollen unit. App builders can use the BYOP model (Bring Your Own Pollen) where end users authenticate with their own Pollinations account and spend their own Pollen, so the app itself pays nothing for those requests.

How do I use the pollinations.ai API?

Get started at enter.pollinations.ai to create an account and obtain an API key or app key. The CLI is available via npx @pollinations/cli for quick exploration. The API documentation is at gen.pollinations.ai/docs, and the SDK lives in the packages/sdk workspace of the monorepo.

What is a free alternative to pollinations.ai?

Ollama is an open-source tool for running AI models locally without cloud credits. It focuses on local model execution rather than multi-provider routing, so it requires downloading model weights and running them on your own hardware. The README does not document an officially recommended alternative.

Official sources

  1. Issues
  2. License: MIT
  3. pollinations/pollinations on GitHub
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/pollinations-pollinations.svg)](https://hysenlabs.com/projects/pollinations-pollinations)