Mitigate AI Platform

API Keys

Learn how to manage API keys for secure access to AI Platform API.

API keys (tokens) allow you to authenticate programmatic access to the Chat API. Each token is a secure bearer credential that identifies your application and grants access to the AI assistant. Tokens are scoped to a single setting and can be created, rotated, and deleted independently.

Authentication

All Chat API requests must include your token in the Authorization header using the Bearer scheme:

Authorization: Bearer your-api-token

Quick Setup

Create an API Token

Go to Admin → Settings → Chat API Endpoint and click "Create New Token". Give the token a descriptive name.

Note: Tokens are shown only once at creation time. Copy your token immediately — it cannot be retrieved later.

Add the Authorization Header

Add Authorization: Bearer your-token to your request headers.

Make Your First Request

POST to /api/v1/chats with a JSON payload containing your prompt.

Token Management

Create

Go to Admin → Settings → Chat API Endpoint → "Create New Token". Give the token a descriptive name.

Secure

Store tokens as environment variables, never hard-code them in source code or commit them to version control.

Rotate

Regenerate tokens regularly for security. Use the Reset action on an existing token to issue a new value with the same name.

Delete

Remove unused tokens to reduce exposure. Deleted tokens are immediately invalidated.

Configuration

System Prompt: Customize how the AI assistant responds to Chat API requests by configuring a system prompt in Admin → Settings → Chat API Endpoint.

Knowledge Base: Responses automatically include relevant context from your uploaded documents and available tools based on the workspace associated with the request.

On this page