Documentation v1.0.0

REST API

Universal AI Protection

REST API Integration

Secure any AI model with our REST API. Simple integration, powerful protection, and real-time validation for all your AI interactions.

Any AI Model
Real-time Validation
Enterprise Security

Getting Started

Set up your endpoint in three steps

1

Get Credentials

Visit platform.trylon.ai to get your organization ID, project ID, and API key.

2

Configure Project

Set up your security policies and validation rules in the platform dashboard.

3

Integrate API

Send your AI messages to your dedicated endpoint for validation.

API Reference

Comprehensive endpoint documentation

Endpoint

POST https://api.trylon.ai/{organization_id}/{project_id}/safeguard

organization_id: Your unique organization identifier

project_id: The specific project identifier

Headers

{
  "Content-Type": "application/json",
  "X-TRYLON-API-KEY": "your_api_key_here"
}

Request Body

Send your messages in OpenAI-compatible format:

{
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"},
    {"role": "assistant", "content": "Hi there! How can I help you today?"}
  ]
}

Response Format

{
  "safety_code": 0,  // See safety codes below
  "message": "Message validated successfully."
}

Example Usage

Integration code samples

curl -X POST \
  https://api.trylon.ai/your_org_id/your_project_id/safeguard \
  -H "Content-Type: application/json" \
  -H "X-TRYLON-API-KEY: your_api_key" \
  -d '{
    "messages": [
      {"role": "user", "content": "Hello!"},
      {"role": "assistant", "content": "Hi there!"}
    ]
  }'

Safety Codes

0

MESSAGE_SECURE

Message is safe to use

1

HALLUCINATION_DETECTED

Detected potential AI hallucination

2

PROFANITY_DETECTED

Contains inappropriate content

3

DATA_LEAKAGE_DETECTED

Contains sensitive data

4

PROMPT_LEAKAGE_DETECTED

Contains confidential information

5

COMPETITOR_DETECTED

Competitor information detected

6

WATCHLIST_PERSON_DETECTED

Detected mention of person from watchlist

7

WATCHLIST_LOCATION_DETECTED

Detected mention of location from watchlist

8

PROMPT_INJECTION_DETECTED

Potential prompt injection attempt

Ready to secure your AI?

Get started with our REST API to add enterprise-grade security to any AI model.