Skip to main content
ProBot exposes three first-party HTTP endpoints under /api/*, plus the NextAuth handler. All are co-located in the Next.js app and deploy as serverless functions on Vercel.

Base URL

  • Hosted: https://probot.vercel.app
  • Self-hosted bot: your own web app’s domain, where the probot-self-hosted npm package runs
All requests below are relative to that base.

Endpoints at a glance

Authentication models

ProBot has two distinct auth surfaces: For dashboard operations (/api/bots). Issued by NextAuth’s Credentials provider, JWT strategy. Cookies are httpOnly, secure in production. A missing or invalid session returns:
with HTTP 401.

2. BYO LLM key (header-based)

For chat (/api/chat/[botId]). The user’s LLM provider key rides in the x-llm-api-key header. Azure additionally requires x-llm-azure-endpoint and accepts optional x-llm-azure-api-version. The key is never in the JSON body, never persisted server-side, never echoed in error responses. See BYO-key flow.

Response envelopes

Success

Success responses are either:
…for resource endpoints, or:
…for chat.

Error

Errors always use one of two shapes: Single error code (used by chat + NextAuth):
Validation error (used by register + bots):
The details shape comes from Zod’s .flatten().

Status code reference

Rate limit response

When the per-bot limiter trips:
resetAt is epoch ms. scope is "short" or "long".

What’s documented vs. not

The pages under Endpoints document the public, currently-shipped routes only: NextAuth’s /api/auth/[...nextauth] is not documented here - its surface is owned by NextAuth and changes per their docs. See the NextAuth REST API docs.