Complete endpoint documentation with request/response formats, authentication, and error codes
All API requests are made to this endpoint using HTTP POST. ViriSIM accepts one audit submission at a time - batch processing is not supported.
Every request must include a valid API key in the request header. API keys are generated from your dashboard under Integration → API Keys.
X-API-Key: sk-viri-your-api-key-here
Content-Type: application/json
sk-viri-xxxxxxxxxxxxxxxxxxxx. You will only see the full key once upon creation - store it securely!
Send an AI interaction (input + output) for compliance auditing. ViriSIM processes one request at a time and returns a submission ID immediately. The actual audit runs asynchronously.
{
"user_id": "string", // Required: Your unique user identifier
"company_name": "string", // Required: Your organization name
"use_case": "string", // Required: Primary use case (e.g., "Customer Support")
"timestamp": new Date(), // Required: Current timestamp (do not modify)
"your_company_user_id": "string", // Optional: Your internal user ID
"your_company_user_session_id": "string", // Optional: Session ID for context
"model_version": "string", // Optional: Your AI model version
"input": {
"value": "string", // Required: Raw user input
"format": "text|json", // Required: "text" or "json"
"country": "string" // Required: User's country or "global"
},
"output": {
"value": "string", // Required: Raw AI-generated output
"format": "text|json", // Required: "text" or "json"
"country": "string" // Required: Your country or "global"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | ✓ | Your unique user identifier |
company_name | string | ✓ | Your organization name |
use_case | string | ✓ | Primary use of your AI (e.g., "Customer Support", "Financial Services") |
timestamp | ISO 8601 | ✓ | Current timestamp - do not modify to ensure log accuracy(new Date()) |
your_company_user_id | string | ✗ | Your internal user ID for filtering logs |
your_company_user_session_id | string | ✗ | Session ID for context analysis |
model_version | string | ✗ | Your AI model version for traceability |
input.value | string | ✓ | Raw user input to your AI |
input.format | string | ✓ | "text" or "json" |
input.country | string | ✓ | User's country or "global" |
output.value | string | ✓ | Raw AI-generated output |
output.format | string | ✓ | "text" or "json" |
output.country | string | ✓ | Your country of business or "global" |
{
"submission_id": "VIRI-0001234Xabcde",
"message": "Success, entry undergoing audit.",
"status": "success"
}
Tokens above the limit of 2k.
Audit processing time depends on the size of the text being analyzed:
| Token Count | Typical Processing Time |
|---|---|
| < 500 tokens | ~2-5 seconds |
| 500 - 1,000 tokens | ~5-10 seconds |
| 1,000 - 2,000 tokens | ~10-20 seconds |
| Status | Error Message | Description & Solution |
|---|---|---|
| 401 | API key required in X-API-Key header |
Missing API key header. Add X-API-Key to your request headers. |
| 401 | Unauthorized access! |
Invalid or inactive API key. Generate a new key from the dashboard. |
| 403 | Insufficient Tokens |
Your account has run out of tokens. Purchase more tokens from Pricing → Buy Tokens. |
| 403 | No Subscription |
No active plan. Activate the Free Plan or purchase a Premium plan first. |
| 400 | Tokens above the limit of 2k |
Your input + output exceeds 2,000 tokens. Truncate before sending. |
| 400 | user_id required in request body |
Missing required user_id field in the request body. |
| 400 | Input format claims to be JSON but content is not valid JSON |
input.format is set to "json" but the content is invalid JSON. |
| 500 | Internal Server Error |
Unexpected server error. Contact support if persistent. |
After submitting an audit, results are available in the ViriSIM dashboard:
submission_id or filter by dateHere's a complete example of submitting an audit for a customer support interaction:
curl -X POST https://analyzecompliance-vrbinbrbkq-uc.a.run.app \
-H "X-API-Key: sk-viri-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"user_id": "user_12345",
"company_name": "Example Corp",
"use_case": "Customer Support",
"timestamp": new Date(),
"your_company_user_id": "internal_user_001",
"your_company_user_session_id": "session_abc123",
"model_version": "gpt-4-turbo",
"input": {
"value": "How do I delete my account?",
"format": "text",
"country": "Germany"
},
"output": {
"value": "To delete your account, please click the 'Delete Account' button in settings. Your data will be removed within 30 days.",
"format": "text",
"country": "global"
}
}'
// ViriSIM Audit Submission - JavaScript/Fetch
async function submitAudit(userInput, aiOutput) {
const response = await fetch('https://analyzecompliance-vrbinbrbkq-uc.a.run.app', {
method: 'POST',
headers: {
'X-API-Key': 'sk-viri-your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_id: "user_12345",
company_name: "Example Corp",
use_case: "Customer Support",
timestamp: new Date().toISOString(),
your_company_user_id: "internal_user_001",
your_company_user_session_id: "session_abc123",
model_version: "gpt-4-turbo",
input: {
value: userInput,
format: "text",
country: "Germany"
},
output: {
value: aiOutput,
format: "text",
country: "global"
}
})
});
const result = await response.json();
if (response.ok) {
console.log(` Audit submitted: ${result.submission_id}`);
console.log(` View results at: I/O Logs in dashboard`);
} else {
console.error(` Error: ${result.error}`);
}
return result;
}
// Example call
submitAudit(
"How do I delete my account?",
"To delete your account, please click the 'Delete Account' button..."
);
import requests
from datetime import datetime
def submit_audit(user_input, ai_output):
url = "https://analyzecompliance-vrbinbrbkq-uc.a.run.app"
headers = {
"X-API-Key": "sk-viri-your-api-key-here",
"Content-Type": "application/json"
}
payload = {
"user_id": "user_12345",
"company_name": "Example Corp",
"use_case": "Customer Support",
"timestamp": datetime.now().isoformat(),
"your_company_user_id": "internal_user_001",
"your_company_user_session_id": "session_abc123",
"model_version": "gpt-4-turbo",
"input": {
"value": user_input,
"format": "text",
"country": "Germany"
},
"output": {
"value": ai_output,
"format": "text",
"country": "global"
}
}
response = requests.post(url, json=payload, headers=headers)
result = response.json()
if response.ok:
print(f" Audit submitted: {result['submission_id']}")
else:
print(f" Error: {result.get('error', 'Unknown error')}")
return result
# Example
submit_audit(
"How do I delete my account?",
"To delete your account, please click the 'Delete Account' button..."
)
Go to ViriSIM, get your API key and run your first compliance audit in under 30 minutes.
Go to ViriSIM