Skip to content

Authentication

The CompactifAI API uses API keys for authentication. This guide will walk you through the process of obtaining and using your API key.

There are two ways to get started with the CompactifAI API:

Sign up directly through the CompactifAI Dashboard — no AWS account required.

Go to console.compactif.ai and sign up with your email address.

Go to the Manage API Keys tab in the Dashboard.

Furthermore, from the Dashboard, you can:

  • Monitor your API usage and token consumption.
  • Manage your account settings.
  • Each subscription must be connected to a single email address.
  • The Dashboard issues one API token per account; rotate it from the dashboard when needed instead of creating additional tokens.
  • To grant access to additional teammates, invite them to sign up with their own account or contact support to discuss alternatives.

You must include your API key in the Authorization header of each API request using the Bearer token scheme:

Terminal window
Authorization: Bearer YOUR_API_KEY

The Anthropic Messages endpoints (POST /v1/messages and POST /v1/messages/count_tokens) additionally accept the same API key in the x-api-key header, for clients built with the Anthropic SDK convention.

cURL
curl https://api.compactif.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "carina-60b",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'