Starting from 500 atoms
AI tier

About

This Utility API uses AI to anonymize data, handling sensitive information in texts.
This API can detect, categorize, and redact sensitive information in unstructured text, such as phone numbers, email addresses, and identification details. This API is crucial for privacy compliance, data sharing, and document redaction, providing a streamlined solution to protect sensitive information while maintaining the integrity and usability of the text.
The atoms cost is subjected to change depending on the size of the input file and the provider selected. The list of providers and the atoms cost for each provider is given below:
Provider (requested_service)Atoms
Azure500
ApyHub2000

API Playground

This API endpoint does not have a playground yet. Please check back later.

API Documentation

input json: output json
POST
https://api.apyhub.com/ai/text/anonymize

Request example

1
curl --location --request POST 'https://api.apyhub.com/ai/text/anonymize' \
2
--header 'apy-token: {{token}}' \
3
--header 'Content-Type: application/json' \
4
--data '{
5
"text": "My SSN is 859-98-0987. Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check. Is 998.214.865-68 your Brazilian CPF number?",
6
"language":"en",
7
"requested_service": "azure",
8
"azure": {
9
"key": "your-azure-key",
10
"endpoint": "your-azure-endpoint"
11
}
12
}'
Provider (requested_service)Atoms
Azure500
ApyHub2000
Method: POST
Content Type: application/json
Request Body
AttributeTypeMandatoryDescription
textStringYesthe textual content for which you want to perform text anonymization.
- The max content size is 125,000 characters.
languageStringyesthe language supported by azure chceck list of supported language link - https://learn.microsoft.com/en-GB/azure/ai-services/language-service/personally-identifiable-information/language-support?tabs=documents
requested_serviceStringyesthe name of service provider. Supported providers are azure, apyhub. Defaults to apyhub
azure.keyStringyes (if azure is selected in requested_service)service key provided by azure
azure.endpointStringyes (if azure is selected in requested_service)the endpoint provided by azure
Sample Response
A successful request returns the text anonymization response in the output parameter specified. If the request fails, the response contains an error code and a message to help determine what went wrong.

HTTP Response Codes

The method may return one of the following HTTP status codes:
Status CodeDescription
200The request was successful.
400Invalid input - the file is corrupt or the supported inputs are not provided.
401Required authentication information is either missing or not valid for the resource.
500If any unexpected error occurs while processing the request.

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.