NIN Connect Docs

NIN Connect

Use any API as an AI-ready tool. NIN Connect gives your agents access to Gmail, Stripe, Slack, and more — with managed auth, encrypted credentials, and a single SDK call.

What is NIN Connect?

NIN Connect (connect.nin.in) is an integration platform that lets your AI agents call real-world APIs — Gmail, Stripe, Slack, and dozens more — without you building auth flows, managing tokens, or writing API wrappers.

You get a plugin catalog, your users connect their accounts, and your agent executes tools with one SDK call. Auth is handled automatically.

How It Works

1. Install the SDK             npm install @nin.in/core
2. Get an API key              Sign up at connect.nin.in → API Keys
3. User connects an account    OAuth redirect or direct credentials
4. Agent executes a tool       session.execute("GMAIL_SEND_EMAIL", params)

                               NIN injects auth → calls Gmail → returns result

Quick Example

import { Nin } from "@nin.in/core";

const nin = new Nin({ apiKey: "nk_live_..." });
const session = nin.session("user_123");

// execute a tool — NIN handles auth automatically
const result = await session.execute("GMAIL_SEND_EMAIL", {
  to: "hello@example.com",
  subject: "Hello from my AI agent",
  body: "This email was sent via NIN Connect.",
});

console.log(result.data); // { messageId: "abc123" }

Key Concepts

ConceptWhat it means
PluginA service integration (Gmail, Stripe, Slack, etc.) available on the platform
ToolA single API action within a plugin (e.g. GMAIL_SEND_EMAIL, STRIPE_CREATE_CHARGE)
ConnectionYour end-user's authenticated link to a plugin (OAuth tokens, API keys — encrypted at rest)
SessionA user-scoped SDK context — all tool calls happen through a session
API KeyYour developer credential (nk_live_...) for authenticating with NIN
MCPModel Context Protocol — an open standard for AI tool discovery. Plugins can auto-discover tools from MCP servers instead of manual definitions.
Tool SourcePer-plugin setting: manual (hand-defined tools), mcp (auto-discovered from MCP server), or both

What You Can Do

  • Browse plugins — discover available integrations and their tools
  • Connect users — OAuth flows or direct credential submission, fully managed
  • Execute tools — one SDK call, auth injected automatically, results returned
  • Monitor usage — execution logs with status, latency, and errors
  • MCP integration — auto-discover tools from MCP servers with realtime updates

Next Steps

On this page