# Behest Developer Docs — LLM Index > Behest is an inference gateway with per-end-user JWT auth, session memory, threads, and BYOK. OpenAI-compatible. Safe to call from a React component. ## Base URLs - Mint endpoint (control plane): POST https://api.behest.app/v1/auth/mint - JWKS (control plane): https://api.behest.app/.well-known/jwks.json - Chat completions (data plane): POST https://{slug}.behest.app/v1/chat/completions - Threads (data plane): https://{slug}.behest.app/v1/threads - JWT `iss` claim value: "https://api.behest.app" ## Core reference - [Overview](/docs/index.md) — Map of all docs - [Core Concepts](/docs/concepts.md) — Tenants, projects, slugs, sessions, threads, tiers - [Authentication](/docs/authentication.md) — API keys, mint, JWT, JWKS, local signing - [API Reference](/docs/api-reference.md) — All endpoints ## Quickstarts (5-min) - [React + Vite](/docs/quickstarts/react-vite.md) - [Next.js App Router](/docs/quickstarts/nextjs-app-router.md) - [Vercel Edge + AI SDK](/docs/quickstarts/vercel-edge.md) - [Supabase Edge Functions](/docs/quickstarts/supabase-edge.md) - [Lovable + Supabase](/docs/quickstarts/lovable-supabase.md) - [Modelence](/docs/quickstarts/modelence.md) - [Python FastAPI](/docs/quickstarts/python-fastapi.md) - [Node + Express](/docs/quickstarts/node-express.md) ## Guides - [Auth modes](/docs/guides/auth-modes.md) — API-key mint vs local signing; when to use each - [Tiers and usage](/docs/guides/tiers-and-usage.md) — Free/Pro/Max, /v1/billing/usage, 402 handling - [Multi-conversation chat](/docs/guides/multi-conversation-chat.md) — Sessions + threads end-to-end - [Streaming UI](/docs/guides/streaming-ui.md) — SSE, AbortSignal, reconnect - [Error handling](/docs/guides/error-handling.md) — 401/402/429/5xx, typed SDK errors - [Migrating from OpenAI](/docs/guides/migrating-from-openai.md) - [Migrating from OpenRouter](/docs/guides/migrating-from-openrouter.md) ## Integrations (auth provider → Behest uid) - [Supabase](/docs/integrations/supabase.md) - [Clerk](/docs/integrations/clerk.md) - [Auth0](/docs/integrations/auth0.md) - [NextAuth](/docs/integrations/nextauth.md) - [Firebase Auth](/docs/integrations/firebase.md) ## SDKs - [TypeScript](/docs/sdk-typescript.md) — `@behest/client-ts` - [Python](/docs/sdk-python.md) — OpenAI Python + Behest headers ## Platform features - [Providers / BYOK](/docs/providers.md) - [Models](/docs/models.md) - [Guardrails](/docs/guardrails.md) - [Rate limiting](/docs/rate-limiting.md) - [Webhooks / events](/docs/webhooks-events.md) ## AI-tool prompts (paste into Lovable/Cursor/Claude/v0) - [Lovable](/docs/prompts/lovable.md) - [Cursor](/docs/prompts/cursor.md) - [Claude](/docs/prompts/claude.md) - [v0](/docs/prompts/v0.md) ## Key endpoints - `POST /v1/auth/mint` — Exchange API key for JWT. Body: `{user_id, ttl?, tier?, session_id?}`. - `POST /v1/chat/completions` — OpenAI-compatible. Headers: `Authorization: Bearer `, optional `X-Session-Id`, `X-Thread-Id`. - `GET /v1/threads` — List threads for current uid. - `GET /v1/threads/{id}/messages` — Fetch messages. - `DELETE /v1/threads/{id}` — Delete thread. - `GET /v1/billing/usage` — Platform + BYOK buckets. ## Auth modes 1. **API-key mint**: server holds `behest_sk_live_...`, calls `POST /v1/auth/mint` per user, returns JWT to client. Default. 2. **Local signing**: server holds tenant-scoped RS256 private key, mints JWT locally with same claims. No network hop per user; use when your backend is hot path. ## Tiers - `free` — small quota, good for demos - `pro` — production defaults, higher RPM + token budget - `max` — highest limits; tune `sort_order` overrides in dashboard. ## Key rules for LLM code generation - Never expose `behest_sk_live_*` to the browser; mint on server. - Always pass `user_id` when minting so rate limits and memory are per-user. - Use `X-Session-Id` or JWT `sid` claim for per-session memory. No header → "default" session. - Use `X-Thread-Id` for persistent conversations with full message history. - 402 = over tier quota; show upgrade UI; do not retry. - 429 = rate limit; respect `Retry-After`.