ai-connections weekly downloads statistics
By seeker24601 · npm · AI SDKs
Add any of 42 AI providers to your app in one line: text, image and video, local models, model discovery, one error type, and safe bring-your-own-key storage with React settings. Built on the Vercel AI SDK.
ai-connections has 31 recorded weekly downloads on npm, a decrease of 95.9% over the past 30 days, ranking #2895 of 3,247 tracked listings.
About ai-connections
AI Connections
Add any AI provider to your app in one line, and stop rebuilding provider integrations for every project.
Give it to your agent
Paste this into Claude Code, Codex, Cursor or any coding agent:
Add AI provider support to this project with AI Connections (npm package: ai-connections). First read https://seeker-studio.games/ai-connections/llms.txt and follow it.
Or install its skill once, so every agent session in the project knows to use it:
npx ai-connections-cli skill
More at seeker-studio.games/ai-connections.
Or write it yourself
import { generateText, languageModel } from 'ai-connections/direct';
const { text } = await generateText({
model: languageModel('openrouter:deepseek/deepseek-chat'), // reads OPENROUTER_API_KEY
prompt: 'Summarize this document…',
});
Change the string to change the provider, and nothing else: anthropic:claude-sonnet-5-5, zai:glm-4.6, openai:gpt-5, ollama:llama3.2. The same goes for images:
import { createImage } from 'ai-connections/direct';
const image = await createImage('fal:fal-ai/flux/dev', { prompt: 'a lantern on wet concrete', aspectRatio: '3:2' });
// { kind: 'image', mediaType: 'image/png', base64: '…' }
npm install ai-connections
Why
Every AI project re-solves the same problems. Which package talks to which provider, at what base URL, with what auth header, reading which environment variable. How to list a provider's models. Why each SDK throws a different error. How image and video APIs differ: some stream, some return a job to poll, some want references uploaded first. And, once users bring their own keys, how to store those keys safely and give them a settings screen.
AI Connections solves these once, for every provider it knows, and keeps them solved. Your project, or the coding agent building it, writes a provider string instead of an integration.
What you get
- 42 provider presets, one way in.
- Text: 30 providers, including OpenAI, Anthropic, Google, DeepSeek, Z.ai, Moonshot, Qwen, MiniMax, Mistral, xAI, OpenRouter, Groq, Together, Fireworks, DeepInfra, Cerebras and Hugging Face, plus any OpenAI-compatible endpoint you name.
- Conventional key variables are read for you, and
configuredProviders()tells you which ones are set.
- Images and video from 15 providers through two calls,
createImageandcreateVideo.- Images: OpenAI, Google, OpenRouter, xAI, fal, Replicate, Black Forest Labs, Luma, ByteDance, Prodia, Higgsfield and WaveSpeed.
- Video: Google, xAI, fal, Replicate, BFL, Kling, ByteDance, MiniMax, Alibaba and Prodia.
- Where the AI SDK has no adapter, AI Connections brings its own:
- OpenRouter images, with live previews and reported cost.
- Higgsfield and WaveSpeed jobs, with reference images uploaded for you.
- Local models done properly.
- Ollama through its native API, so context size, keep-alive and "thinking off" actually apply.
- LM Studio and vLLM with strict JSON schemas.
- Model discovery:
listModels('openrouter', { kind: 'image' })returns what the provider offers your key today, with modalities, reference-image support and prices where the provider states them. - One error type. Every failure is a
ProviderErrorwithstatus, the provider's own message, and whether a retry could help. - Keys handled:
detectProviders(key)tells you which service a pasted key belongs to, andai-connections/keysstores keys with environment fallbacks. - Built on the Vercel AI SDK.
languageModel()returns an AI SDK model, so streaming, tools, structured output and the rest of the SDK work as documented. AI Connections adds what the SDK leaves to you, without hiding it. - Testing without paid calls:
ai-connections/testinggives realistic provider replies and a recording fakefetch. - Coding-agent ready: an
ai-connectionsskill for Claude Code and Codex tells an agent to install this instead of writing a provider client.
Two ways to use it
| Direct mode | Full mode | |
|---|---|---|
| For | Servers, scripts, agent harnesses, workers, desktop and single-user tools | Multi-user apps where each user brings their own keys |
| Keys | Yours, from the environment | Each user's, encrypted per owner (AES-256-GCM) |
| You get | languageModel, createImage, createVideo, listModels | A connection service, a framework-neutral HTTP handler, and a React settings screen (ai-connections-react) |
| Setup | npm install ai-connections | npx ai-connections-cli init scaffolds Next.js or React, then connect your auth |
Direct mode has no Node-only dependencies, so it also runs in edge workers.
Safe by default
Built for apps where other people's keys and requests pass through your server.
- Keys: encrypted at rest, never returned by the API, and never forwarded to an endpoint other than the provider's own.
- Endpoints:
- Each provider is held to its own address. Redirects are refused.
- Local addresses open only to local model runners, on their usual ports.
- URLs a provider sends back are fetched only if they are public HTTPS.
- Errors: raw provider errors, which can echo keys or prompts, are redacted before they reach end users.
- Images: SVG output, which can carry script, is refused unless you opt in.
- Releases: published from CI through npm trusted publishing, with no long-lived tokens.
Proven in real apps
- Atelier-1111, a desktop image studio, reaches 12 image providers through AI Connections. When a model offers a transparent background or 4K, Atelier shows those settings.
- A multi-agent game harness runs 27 hosted text providers and local Ollama and LM Studio models through it.
Building those two exposed every gap that 0.3 and 0.4 closed.
Honest status…
Description from the npm listing.
- ai
- llm
- openrouter
- openai
- anthropic
- gemini
- ollama
- ai-sdk
- byok
- image-generation
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (142)Similar npm AI SDKs plugins
All 20 ai-connections alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/ai-connections. First seen Nov 8, 2026; last successful collection Nov 14, 2026. See the methodology.