Skip to main content

API Key Authentication

All requests to Prompt Inspector require an App API Key.

Obtaining Your API Key

1

Sign In

Visit promptinspector.io and sign in with your Google or GitHub account.
2

Create an App

Go to the Dashboard and create a new App. You can create multiple Apps to separate environments (e.g., production, staging) or projects.
3

Copy the Key

Your App API Key is displayed in the App Settings page. Copy it and store it securely.

Passing the API Key

Pass your API key via the X-App-Key header:

Authorization Bearer Token

Alternatively, use the standard Authorization header with a Bearer token:

SDK Configuration

Both SDKs accept the API key directly or via environment variable:

MCP Server

When connecting to the MCP server, provide your API key via the X-App-Key header or Authorization: Bearer <key> header in your MCP client configuration. See the MCP Integration guide for client-specific instructions.

Environment Variable

The recommended environment variable name is:
Both the Python and Node.js SDKs automatically read this variable when no explicit key is provided.

Security Best Practices

Never expose your API key in client-side code, public repositories, or browser-accessible JavaScript. The API key should only be used in server-side environments.
  • Use environment variables — Store your API key in environment variables or a secrets manager, not in source code.
  • Rotate keys regularly — You can regenerate your App API Key from the dashboard at any time. The old key will be immediately invalidated.
  • Separate environments — Create separate Apps for development, staging, and production to isolate usage and avoid accidental quota consumption.
  • Restrict access — Limit access to API keys within your organization to only those who need them.

Rate Limits & Quotas

Each App API Key is subject to:
  • Rate limits — Maximum requests per minute, determined by your subscription plan
  • Monthly quotas — Maximum total requests per billing cycle
  • Text length limits — Maximum input text length per request
When limits are exceeded, the API returns HTTP 429 Too Many Requests. See Error Handling for details on handling rate limit errors.

Manage Your Apps

Visit the Dashboard to create Apps, view usage, and manage API keys.