Authentication
Caesura relies on API keys to authenticate your requests. You must include your API key whether you are using the SDKs, calling the REST API directly, or connecting to the MCP server.
Getting an API Key
You can generate a new API key in the Caesura Developers Portal:
- Navigate to the API Keys page:
https://developers.caesura.io/keys - Create a new API key.
- Save the key securely. Caesura API keys always begin with the
caesura_prefix.
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 Caesura Node SDKs will automatically look for the CAESURA_API_KEY environment variable.
export CAESURA_API_KEY="caesura_xxxxxx"
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({
baseUrl: 'https://dev.caesura.io',
apiKey: 'caesura_xxxxxx', // Explicitly passed
});
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 caesura_xxxxxx
For example, using curl:
curl -X POST https://dev.caesura.io/api/outreach/generate \
-H "Authorization: Bearer caesura_xxxxxx" \
-H "Content-Type: application/json" \
-d '{ "input": "...", "type": "email" }'