빠른 시작
몇 분 안에 API를 시작하세요
우리의 SDK를 설치하고 첫 번째 API 호출을 하세요
- 자신의 언어에 맞는 SDK 설치
- 대시보드에서 API 토큰 받기
- 첫 번째 익명화 요청하기
- 애플리케이션에 통합하기
// Analyze text for PII
const response = await fetch('https://anonym.legal/api/presidio/analyze', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Contact John Smith at john.smith@company.com',
language: 'en'
})
});
const results = await response.json();
// Returns detected entities with positions and confidence scores사용 가능한 엔드포인트
/api/presidio/analyzeAnalyze text to detect PII entities. Returns entity types, positions, and confidence scores.
View documentation →/api/presidio/anonymizeAnonymize detected PII using your chosen method. Returns anonymized text.
View documentation →/api/presidio/batchProcess multiple documents in a single request. Enterprise plans support up to 100 documents.
View documentation →/api/healthCheck API status and service health. No authentication required.
Public endpointAPI 기능
JWT 인증
모든 API 호출을 위한 안전한 토큰 기반 인증
요금 제한
명확한 헤더와 함께 공정한 요금 제한. 기업을 위한 높은 제한
코드 예제
여러 프로그래밍 언어로 준비된 사용 가능한 예제
Endpoint Reference
Complete REST API documentation. All endpoints require Bearer token authentication unless noted.
Authentication
All API requests require a Bearer token in the Authorization header. Get your API token from Settings → API Access in the web app.
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/jsonEndpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/presidio/analyze | Detect PII entities in text |
| POST | /api/presidio/anonymize | Anonymize detected PII entities |
| POST | /api/presidio/batch | Process multiple files in one request |
| GET | /api/presidio/entities | List supported entity types |
| GET | /api/health | Service health (no auth required) |
| GET | /api/presets | List saved presets |
| POST | /api/presets | Create a new preset |
| PUT | /api/presets/{id} | Update a preset |
| DELETE | /api/presets/{id} | Delete a preset |
| GET | /api/encryption-keys | List encryption key metadata |
| GET | /api/encryption-keys/{id} | Get key details (add ?includeKey=true for value) |
Request & Response Schemas
POST /api/presidio/analyze — Request
{
"text": "John Smith lives at 123 Main St. SSN: 123-45-6789",
"language": "en",
"entities": ["PERSON", "LOCATION", "US_SSN"],
"score_threshold": 0.5,
"ad_hoc_recognizers": [
{
"entity_type": "EMPLOYEE_ID",
"patterns": [{ "regex": "EMP-[0-9]{6}", "score": 0.9 }]
}
]
}POST /api/presidio/analyze — Response
{
"entities": [
{ "entity_type": "PERSON", "text": "John Smith", "start": 0, "end": 10, "score": 0.95 },
{ "entity_type": "LOCATION", "text": "123 Main St", "start": 20, "end": 31, "score": 0.87 },
{ "entity_type": "US_SSN", "text": "123-45-6789", "start": 38, "end": 49, "score": 0.99 }
],
"tokens_charged": 3,
"language": "en"
}POST /api/presidio/anonymize — Request with Operators
{
"text": "John Smith, SSN 123-45-6789, email john@example.com",
"language": "en",
"operators": {
"PERSON": { "type": "replace", "new_value": "<NAME>" },
"US_SSN": { "type": "mask", "chars_to_mask": 5, "from_end": false },
"EMAIL_ADDRESS": { "type": "hash", "hash_type": "SHA256" }
}
}POST /api/presidio/anonymize — Response
{
"anonymized_text": "<NAME>, SSN ***-**-6789, email a3f2b8c1d4e5f6...",
"entities_found": 3,
"tokens_charged": 5,
"replacements": [
{ "entity_type": "PERSON", "original": "John Smith", "replacement": "<NAME>" },
{ "entity_type": "US_SSN", "original": "123-45-6789", "replacement": "***-**-6789" },
{ "entity_type": "EMAIL_ADDRESS", "original": "john@example.com", "replacement": "a3f2b8c1..." }
]
}Operator Reference
Configure per-entity anonymization using the operators field. Each entity type can use a different operator.
| Operator | Description | Parameters | Example Output |
|---|---|---|---|
| replace | Replace with custom value or token | new_value (string, max 100 chars) | <PERSON_1> |
| redact | Permanently remove | None | [REDACTED] |
| hash | One-way hash | hash_type: SHA256 | SHA512 | a3f2b8c1... |
| encrypt | AES-256-GCM reversible encryption | key (16-32 chars) | ENC:base64... |
| mask | Partial character masking | chars_to_mask, masking_char, from_end | John **** |
| keep | Keep original (skip anonymization) | None | John Smith |
Rate Limits & Token Costs
| Plan | Monthly Tokens | API Access |
|---|---|---|
| Free | 200 | REST API |
| Basic | 5,000 | REST API |
| Pro | 25,000 | REST API + MCP Server |
| Business | 100,000 | REST API + MCP Server + Priority |
Error Codes
| Code | Description | Response Format |
|---|---|---|
| 400 | Invalid request (missing text, bad parameters) | { "error": "Text is required" } |
| 401 | Missing or invalid API token | { "error": "Unauthorized" } |
| 403 | Feature not available on current plan | { "error": "Upgrade required" } |
| 429 | Token balance exhausted or rate limited | { "error": "Insufficient tokens", "details": {...} } |
| 500 | Internal server error | { "error": "Internal server error" } |