REST API Integration
Secure any AI model with our REST API. Simple integration, powerful protection, and real-time validation for all your AI interactions.
Getting Started
Set up your endpoint in three steps
Get Credentials
Visit platform.trylon.ai to get your organization ID, project ID, and API key.
Configure Project
Set up your security policies and validation rules in the platform dashboard.
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
MESSAGE_SECURE
Message is safe to use
HALLUCINATION_DETECTED
Detected potential AI hallucination
PROFANITY_DETECTED
Contains inappropriate content
DATA_LEAKAGE_DETECTED
Contains sensitive data
PROMPT_LEAKAGE_DETECTED
Contains confidential information
COMPETITOR_DETECTED
Competitor information detected
WATCHLIST_PERSON_DETECTED
Detected mention of person from watchlist
WATCHLIST_LOCATION_DETECTED
Detected mention of location from watchlist
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.