Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

3.0 KB
Raw Blame
import type { RegistryEntry } from "../../shared.ts";

/**
 * Pollinations answers /chat/completions with no credential at all (verified
 * live 2026-07-20: HTTP 200 with real choices). A token is still accepted and
 * lifts the anonymous rate limit, so the key is optional rather than required.
 */
export const pollinationsProvider: RegistryEntry = {
  id: "pollinations",
  alias: "pol",
  format: "openai",
  executor: "pollinations",
  // #2987: Pollinations retired the legacy text.pollinations.ai host (it now
  // returns 404 "This is our legacy API"). The current OpenAI-compatible gateway
  // is gen.pollinations.ai/v1, so route there as the primary endpoint.
  baseUrl: "https://gen.pollinations.ai/v1/chat/completions",
  baseUrls: ["https://gen.pollinations.ai/v1/chat/completions"],
  // NOTE (2026-06): Pollinations now requires API keys for premium models (claude, gemini, midijourney).
  // Free keyless models: openai, openai-fast, openai-large, qwen-coder, mistral, deepseek, grok, gemini-flash-lite-3.1, perplexity-fast, perplexity-reasoning.
  // Get a key at https://enter.pollinations.ai
  authType: "optional",
  authHeader: "bearer",
  models: [
    { id: "openai", name: "OpenAI (Pollinations)" },
    { id: "openai-fast", name: "OpenAI Fast (Pollinations)" },
    { id: "openai-large", name: "OpenAI Large (Pollinations)" },
    { id: "qwen-coder", name: "Qwen Coder (Pollinations)" },
    { id: "mistral", name: "Mistral (Pollinations)" },
    { id: "gemini", name: "Gemini (Pollinations)" },
    { id: "gemini-flash-lite-3.1", name: "Gemini Flash Lite 3.1 (Pollinations)" },
    { id: "gemini-fast", name: "Gemini Fast (Pollinations)" },
    { id: "deepseek", name: "DeepSeek (Pollinations)" },
    { id: "grok", name: "Grok (Pollinations)" },
    { id: "grok-large", name: "Grok Large (Pollinations)" },
    { id: "gemini-search", name: "Gemini Search (Pollinations)" },
    { id: "midijourney", name: "Midijourney (Pollinations)" },
    { id: "midijourney-large", name: "Midijourney Large (Pollinations)" },
    { id: "claude-fast", name: "Claude Fast (Pollinations)" },
    { id: "claude", name: "Claude (Pollinations)" },
    { id: "claude-large", name: "Claude Large (Pollinations)" },
    { id: "perplexity-fast", name: "Perplexity Fast (Pollinations)" },
    { id: "perplexity-reasoning", name: "Perplexity Reasoning (Pollinations)" },
    { id: "kimi", name: "Kimi (Pollinations)" },
    { id: "gemini-large", name: "Gemini Large (Pollinations)" },
    { id: "nova-fast", name: "Nova Fast (Pollinations)" },
    { id: "nova", name: "Nova (Pollinations)" },
    { id: "glm", name: "GLM (Pollinations)" },
    { id: "minimax", name: "MiniMax (Pollinations)" },
    { id: "mistral-large", name: "Mistral Large (Pollinations)" },
    { id: "polly", name: "Polly (Pollinations)" },
    { id: "qwen-coder-large", name: "Qwen Coder Large (Pollinations)" },
    { id: "qwen-large", name: "Qwen Large (Pollinations)" },
    { id: "qwen-vision", name: "Qwen Vision (Pollinations)" },
    { id: "qwen-safety", name: "Qwen Safety (Pollinations)" },
  ],
};