TorkTORK|API Documentation
Dashboard

TORK API Reference

Complete documentation for the TORK governance API. Build secure, compliant AI agents with built-in safety rails, observability, and policy enforcement.

Quickstart Guide

1. Get Your API Key

Sign up at tork.network/dashboard and create an API key from the dashboard.

2. Make Your First API Call

bash
curl -X POST https://tork.network/api/v1/evaluate \
  -H "Authorization: Bearer tork_sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"content": "Hello world", "checks": ["toxicity", "pii"]}'

3. Common Use Cases

Content Moderation

Filter toxic content and PII from user inputs

View endpoint →

Jailbreak Prevention

Detect and block prompt injection attacks

View endpoint →

RAG Safety

Validate retrieved chunks before use

View endpoint →

Multi-Agent Governance

Orchestrate agents with policy enforcement

View endpoint →

Authentication

All API requests require authentication using an API key. Include your key in the Authorization header:

http
Authorization: Bearer tork_sk_your_api_key

Security Note: Never expose your API key in client-side code. Always make API calls from your backend server.

API Endpoints

Evaluate content for PII, toxicity, and policy violations. This is the primary endpoint for content moderation and safety checks. Supports batch processing and returns detailed analysis with confidence scores.

Request Body

Content to evaluate with optional check configuration

json
{
  "content": "Please process my order. My email is john@example.com",
  "checks": [
    "pii",
    "toxicity",
    "moderation"
  ],
  "options": {
    "redactPii": true,
    "strictMode": false
  }
}

Response Example

json
{
  "success": true,
  "result": {
    "allowed": true,
    "pii": {
      "detected": true,
      "types": [
        "email"
      ],
      "redacted": "Please process my order. My email is [EMAIL_REDACTED]"
    },
    "toxicity": {
      "score": 0.02,
      "flagged": false
    },
    "moderation": {
      "safe": true,
      "categories": []
    }
  },
  "receipt": "TORK-CR-20240115-0001"
}

Code Examples

bash
curl -X POST https://tork.network/api/v1/evaluate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello, my email is john@example.com",
    "checks": ["pii", "toxicity"]
  }'

Documentation

Learn to integrate TORK

Upgrade Plan

Current: free

Support

Get help from our team