API Key Types & Access Levels

Understanding Kodey API key types and their access permissions

There are two types of team API keys.

Key Types

Key TypePrefixDescriptionWhere to Use
Publishable Keypk_live_Restricted access - chat endpoints onlyFrontend/Client-side
Secret Keysk_live_Full API access for a single teamBackend/Server-side

Access Matrix

Endpoint Categorypk_live_ (Publishable)sk_live_ (Secret)
Chat OperationsYesYes
Agent OperationsNoYes
Workflow OperationsNoYes
MCP OperationsNoYes
File OperationsNoYes
Webhook OperationsNoYes

Key Format Examples

Publishable: pk_live_7Xk9mNpQ2rStUvWxYz3aBcDeFgHjKm
Secret:      sk_live_7Xk9mNpQ2rStUvWxYz3aBcDeFgHjKm

Security Best Practices

Publishable Keys (pk_live_*)

  • Safe to expose in frontend code
  • Use for client-side chat integrations
  • Limited to chat-related endpoints only

Secret Keys (sk_live_*)

  • Never expose in frontend code
  • Store securely in environment variables
  • Use only in server-side applications
  • Provides full API access