Account API
What the key can reach, where each Redact layer processes text, the NER places and models a call may choose, and the limits.
- Base URL
https://api.komplai.dk
Read what this key can reach
GET /v1/access
Lists the services this key reaches in its organisation, with their scopes, hosting, processing and limits. Call it first: for Redact, hosting.processing.layers names where each layer processes text, text_contract the options and limits that apply, and text_contract.jobs_accepting_submissions whether text jobs are accepted. Works for personal keys and for organisation integration keys, which reach Redact only; an organisation integration key's response also names the integration in principal. It sends no text, runs no model and counts as one request. services[].edition is deprecated and is always "custom"; read scopes and processing instead.
- Scopes
access:read
Try it
Calls are real: komplai processes what you send, each call counts towards your key's limits, and processing in EU cloud counts towards your organisation's monthly AI spending cap. Use test data.
A key that starts with kp_org_ or kp_live_. It stays on this page until you leave it and is sent only to api.komplai.dk.
Response
Request-Id
Responses
200 OK
What this key can reach, where each Redact layer processes text, and the limits.
Headers
Body
Child fields (62)
Where the service runs. For Redact, processing.layers names where each layer processes text.
Child fields (41)
Child fields (33)
Redact: one entry per layer and processing choice. The eu-cloud entry appears only when your organisation has an EU route.
Child fields (30)
ner: every place NER can run, with whether a run can use it now. Send one as nerDeployment.
Child fields (8)
null when available. unconfigured: komplai has not switched the place on for the API. unavailable: it is set up but did not answer its health check. not_allowed: your organisation does not allow local processing through the API, and NER on local infrastructure is local processing (403 processing_choice_not_allowed).
- One of
unconfiguredunavailablenot_allowed
The same for POST /v1/redact/detect and the text operations without detectors, which run NER through another komplai service that reaches each place with its own settings. A place can be available for one and not the other.
Child fields (2)
ner: the NER models you may choose (nerModel). llm: the language models at this processing (model), including models that are not validated for Redact, which cannot be chosen. The eu-cloud entry lists models only while your organisation's EU route is enabled.
One of
object
null when available. not_validated: not validated for Redact, so it cannot be chosen. not_offered: validated, but not offered right now. unreachable: the list of local models could not be read. unconfigured: the place is not set up.
- One of
not_validatednot_offeredunreachableunconfigured
What the organisation's agreement allows for this service.
Child fields (14)
Redact with redact:process: the request options and limits that apply to this key.
Child fields (9)
Only when the key reaches one service: a summary of its hosting.
Child fields (21)
Redact: where NER runs when a request names no place, and every place with whether a run can use it now. The same places as the ner layer in services[].hosting.processing.layers. Missing when the server has no default place set up.
Child fields (13)
Child fields (8)
null when available. unconfigured: komplai has not switched the place on for the API. unavailable: it is set up but did not answer its health check. not_allowed: your organisation does not allow local processing through the API, and NER on local infrastructure is local processing (403 processing_choice_not_allowed).
- One of
unconfiguredunavailablenot_allowed
The same for POST /v1/redact/detect and the text operations without detectors, which run NER through another komplai service that reaches each place with its own settings. A place can be available for one and not the other.
Child fields (2)
Child fields (3)
401 Unauthorized
The key is missing or not valid.
Error codes
api_key_requiredNo Authorization: Bearer header with a komplai key.invalid_api_keyThe key is unknown, expired, revoked or retired, the person behind a personal key is no longer a member or no longer assigned any app the key covers, or your organisation's API access for it is not set up or no longer active.invalid_tokenThe key was revoked or expired, or its access ended, while the request was admitted or processed.
Headers
403 Forbidden
The key may not do this, or the organisation's access does not cover it.
Error codes
insufficient_scopeThe key lacks a scope the operation needs (x-komplai-scopes): it was not issued or created with it, its person is no longer assigned the app, or the organisation's processing approval no longer covers it.identity_retiredThe person behind a personal key has been removed from komplai.
Headers
429 Too Many Requests
Refused for now. Wait the seconds in Retry-After before you try again.
Error codes
rate_limitedToo many requests: the per-minute limit of the person behind a personal key (shared with that person's other keys and use of the hub) or of the integration behind an organisation integration key (shared by its keys), the organisation's (120), the API's (300) or the per-IP network limit. Wait Retry-After seconds.
Headers
503 Service Unavailable
Processing is not available right now.
Error codes
access_service_unavailableKeys and access could not be checked.chat_cloud_unavailableThe organisation's EU cloud setup cannot be used right now.redact_capabilities_unavailableRedact's processing details could not be read.
Headers
/v1/accesscurl https://api.komplai.dk/v1/access \
-H "Authorization: Bearer $KOMPLAI_TOKEN"$headers = @{
Authorization = "Bearer $env:KOMPLAI_TOKEN"
}
$request = @{
Method = 'Get'
Uri = 'https://api.komplai.dk/v1/access'
Headers = $headers
}
$response = Invoke-RestMethod @request
$response | ConvertTo-Json -Depth 100import os
import requests
response = requests.get(
"https://api.komplai.dk/v1/access",
headers={
"Authorization": f"Bearer {os.environ['KOMPLAI_TOKEN']}",
},
timeout=330,
)
print(response.status_code, response.headers.get("Request-Id"))
print(response.json())const response = await fetch("https://api.komplai.dk/v1/access", {
headers: {
Authorization: `Bearer ${process.env.KOMPLAI_TOKEN}`,
},
});
console.log(response.status, response.headers.get("Request-Id"));
console.log(await response.json());using System;
using System.Net.Http;
using System.Net.Http.Headers;
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(330) };
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.komplai.dk/v1/access");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("KOMPLAI_TOKEN"));
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
if (response.Headers.TryGetValues("Request-Id", out var requestId))
{
Console.WriteLine(string.Join(", ", requestId));
}
Console.WriteLine(await response.Content.ReadAsStringAsync());Set the environment variable KOMPLAI_TOKEN to your key first.
{
"organisation_id": "5b0d6c2e-8f3a-4d1b-9c7e-2a4f6b8d0e13",
"principal": {
"type": "integration",
"integration_id": "7a9c1e3f-5b7d-4f9a-8c2e-4d6f8a0b2c4e",
"name": "Sagsbehandlingsrobot"
},
"scopes": ["access:read", "redact:detect", "redact:process"],
"services": [
{
"service": "redact",
"edition": "custom",
"scopes": ["access:read", "redact:detect", "redact:process"],
"hosting": {
"id": "komplai-local",
"environment": "prod",
"shared": true,
"api": {
"provider": "komplai",
"name": "Komplai EU cloud",
"region": "EU · Germany"
},
"processing": {
"kind": "per-layer",
"provider": "komplai",
"layers": [
{
"detector": "regex",
"processing": "local",
"provider": "komplai",
"location": "EU · Germany",
"configured": true
},
{
"detector": "ner",
"processing": "local",
"provider": "komplai",
"location": "EU · Germany",
"configured": true,
"ner_deployment": "eu-de",
"places": [
{
"id": "eu-de",
"location": "EU · Germany",
"available": true,
"reason": null,
"default": true,
"detect": {
"available": true,
"reason": null
}
},
{
"id": "local",
"location": "Local infrastructure · Denmark",
"available": false,
"reason": "unconfigured",
"default": false,
"detect": {
"available": false,
"reason": "unconfigured"
}
}
],
"models": [
{
"id": "danish-pii-ner-v1.3.0",
"name": "Dansk NER 1.3.0",
"status": "stable",
"default": true,
"places": ["eu-de", "local"]
}
]
},
{
"detector": "llm",
"processing": "local",
"provider": "komplai",
"location": "Local infrastructure · Denmark",
"configured": true,
"available": true,
"reason": null,
"models": [
{
"id": "qwen3.8-27b-q8",
"name": "Qwen 3.8 · 27B (Q8)",
"available": true,
"reason": null,
"default": true
}
]
},
{
"detector": "llm",
"processing": "eu-cloud",
"provider": "komplai",
"location": "EU · France",
"configured": true,
"models": [
{
"id": "mistral-small-3.2-24b-instruct-2506",
"name": "Mistral Small 3.2 (24B)",
"available": true,
"reason": null,
"default": true
},
{
"id": "qwen3.5-397b-a17b",
"name": "Qwen3.5 (397B-A17B)",
"available": false,
"reason": "not_validated",
"default": false
}
]
}
]
}
},
"processing": {
"data_mode": "synthetic",
"agreement_reference": null,
"modes": ["regex", "ner", "semantic"],
"text_contract": {
"supported_engines": ["pipeline"],
"detector_choices": ["regex", "ner", "llm"],
"explicit_detector_selection": true,
"true_ner_only": true,
"local_configured_detectors": ["regex", "ner", "llm"],
"default_mode": "ner",
"default_processing": "local",
"policy": "all-detected",
"offset_encoding": "utf-16",
"synchronous_max_utf16_chars": 750000,
"job_max_utf16_chars": 2000000,
"file_input": {
"beta": true,
"operations": ["POST /v1/redact/file", "POST /v1/redact/file/jobs"],
"formats": ["pdf", "docx"],
"max_file_bytes": 52428800,
"max_pdf_pages": 2000,
"extraction_timeout_ms": 120000,
"ocr": false,
"pages_without_text": "refused unless allowPagesWithoutText",
"extraction": {
"step": "file-extraction",
"processing": "local",
"provider": "komplai",
"location": "EU · Germany",
"storage": "memory",
"ocr": false,
"retention": "The file and its extracted text are held in memory while the request runs and are not stored. POST /v1/redact/file/jobs stores the extracted text encrypted as a text job, with that job's retention."
}
},
"result_max_bytes": 33554432,
"complexity_limits": {
"candidate_matches_per_utf16_char": 2,
"candidate_matches_base": 1000,
"matched_utf16_chars_per_utf16_char": 16,
"matched_utf16_chars_base": 16000,
"coreference_work_per_utf16_char": 4,
"coreference_work_base": 4000,
"organisation_rule_timeout_base_ms": 5000,
"organisation_rule_timeout_ns_per_utf16_char_per_rule": 20,
"organisation_rule_workers_per_process": 2,
"organisation_rule_queue": false,
"exceeded_error": "processing_complexity_exceeded"
},
"jobs_accepting_submissions": true,
"semantic_requires_configured_approved_runtime": true,
"eu_cloud_requires_explicit_selection_and_shared_ai_budget": true
},
"storage": {
"synchronous_input": "transient_processor_memory",
"synchronous_result": "response_only",
"job_input": "encrypted_while_queued_or_running",
"job_result": "encrypted_until_agreed_expiry_or_deletion",
"result_read_deletes": false,
"personal_job_storage_policy_required": true,
"backup_retention": "separate_infrastructure_agreement",
"usage_and_audit": "metadata_only_separate_retention"
}
},
"limits": {
"requests_per_minute": 60
}
}
],
"hosting": {
"id": "komplai-local",
"environment": "prod",
"shared": true,
"api": {
"provider": "komplai",
"name": "Komplai EU cloud",
"region": "EU · Germany"
},
"ner": {
"provider": "komplai",
"name": "Komplai EU cloud",
"region": "EU · Germany",
"deployment": "eu-de",
"places": [
{
"id": "eu-de",
"location": "EU · Germany",
"available": true,
"reason": null,
"default": true,
"detect": {
"available": true,
"reason": null
}
},
{
"id": "local",
"location": "Local infrastructure · Denmark",
"available": false,
"reason": "unconfigured",
"default": false,
"detect": {
"available": false,
"reason": "unconfigured"
}
}
]
}
},
"processing": {
"data_mode": "synthetic"
},
"limits": {
"requests_per_minute": 60,
"organisation_requests_per_minute": 120,
"shared_requests_per_minute": 300
}
}{
"error": "api_key_required",
"request_id": "0f8e2c4a-6b1d-4e3f-9a7c-5d2b8e1f4a60",
"doc_url": "https://developers.komplai.dk/errors/api_key_required"
}{
"error": "insufficient_scope",
"request_id": "0f8e2c4a-6b1d-4e3f-9a7c-5d2b8e1f4a60",
"doc_url": "https://developers.komplai.dk/errors/insufficient_scope"
}{
"error": "rate_limited",
"request_id": "0f8e2c4a-6b1d-4e3f-9a7c-5d2b8e1f4a60",
"doc_url": "https://developers.komplai.dk/errors/rate_limited"
}{
"error": "access_service_unavailable",
"request_id": "0f8e2c4a-6b1d-4e3f-9a7c-5d2b8e1f4a60",
"doc_url": "https://developers.komplai.dk/errors/access_service_unavailable"
}