Quick Start Guide

Get your API key, make your first classification request, and read the response - in under five minutes.

Step 1: Get your API key

Log in to your dashboard and navigate to the API Keys tab. Click Generate new key, give it a name, and copy the key. It starts with cai_live_ and will only be shown once - save it somewhere safe.

Your key is a Bearer token. Every API request must include it in the Authorization header:

Authorization: Bearer cai_live_your_key_here

Step 2: Make your first request

The core endpoint is POST /v1/classify. Send it a piece of text and a list of categories you want to classify into.

curl -X POST https://api.classifaily.com/v1/classify \
  -H "Authorization: Bearer cai_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "I cannot log in - the password reset email never arrives.",
    "categories": ["billing", "technical_bug", "account_access", "feature_request"]
  }'

Step 3: Read the response

The response is JSON with a result object containing the label and confidence score:

{
  "id": "42",
  "status": "completed",
  "type": "text",
  "result": {
    "label": "account_access",
    "confidence": 0.94
  }
}

label is the winning category. confidence is a float between 0 and 1 - higher is more certain. A score above 0.80 is generally safe to act on automatically. Below that, route to a human review queue.

Optional: add an explanation

Add "explain": true to your request to get a short natural-language explanation alongside the label:

{
  "result": {
    "label": "account_access",
    "confidence": 0.94,
    "explanation": "The message describes an inability to log in and a broken password reset flow, both classic account access issues."
  }
}

Explanations are useful for debugging, auditing, or surfacing context to a human reviewer.

Next steps

Need help?

Browse the community Q&A or ask a question directly.

Community Q&A