Summary
Add first-class integration support for Pollination AI and Unsloth Studio so WebBrain can use them as model providers and, where appropriate, offer browser-level guidance for their web interfaces.
Motivation
- Pollination AI offers a broad OpenAI-compatible API for text, image, video, audio, embeddings, and realtime voice.
- Unsloth Studio exposes an OpenAI-compatible local/remote API for models loaded in its UI.
- Both can expand WebBrain’s provider coverage without requiring bespoke model adapters for every endpoint.
Proposed implementation
- Add a shared OpenAI-compatible provider abstraction for Pollinations and Unsloth.
- Add provider settings for base URL, API key, model ID, timeout, and optional metadata.
- Use secure storage for keys and avoid logging or exposing secrets.
- Add a connection test using model discovery or a minimal request.
- Add model discovery and capability metadata so the UI can distinguish chat, vision, embeddings, image, audio, and video support.
- Add tests for streaming, tool calls, vision input, and common HTTP failures.
Pollination AI details
- Base URL:
https://gen.pollinations.ai
- OpenAI-compatible base:
https://gen.pollinations.ai/v1
- Auth:
Authorization: Bearer <API_KEY> or ?key=<API_KEY>
- Model discovery:
GET /v1/models
- Key prefixes:
sk_ for server-side, pk_ for app/public flows
- New integrations should prefer Connect User Wallets / BYOP with OAuth authorization-code + PKCE or device flow
- Documented capabilities: streaming, tools, structured output, vision, search, embeddings, media inputs, image/audio/video/3D endpoints
Unsloth Studio details
- Local OpenAI-compatible API at
http://localhost:<PORT>
- Auth: API key created in Unsloth avatar → Settings → API
- Key prefix:
sk-unsloth-
- Supported endpoints:
/v1/chat/completions, /v1/responses, Anthropic-compatible /v1/messages
- Requirements: local Unsloth app running and a model loaded
- Remote access can be provided through Cloudflare HTTPS
Acceptance criteria
Open questions
- Should browser-level Unsloth/Pollinations UI guidance live in adapters, or is provider/workflow config sufficient?
- Do we want first-class support for Pollinations media-specific endpoints beyond chat completions?
- Should Unsloth remote exposure be treated as a separate provider variant?
Summary
Add first-class integration support for Pollination AI and Unsloth Studio so WebBrain can use them as model providers and, where appropriate, offer browser-level guidance for their web interfaces.
Motivation
Proposed implementation
Pollination AI details
https://gen.pollinations.aihttps://gen.pollinations.ai/v1Authorization: Bearer <API_KEY>or?key=<API_KEY>GET /v1/modelssk_for server-side,pk_for app/public flowsUnsloth Studio details
http://localhost:<PORT>sk-unsloth-/v1/chat/completions,/v1/responses, Anthropic-compatible/v1/messagesAcceptance criteria
Open questions