Docs / Page

Authentication

All data endpoints require an API key. Health and OpenAPI specification endpoints are public.

API Key Format

Every API key uses the sk_live_ prefix followed by 32 hexadecimal characters. Include the key in the X-API-Key HTTP header on every request to /v1/* endpoints.

sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

REST

curl -H "X-API-Key: sk_live_YOUR_KEY" \
  "https://api.agentii.ai/v1/search_companies?ticker=LLY"

MCP (API Key Passthrough)

The MCP server forwards your API key to the REST API. Configure once in your agent's .mcp.json:

{
  "mcpServers": {
    "agentii": {
      "url": "https://mcp.agentii.ai/mcp",
      "env": { "AGENTII_API_KEY": "sk_live_YOUR_KEY" }
    }
  }
}

Generating a Key

  1. 1. Sign in at agentii.ai/signin using email or GitHub OAuth.
  2. 2. Navigate to /api-keys and click Generate New Key.
  3. 3. Copy the key immediately — the plaintext is displayed only once. The system stores only the SHA-256 hash.

Access Tiers

Each API key has an access tier that determines which endpoints are available. Tiers are orthogonal to plan tiers — any plan can request any access tier.

TierEndpointsDefault
developerAll P0 endpoints — SEC filings, XBRL, earnings, companies, coverageYes
agent_readAll P0 + Knowledge Store read endpoints (search_entities, get_entity_knowledge)
agent_adminReserved for future Knowledge Store write operations
internalInfrastructure endpoints (refresh-coverage) — not user-requestable

Key Revocation

Revoking a key takes effect immediately. The Redis cache is invalidated at revocation time, and subsequent requests with the revoked key receive 401 INVALID_API_KEY. Keys cached in agents must be updated manually.

Unauthenticated Requests

Requests without an X-API-Key header to /v1/* endpoints receive 401 API_KEY_REQUIRED. The following endpoints are publicly accessible without authentication:

  • GET / — API root
  • GET /health — Shallow health check (deploy gates)
  • GET /v1/health — Deep health check (component status)
  • GET /v1/openapi.json — OpenAPI 3.1 specification
  • GET /mcp/health — MCP server health
  • GET /mcp/tools/list — MCP tool discovery

See also: Error Codes · Getting Started · Rate Limits