API Reference
Complete reference for the GuardCrow REST API.
Base URL
https://api.guardcrow.com/v1Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/analyze | Analyze text content |
| GET | /v1/health | Check API health status |
POST
/v1/analyze
Analyze text content for toxicity, sentiment, and safety. This is the main endpoint for content moderation.
Request Headers
| Header | Required | Description |
|---|---|---|
| X-API-Key | Your API key | |
| Content-Type | Must be application/json |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | Text to analyze (max 10,000 chars) | |
| metadata | object | Optional metadata (source, user_id, etc.) |
Example Request
request.jsonjson
{"content": "This product is amazing! Best purchase ever.","metadata": {"source": "product-reviews","user_id": "user_123"}}
Response
| Field | Type | Description |
|---|---|---|
| passed | boolean | Whether content passed moderation |
| score | integer | Toxicity score (0-10) |
| sentiment | string | positive, negative, neutral, or toxic |
| description | string | Human-readable explanation |
| categories | string[] | Detected categories (insult, threat, spam) |
| processingTimeMs | integer | Processing time in milliseconds |
Example Response
response.jsonjson
{"passed": true,"score": 1,"sentiment": "positive","description": "Content is safe. Positive product review with no harmful elements.","categories": [],"processingTimeMs": 127}
Score Interpretation
0-3
Safe
4-6
Moderate
7-10
Toxic
GET
/v1/health
Check the health status of the API. This endpoint does not require authentication.
Example Response
response.jsonjson
{"status": "healthy","timestamp": "2025-01-18T15:30:00.000Z"}