AI Connections

FOR APP BUILDERSFree and open source

Add BYOK and MCP support to your app.

A library for text, image, video and local AI models. Install it yourself or with a coding agent.

Paste into your agent

My app, my keys
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.
BYOK for your users
Integrate BYOK support into this app with AI Connections (npm: ai-connections), so each user brings their own AI provider key. Read https://seeker-studio.games/ai-connections/llms.txt first, use full mode, and hook it into this app's sign-in.
Run once in your project
npx ai-connections-cli skill

Teaches Claude Code and Codex to use it in every session.

Your agent reads llms.txt and does the rest.

What's this for?

AI Connections connects your app to AI providers and makes its features available to agents.

BYOK

Bring your own key

You or your users connect an AI provider with an API key and pay that provider directly.

Shared adapters handle authentication, model names, request formats and errors, so you can add or switch providers through a common interface.

MCP

Model Context Protocol

MCP gives agents a standard way to call your app's actions, such as submitting an image job or reading its output.

Your agent tools reuse the services and permissions behind your app's interface.

Cloud providers and local models

  • OpenAI
  • Anthropic
  • Google
  • DeepSeek
  • Mistral
  • xAI
  • OpenRouter
  • Z.ai
  • Qwen
  • Moonshot
  • MiniMax
  • Groq
  • Together
  • Cerebras
  • fal
  • Replicate
  • WaveSpeed
  • Ollama
  • LM Studio
  • vLLM

Works with Claude Code, Codex, Cursor and more

Patch panel

Switch providers by changing one word.

your agent
  1. ›Add AI provider support to this project with AI Connections…
  2. ●Reading llms.txt
  3. ●Picked direct mode
  4. ●npm install ai-connections
  5. ●Updated src/ai.ts
  6. ●Added OPENROUTER_API_KEY to .env.example
  7. ✓Done. Add your key to .env.

Try a provider

Model names are examples. Provider documentation

src/ai.ts
import {
  generateText, languageModel, createImage,
} from 'ai-connections/direct';

const { text } = await generateText({
  model: languageModel('openrouter:deepseek/deepseek-chat'),
  prompt: 'Summarize this document…',
});

// Images and video, the same way.
await createImage('fal:fal-ai/flux/dev', { prompt });

Reads OPENROUTER_API_KEY from the environment.

01 / Features

AI provider support.

Built on the Vercel AI SDK. Requests go straight from your app to the provider.

  • text

    Text providers

    OpenAI, Anthropic, Google, DeepSeek, OpenRouter and more.

  • media

    Image and video providers

    fal, Replicate, OpenRouter, Higgsfield, WaveSpeed and more.

  • local

    Local runners

    Ollama, LM Studio and vLLM.

  • keys

    Environment keys

    Load your keys from .env.

  • errors

    Consistent errors

    Handle provider failures through ProviderError.

  • tests

    Provider fixtures

    Test with fake replies before making paid calls.

MCP access for your product.

Let desktop agents call your app's existing actions.

Agent access

Claude, Codex, Cursor and Hermes

Generate local stdio and HTTP servers with client configuration examples.

MCP is available as a preview download, ahead of the npm release.

Product integration

Your app controls access

Use your existing services, sign-in and permissions. Keys, jobs and files stay in your product.

02 / Security

Safe with your keys and your users' keys.

Use your own keys, or let each user bring theirs. Your agent picks the mode.

direct mode

Your keys most projects

Scripts, servers, bots and tools. Keys come from .env.

npm install ai-connections
full mode

Your users' keys apps with users

Each user adds their own keys in a settings screen. Keys are stored encrypted on your server.

npx ai-connections-cli init
security
  • Keys are encrypted and never sent back.
  • Each key goes only to its own provider.
  • Errors are cleaned before users see them.
  • Only public HTTPS links are fetched.
  • SVG is blocked unless you allow it.
  • Released from public CI, with no stored tokens.
Tip on Ko-fi