# Zihin AI Platform > Zihin is a centralized LLM API platform with multi-tenant support, intelligent auto-routing, and an agentic execution engine. It provides a unified interface to OpenAI, Anthropic, Google, Grok, and OpenRouter — plus autonomous AI agents with tools, triggers, and memory. > Base URL: https://llm.zihin.ai > Console: https://console.zihin.ai ## Quickstart - [Your First Call](https://docs.zihin.ai/quickstart): Get a Zihin API key and make your first LLM call in under 5 minutes using curl, Node.js, or Python, with auto-routing to the best available model. - [Authentication](https://docs.zihin.ai/quickstart/authentication): Authenticate to the Zihin API with API keys (zhn_live_ or zhn_test_) for public endpoints, or JWT tokens with x-tenant-id for multi-tenant apps. - [Core Concepts](https://docs.zihin.ai/quickstart/concepts): Zihin core concepts: tenants isolate workspaces, providers and models route LLM calls, agents add tools and triggers, and tokens measure usage and cost. ## Agents - [Agents Overview](https://docs.zihin.ai/agents/overview): Zihin agents are AI assistants built from personas, tools, workflows, and policies that run autonomously with automatic tool selection and multi-step reasoning. - [Execution](https://docs.zihin.ai/agents/execution): Run Zihin agents over Server-Sent Events streaming, manage conversation sessions, inspect tool-call logs, and continue context with session_id across turns. - [Agent Invocation Contract](https://docs.zihin.ai/agents/invocation-contract): Input and timing contract for POST /api/v2/agents/:id/stream and the MCP chat_with_agent tool: message, session_id, consumer_key, context, bindings, session_from, metadata, options.timeout_ms, capabilities (quick replies), the metadata event (accepted_fields/ignored_fields) and the TIMEOUT outcome. - [Tools](https://docs.zihin.ai/agents/tools): Zihin agents use API tools over HTTP and MCP tools from external servers, resolved at runtime with Vault credentials. - [Skills](https://docs.zihin.ai/agents/skills): Agent skills are behavioral instructions injected into the system prompt that guide when to act, what to do, and what to avoid, via templates or custom rules. - [Spending Cap](https://docs.zihin.ai/agents/budget): Set a per-agent USD spending ceiling that counts every call — including BYOK — and hard-stops an agent for the month before a turn starts, with a graceful message. - [Action Approvals](https://docs.zihin.ai/agents/approvals): Require human approval before an agent runs sensitive tools. The approver decides inside their own chat, governed by scope rules and approval policies. - [Versioning](https://docs.zihin.ai/agents/versioning): Zihin tracks every agent configuration change automatically with per-resource history, publish snapshots, field-level diffs, and rollback at zero runtime cost. - [Triggers — Webhook](https://docs.zihin.ai/agents/triggers/webhook): Webhook triggers let external systems invoke a Zihin agent via HTTP POST with HMAC or API Key auth, async callbacks, response splitting, and Twilio WhatsApp. - [Triggers — Schedule](https://docs.zihin.ai/agents/triggers/schedule): Schedule triggers run Zihin agents autonomously on a cron schedule for reports and alerts, with silent, webhook, callback, or user channels. Available from the Core plan. - [Triggers — Email](https://docs.zihin.ai/agents/triggers/email): Email triggers route inbound messages to Zihin agents via Resend webhooks with Svix signature validation, sender allowlists, subject filters, and templates. ## LLM API - [LLM API Overview](https://docs.zihin.ai/llm-api/overview): Call OpenAI, Anthropic, Google and Grok models through one LLM API endpoint with auto-routing, structured output, multimodal input, SSE streaming and caching. - [LLM Calls](https://docs.zihin.ai/llm-api/calls): Make LLM calls with JWT or API Key auth, the provider.model format, auto-routing, structured JSON output, stop sequences and multimodal image input. - [Models](https://docs.zihin.ai/llm-api/models): Browse the LLM model catalog across OpenAI, Anthropic, Google and Grok, with provider.model IDs, economical/premium/flagship tiers and plan-based access. - [Streaming](https://docs.zihin.ai/llm-api/streaming): Stream agent execution and live sessions over Server-Sent Events (SSE), with metadata, phase, tool, thinking, response and metrics event types. - [Media Processing](https://docs.zihin.ai/llm-api/media): Standalone endpoints to analyze images with Vision AI, transcribe audio via Whisper and parse PDF, Excel, CSV and DOCX documents in isolation. ## Guides - [Build Your First Agent](https://docs.zihin.ai/guides/first-agent): Build a Zihin AI agent with a persona, an API tool, and a webhook trigger, then test the SSE stream and publish a versioned config. - [Secrets & Provider Keys](https://docs.zihin.ai/guides/secrets): Store credentials in Zihin's AES-256-GCM vault and bring your own LLM keys (BYOK) for OpenAI, Anthropic, Google, and Grok to skip token quota usage. - [Multi-Tenant Setup](https://docs.zihin.ai/guides/multi-tenant): Configure Zihin for SaaS apps with isolated tenants: create tenants, invite team members, assign roles, generate API keys, and use JWT tenant context. ## Integrations - [Integrations Overview](https://docs.zihin.ai/integrations/overview): Connect external platforms to Zihin by invoking agents. The shared @zihin/agent-client core powers n8n, Activepieces, Zapier, Paperclip and custom backends. - [n8n](https://docs.zihin.ai/integrations/n8n): Invoke hosted Zihin agents from n8n with the Zihin Agent node — tools, memory and governance, over the @zihin/agent-client core. - [Activepieces](https://docs.zihin.ai/integrations/activepieces): Invoke hosted Zihin agents from Activepieces with the Zihin piece — the Invoke Agent action over the @zihin/agent-client core. - [Agent Client SDK](https://docs.zihin.ai/integrations/agent-client): @zihin/agent-client is the official Node.js client for invoking Zihin agents: direct and streaming calls, async triggers, sessions and retries. - [MCP Server](https://docs.zihin.ai/integrations/mcp-server): Zihin's MCP server exposes up to 114 tools to manage agents, triggers, budgets, sessions, processes and integrations from claude.ai, Claude Code, Cursor and Codex over stdio or HTTP, with RBAC — authenticated by API Key or by signing in with your Zihin account on https://llm.zihin.ai/mcp. - [MCP Bridge](https://docs.zihin.ai/integrations/mcp-bridge): The Zihin MCP Bridge is a read-only MCP gateway over PostgreSQL that turns your ERP database into tools for AI agents. Delivered as a Docker image. - [Zapier](https://docs.zihin.ai/integrations/zapier): Invoke hosted Zihin agents from Zapier — the Invoke Agent action over the @zihin/agent-client core, with a dynamic agent picker. - [Paperclip](https://docs.zihin.ai/integrations/paperclip): Run hosted Zihin agents from Paperclip with the zihin-paperclip-adapter external adapter, over the @zihin/agent-client core. ## Platform & Admin - [API Keys](https://docs.zihin.ai/platform-admin/api-keys): Zihin API keys carry a server-enforced RBAC role and zhn_live_ prefix, authenticating LLM, agent, and webhook calls with per-plan rate-limit tiers. - [Security Policies](https://docs.zihin.ai/platform-admin/security-policies): Contextual Security Policies are Zihin's runtime policy engine for AI agents: tool blocklists, iteration and token caps, and human approvals in the agent loop. - [Observability — Usage & Metrics](https://docs.zihin.ai/platform-admin/observability/usage): Zihin usage dashboards track LLM requests, token consumption, cost per provider, latency, and success rate across all models and agents in your tenant. - [Observability — Telemetry](https://docs.zihin.ai/platform-admin/observability/telemetry): Zihin telemetry endpoints expose aggregated metrics, paginated logs, session traces, routing decisions, and latency percentiles for agent and LLM monitoring. - [Observability — Health Check](https://docs.zihin.ai/platform-admin/observability/health): Zihin health endpoints report system uptime, memory, cache stats, and live per-provider connectivity for OpenAI, Anthropic, Google, and Grok — no auth needed. - [Team — Users](https://docs.zihin.ai/platform-admin/team/users): The Zihin Team API lists tenant members, updates user roles, and removes users, returning each user's id, email, role, and status for organization management. - [Team — Invites](https://docs.zihin.ai/platform-admin/team/invites): Invite team members to a Zihin tenant via API or console, assigning an RBAC role on join; admins send, list, and cancel pending email invitations. - [Team — Roles & Permissions](https://docs.zihin.ai/platform-admin/team/roles): Zihin tenant RBAC defines four roles — owner, admin, editor, and viewer — each mapping to a permission matrix covering agents, connections, billing, and users. - [Tunnel — Zihin Tunnel](https://docs.zihin.ai/platform-admin/tunnel/overview): Zihin Tunnel connects on-premise databases, ERPs, and APIs to the cloud through an outbound-only WebSocket, keeping credentials local with no inbound firewall ports. - [Tunnel — Getting Started](https://docs.zihin.ai/platform-admin/tunnel/getting-started): Install and configure the Zihin Tunnel Agent (1.3) via Docker: create the tunnel in the Console, write zihin-agent.yml, start the container and verify the connection. - [Tunnel — Troubleshooting](https://docs.zihin.ai/platform-admin/tunnel/troubleshooting): Diagnose Zihin Tunnel Agent errors — 404, 401, 406, 502, 504, connection codes 4001/4002/4003 and MCP connection tests that fail through the tunnel (compressed responses that do not decode) — with diagnostic commands and debug logging. - [Tunnel — Console Management](https://docs.zihin.ai/platform-admin/tunnel/console-management): Manage the Zihin Tunnel from the console: create it, monitor status, rotate the token with a 24-hour grace period, and revoke it — admin and owner roles only. ## Reference - [API Overview & Conventions](https://docs.zihin.ai/reference/api-overview): Reference for Zihin API conventions: base URLs, API Key and JWT authentication, JSON request and response format, pagination and common LLM schemas. - [Error Codes](https://docs.zihin.ai/reference/errors): Standard Zihin API error codes and HTTP statuses for authentication, rate limiting, request validation and provider failures, plus how to handle 429 retries. - [Rate Limits](https://docs.zihin.ai/reference/rate-limits): Zihin API rate limits by plan with per-minute, per-day and max-tokens quotas, the X-RateLimit response headers and a retry pattern for 429 responses. - [Changelog](https://docs.zihin.ai/reference/changelog): Track notable changes to the Zihin API, including new features, integrations and infrastructure updates such as the public documentation portal and n8n nodes. - [SDKs](https://docs.zihin.ai/reference/sdks): Official Zihin client libraries: @zihin/agent-client for agent invocation, the @zihin/mcp-server stdio proxy, the REST API and the no-code connectors. - [FAQ — Frequently Asked Questions](https://docs.zihin.ai/faq): Answers to common questions about Zihin: AI agents, the multi-provider LLM API, authentication, BYOK, MCP, webhooks, streaming, multi-tenancy, and rate limits. ## Optional - [Full Documentation](https://docs.zihin.ai/llms-full.txt): Complete content of all docs concatenated for AI agent ingestion - [Agent Setup Skill](https://docs.zihin.ai/skill.md): Step-by-step instructions for an AI agent to configure Zihin from scratch