Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bring-your-own-pollen

БесплатноБез исполняемых скриптовНе проверен

Add Pollinations Pay so each user can pay from their own balance. Use when building an app, CLI, extension or agent tool on Pollinations and you need the…

pollinationsот pollinations★ 5 348 звёзд на GitHub

Об этом скилле

Pollinations Pay for apps

Pollinations Pay lets users pay for your app's requests from their Pollinations balance. Each user connects their account and approves access, then the app receives a scoped user key (sk_...) for API requests. Users control the budget and expiry and can revoke access at any time.

Pollinations Pay guide · OAuth discovery

Pick the flow first

Your app Flow Who exchanges the code
Web app with a backend OAuth authorization-code + PKCE Backend (keeps secret)
Static / browser-only web app OAuth authorization-code + PKCE Browser via fetch (PKCE replaces the secret)
Legacy web app Fragment redirect No exchange; key arrives in #api_key=
CLI, bot, extension, anything headless Device flow The app polls the token endpoint

If you are unsure, default to the OAuth code flow with PKCE for new web work; it keeps sk_... out of the browser callback URL.

Step 1 — App Key (client_id, optional)

Every flow, including the <polli-connect> drop-in, works without an App Key: the consent screen then shows the redirect hostname and usage isn't attributed or monetized. For a quick static app, just add the button:

<script defer src="https://cdn.jsdelivr.net/npm/@pollinations/[email protected]/dist/connect.js"></script>
<polli-connect></polli-connect> <!-- element.apiKey holds the user's sk_ key -->

Never ask visitors to paste an sk_ key, or to create a pk_ key themselves.

To show your app's name and earn, create one at https://enter.pollinations.ai/keys?tab=app → App → Create, or via the API:

curl -X POST https://gen.pollinations.ai/account/keys \
  -H 'Authorization: Bearer sk_yoursecretkey' \
  -H 'Content-Type: application/json' \
  -d '{"name":"my-app","type":"publishable","redirectUris":["https://myapp.com/callback"],"earningsEnabled":true}'
  • redirectUris must match the callback exactly, query string included. Loopback http://localhost matches any port.
  • earningsEnabled: true opts into developer earnings: users pay 25% over base rates and the markup credits your balance, in the same bucket the user paid from.

Step 2 — OAuth code flow with PKCE

Build the auth link (generate a fresh verifier per attempt):

https://enter.pollinations.ai/authorize
  ?response_type=code
  &client_id=pk_yourkey
  &redirect_uri=https://myapp.com/callback
  &scope=profile%20usage
  &state=random-csrf-token
  &code_challenge=BASE64URL_SHA256_VERIFIER
  &code_challenge_method=S256

Optional restrictions: models=image,text (or individual IDs), budget=10 (spending cap in dollars, default 5, at most 10 from a link), expiry=7 (days, default 7). The user can change these on the consent screen. A requested machines scope starts unticked there; keys is only offered in the device flow and on redirects to http://localhost or http://127.0.0.1.

Handle the callback — validate state, then exchange the single-use code (10-minute TTL). Send the same client_id as on the auth link, or none:

curl -X POST https://enter.pollinations.ai/api/oauth/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=authorization_code' \
  -d 'code=oauth_code' \
  -d 'client_id=pk_yourkey' \
  -d 'redirect_uri=https://myapp.com/callback' \
  -d 'code_verifier=YOUR_PKCE_VERIFIER'
# -> { "access_token": "sk_...", "token_type": "bearer", "expires_in": 604800, "scope": "profile usage" }

There are no refresh tokens — re-run the flow when the key expires. Store the token in memory or sessionStorage; never in localStorage, a URL, analytics or logs.

Step 3 — Call the API with the user key

await fetch('https://gen.pollinations.ai/v1/chat/completions', {
  method: 'POST',
  headers: { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ model: 'openai/gpt-5.4-nano', messages: [{ role: 'user', content: 'yo' }] }),
});

Generation needs no scope — spending is bounded by the budget and expiry the user approved. Scopes gate account data only: profile (name + email), usage (balance + usage), keys (create/list/revoke keys; device flow and localhost redirects only).

Device flow — the headless path

Use this for CLIs, bots and extensions that cannot show the consent page.

# 1. request a device code (pass client_id for attribution)
curl -X POST https://enter.pollinations.ai/api/device/code \
  -H 'Content-Type: application/json' \
  -d '{"client_id": "pk_yourkey"}'
# -> { "device_code": "...", "user_code": "ABCD-1234",
#      "verification_uri": "https://enter.pollinations.ai/device",
#      "verification_uri_complete": "https://enter.pollinations.ai/device?user_code=ABCD-1234",
#      "expires_in": 1800, "interval": 5 }

# 2. s
Полный SKILL.md на GitHub

Установить bring-your-own-pollen в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл bring-your-own-pollen?

Add Pollinations Pay so each user can pay from their own balance. Use when building an app, CLI, extension or agent tool on Pollinations and you need the user-authorized sk_ key, when you must choose between the OAuth code flow, the fragment flow and the device flow, or when an app key's usage must be attributed and monetized.

Как установить скилл bring-your-own-pollen?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bring-your-own-pollen запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bring-your-own-pollen с