Back to Documentation
API Reference

Akioudai Safety API

Comprehensive reference documentation for the Akioudai Safety API, including endpoints, parameters, and examples.

API Base URL

https://api.akioudai.ai
Production environment
https://api.staging.akioudai.ai
Staging environment

Authentication

The Akioudai Safety API uses token-based authentication. All API requests must include an authentication token in the header.

Obtaining API Credentials

To obtain API credentials (API key and secret), you need to register for an Akioudai account and create an API key in the dashboard.

  1. Sign up or log in to your Akioudai account
  2. Navigate to API Settings in the dashboard
  3. Click "Create API Key" and provide a name for your key
  4. Save the API key and secret that are generated (the secret will only be shown once)

Using Authentication

To use the API, you need to:

  1. Generate an authentication token using your API key and secret
  2. Include the token in the Authorization header of all subsequent requests

Example: Obtaining a Token

curl -X POST https://api.akioudai.ai/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "your_api_key",
    "api_secret": "your_api_secret"
  }'
              
# Response
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_at": "2023-12-01T12:00:00Z"
}

Example: Using the Token

curl -X GET https://api.akioudai.ai/v1/compliance/frameworks \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Authentication

POST/v1/auth/token

Generate an authentication token

Parameters

NameTypeRequiredDescription
api_keystringYesYour API key
api_secretstringYesYour API secret

Returns

Authentication token for use in subsequent requests

Rate Limits

100 requests per minute

Example

curl -X POST https://api.akioudai.ai/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "your_api_key",
    "api_secret": "your_api_secret"
  }'
DELETE/v1/auth/token

Revoke an authentication token

Parameters

NameTypeRequiredDescription
tokenstringYesThe token to revoke

Returns

Confirmation of token revocation

Rate Limits

100 requests per minute

Example

curl -X DELETE https://api.akioudai.ai/v1/auth/token \
  -H "Authorization: Bearer your_token"

AI Safety Analysis

POST/v1/analysis/safety/text

Analyze text content for safety concerns

Parameters

NameTypeRequiredDescription
contentstringYesText content to analyze
categoriesarrayNoSafety categories to check (defaults to all)
thresholdnumberNoSensitivity threshold (0-1, default 0.7)

Returns

Safety analysis results with category scores and identified concerns

Rate Limits

500 requests per minute

Example

curl -X POST https://api.akioudai.ai/v1/analysis/safety/text \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "content": "Text content to analyze for safety",
    "categories": ["toxicity", "bias", "harassment"],
    "threshold": 0.7
  }'
POST/v1/analysis/safety/model

Analyze AI model for safety properties

Parameters

NameTypeRequiredDescription
model_urlstringYesURL to the model or model identifier
test_suitestringNoTest suite to use for analysis (default: comprehensive)
categoriesarrayNoSafety categories to check

Returns

Comprehensive model safety analysis with risk scores and recommendations

Rate Limits

50 requests per hour

Example

curl -X POST https://api.akioudai.ai/v1/analysis/safety/model \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "model_url": "https://example.com/my-model.h5",
    "test_suite": "comprehensive",
    "categories": ["bias", "robustness", "toxicity"]
  }'

AI Alignment

POST/v1/alignment/objectives

Define alignment objectives for AI systems

Parameters

NameTypeRequiredDescription
objectivesarrayYesList of alignment objectives
contextstringNoUsage context for the AI system
domainstringNoDomain of application

Returns

Processed alignment objectives with implementation guidance

Rate Limits

100 requests per hour

Example

curl -X POST https://api.akioudai.ai/v1/alignment/objectives \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "objectives": ["truthfulness", "safety", "helpfulness"],
    "context": "Customer support chatbot",
    "domain": "e-commerce"
  }'
POST/v1/alignment/evaluate

Evaluate AI system alignment with defined objectives

Parameters

NameTypeRequiredDescription
model_urlstringYesURL to the model or model identifier
objectivesarrayYesAlignment objectives to evaluate against
test_casesarrayNoCustom test cases for evaluation

Returns

Alignment evaluation results with scores and improvement recommendations

Rate Limits

50 requests per hour

Example

curl -X POST https://api.akioudai.ai/v1/alignment/evaluate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "model_url": "https://example.com/my-model.h5",
    "objectives": ["truthfulness", "safety", "helpfulness"],
    "test_cases": [
      {
        "input": "Tell me about your capabilities",
        "expected_properties": ["honest", "safe"]
      }
    ]
  }'

Runtime Monitoring

POST/v1/monitoring/session

Create a monitoring session for an AI system

Parameters

NameTypeRequiredDescription
system_idstringYesIdentifier for the AI system
monitoring_configobjectNoMonitoring configuration options
alert_channelsarrayNoChannels for alerts (email, webhook, etc.)

Returns

Monitoring session details with session ID and configuration

Rate Limits

100 requests per hour

Example

curl -X POST https://api.akioudai.ai/v1/monitoring/session \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "system_id": "my-ai-system-123",
    "monitoring_config": {
      "metrics": ["drift", "performance", "safety"],
      "interval": "5m"
    },
    "alert_channels": [
      {
        "type": "email",
        "destination": "alerts@example.com"
      }
    ]
  }'
POST/v1/monitoring/event

Log a monitoring event for an AI system

Parameters

NameTypeRequiredDescription
session_idstringYesMonitoring session ID
event_typestringYesType of event (inference, feedback, etc.)
event_dataobjectYesEvent data payload

Returns

Confirmation of event logging with any triggered alerts

Rate Limits

1000 requests per minute

Example

curl -X POST https://api.akioudai.ai/v1/monitoring/event \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "session_id": "mon-session-456",
    "event_type": "inference",
    "event_data": {
      "input": "User query text",
      "output": "Model response text",
      "confidence": 0.92,
      "latency": 120
    }
  }'
GET/v1/monitoring/metrics

Retrieve monitoring metrics for an AI system

Parameters

NameTypeRequiredDescription
session_idstringYesMonitoring session ID
metricsarrayNoSpecific metrics to retrieve
time_rangestringNoTime range for metrics (e.g., "1h", "24h", "7d")

Returns

Requested metrics with timestamps and values

Rate Limits

300 requests per minute

Example

curl -X GET "https://api.akioudai.ai/v1/monitoring/metrics?session_id=mon-session-456&metrics=drift,performance&time_range=24h" \
  -H "Authorization: Bearer your_token"

Compliance

POST/v1/compliance/assessment

Perform a compliance assessment for an AI system

Parameters

NameTypeRequiredDescription
system_idstringYesIdentifier for the AI system
frameworksarrayYesCompliance frameworks to assess against
system_metadataobjectNoAdditional system metadata for assessment

Returns

Compliance assessment results with scores, gaps, and recommendations

Rate Limits

50 requests per hour

Example

curl -X POST https://api.akioudai.ai/v1/compliance/assessment \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "system_id": "my-ai-system-123",
    "frameworks": ["eu_ai_act", "iso_42001", "nist_rmf"],
    "system_metadata": {
      "description": "Customer support assistant",
      "domain": "financial_services",
      "capabilities": ["text_generation", "recommendation"],
      "data_types": ["customer_data", "transaction_history"]
    }
  }'
GET/v1/compliance/frameworks

Retrieve available compliance frameworks

Parameters

NameTypeRequiredDescription
regionstringNoFilter frameworks by geographic region
domainstringNoFilter frameworks by domain

Returns

List of available compliance frameworks with details

Rate Limits

300 requests per minute

Example

curl -X GET "https://api.akioudai.ai/v1/compliance/frameworks?region=eu&domain=healthcare" \
  -H "Authorization: Bearer your_token"
POST/v1/compliance/documentation

Generate compliance documentation for an AI system

Parameters

NameTypeRequiredDescription
assessment_idstringYesCompliance assessment ID
document_typestringYesType of documentation to generate
formatstringNoOutput format (pdf, docx, html)

Returns

Generated compliance documentation in the requested format

Rate Limits

50 requests per hour

Example

curl -X POST https://api.akioudai.ai/v1/compliance/documentation \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_token" \
  -d '{
    "assessment_id": "assess-789",
    "document_type": "dpia",
    "format": "pdf"
  }'

Error Codes

The Akioudai Safety API uses standard HTTP status codes to indicate the success or failure of an API request. In addition, the response body will contain more detailed information about the error.

CodeMessageDescription
400Bad RequestThe request was invalid or cannot be otherwise served.
401UnauthorizedAuthentication credentials were missing or incorrect.
403ForbiddenThe request is understood, but it has been refused or access is not allowed.
404Not FoundThe requested resource could not be found.
405Method Not AllowedThe request method is not supported for the requested resource.
429Too Many RequestsRequest rate limit exceeded. Retry after the specified time.
500Internal Server ErrorThe server encountered an unexpected condition.
503Service UnavailableThe server is currently unable to handle the request due to temporary overloading or maintenance.

Error Response Format

{
  "error": {
    "code": 400,
    "message": "Bad Request",
    "details": "Invalid parameter: threshold must be between 0 and 1",
    "request_id": "req_12345abcde"
  }
}

Rate Limiting

The Akioudai Safety API implements rate limiting to ensure fair usage and system stability. Rate limits vary by endpoint and API plan.

Rate Limit Headers

All API responses include headers that provide information about your current rate limit status:

HeaderDescription
X-RateLimit-LimitMaximum number of requests allowed in the current time window
X-RateLimit-RemainingNumber of requests remaining in the current time window
X-RateLimit-ResetTime in seconds until the rate limit window resets

Rate Limit Tiers

Rate limits vary based on your API plan:

PlanStandard API LimitsIntensive API Limits
Developer100 requests/minute10 requests/hour
Professional500 requests/minute50 requests/hour
Enterprise1,000+ requests/minute100+ requests/hour

Handling Rate Limits

When you exceed your rate limit, the API will return a 429 Too Many Requests response. Implement exponential backoff with jitter for retries to handle rate limiting gracefully.

API Versioning

The Akioudai Safety API uses versioned endpoints to ensure backward compatibility as we evolve the API.

Version Format

API versions are specified in the URL path, following the format /v{version_number}. For example, /v1/auth/token refers to version 1 of the token endpoint.

Versioning Policy

  • We maintain backward compatibility within a major version.
  • Breaking changes are introduced in new major versions.
  • We provide at least 6 months notice before deprecating an API version.
  • Minor enhancements and bug fixes do not increment the API version.

Current Versions

VersionStatusEnd-of-Life Date
v1CurrentN/A
v0 (Beta)Deprecated2023-12-31

SDK Libraries

We provide official SDK libraries in several programming languages to simplify integration with the Akioudai Safety API.

JavaScript/TypeScript

npm install @akioudai/safety-sdk
View SDK Documentation

Python

pip install akioudai-safety
View SDK Documentation

Java

maven: com.akioudai:safety-sdk:1.0.0
View SDK Documentation

SDK Benefits

  • Simplified authentication handling
  • Type-safe request and response objects
  • Automatic rate limit handling with backoff
  • Comprehensive error handling
  • Higher-level abstractions for common operations

Additional Resources

API Postman Collection

Download our Postman collection to quickly test and explore the Akioudai Safety API endpoints.

Download collection

Sample Applications

Explore example applications that demonstrate integration with the Akioudai Safety API.

View examples

Need help with API integration?

Contact our developers