Sign in Console
Docs/API reference/Check endpoint

Check endpoint

HTTP request and response format for POST /v1/check, POST /v1/usage, GET /v1/config, and GET /v1/analytics/summary.

4 min readLast updated Oct 25, 2026View as Markdown

POST /v1/check - Real-Time Prompt Check

Checks an incoming user message against your character limits, rate limits, and abuse categories before you call your AI model.

Request Headers

HTTP
Authorization: Bearer m6lg_live_YOUR_KEY
Content-Type: application/json

Request Body

JSON
{
  "user": "user_123",
  "input": "User message text (up to 32,000 chars inspected)",
  "input_chars": 142,
  "context_chars": 1200,
  "messages": 4,
  "feature": "chat",
  "anonymous": false
}

Response Body (200 OK)

JSON
{
  "allow": false,
  "verdict": "block",
  "category": "prompt_extraction",
  "reason": "prompt_extraction",
  "message": "I can only help with cooking and recipe questions.",
  "check_id": "chk_mvncd1uq_9x81a",
  "estimated_tokens": 412,
  "processing_us": 14,
  "protection_active": true,
  "quota_exceeded": false
}

POST /v1/usage - Optional Token Reporting

After an allowed AI model call finishes, you can optionally report the actual input_tokens and output_tokens for exact cost tracking in your console.