Skip to main content

Core Concepts

Key concepts to understand before using the Zihin API.

Tenants

A tenant is an isolated workspace. Each tenant has its own:

  • Users and roles
  • API keys
  • Agents and configurations
  • Usage quotas and billing
  • Telemetry data

All API calls are scoped to a tenant via the API key or JWT x-tenant-id header.

Providers and Models

Zihin connects to multiple LLM providers (OpenAI, Anthropic, Google, Grok) through a unified API. You can:

  • Specify a model — call a specific model by name (e.g., openai.gpt-4.1, anthropic.claude-sonnet-4-6)
  • Use your own keys (BYOK) — bring your own provider API keys to unlock all models and avoid quota consumption

See Models and Secrets & Provider Keys for details.

Agents

An agent is a configured AI assistant with:

  • A system prompt defining its behavior
  • An LLM model with optional fallback chain
  • Optional tools (database queries, HTTP calls, MCP servers)
  • Optional triggers (webhooks that start conversations)

Agents are created via the console or MCP Server.

API Keys

API keys follow the format YOUR_API_KEY (production) or YOUR_TEST_KEY (sandbox). Each key is tied to a tenant.

Generate keys at console.zihin.ai > Settings > API Keys.

Tokens and Costs

LLM usage is measured in tokens. Each model has different pricing per million input/output tokens. Auto-routing optimizes cost by selecting the most efficient model for each task.

Track usage and costs in the console dashboard or via the telemetry API.