Skip to main content

Authentication

Use a private CaesuraO API key to authenticate SDK, REST API and MCP requests. REST and MCP endpoints also support the configured OAuth bearer-token flows.

Getting an API Key​

You can generate a new API key in the CaesuraO Developers Portal:

  1. Open the API Keys page in the Developers Portal.
  2. Create a new API key.
  3. Copy the complete key and save it securely. Treat it as an opaque credential: do not change its prefix or assume a fixed format. YOUR_API_KEY below is a placeholder for the key issued by the Portal.
warning

Keep your API keys secure. Do not embed them directly in client-side code (e.g., in a browser or mobile app). Always proxy calls through your own secure backend.

Using API Keys in the SDKs​

The JavaScript and Python SDKs automatically look for the CAESURA_API_KEY environment variable.

export CAESURA_API_KEY="YOUR_API_KEY"

If you prefer, you can pass the API key explicitly when initializing the middleware or client:

import { caesuraMiddleware } from '@caesura-io/ai-sdk';

const middleware = caesuraMiddleware({
apiKey: process.env.CAESURA_API_KEY, // Explicit server-side configuration
});

The SDK defaults to https://api.caesurao.com. Authentication identifies your account; saving analyses also requires a conversation ID.

Using API Keys in the REST API​

When interacting directly with the REST API or the MCP server, provide the API key using the standard HTTP Authorization header with the Bearer scheme:

Authorization: Bearer YOUR_API_KEY

For example, using curl:

curl -X POST https://api.caesurao.com/api/outreach/generate \
-H "Authorization: Bearer ${CAESURA_API_KEY}" \
-H "Content-Type: application/json" \
-d '{ "input": "...", "type": "email" }'