Directly interact with the Spro API to mask sensitive information in your AI applications.
The Redaction API allows you to mask sensitive information from text by providing different types of masking methods. This API is designed to help users protect Personally Identifiable Information (PII) and other sensitive data in their AI applications.
API Endpoint
POSThttps://beta.hridaai.com/v1/redact
Request Headers
Authorization: Bearer Token (API key for authenticating requests)
Content-Type: application/json
Request Body
The body of the request must be a JSON object containing the following fields:
Field
Type
Description
prompt
string
The text you want to redact. This can be any string containing sensitive information.
mask_type
string
The type of masking to apply. Options include: char (character masking), label(entity masking), enhanced (enhanced entity masking).
mask_char
string
The character to replace sensitive data with (only used if mask_type is char).
entities
array
An optional array of specific entities to redact. This is an empty array by default.
Bad Request. This occurs if the required fields are missing or the data format is invalid.
453
Unauthorized. Invalid or missing API key.
500
Internal Server Error. The server encountered an unexpected condition.
429
Too Many Requests. You have exceeded your rate limit.
Rate Limits
The Redaction API has rate limits in place to prevent abuse and ensure fair usage. The rate limits are as follows:
Free Tier: 1000 requests per day
Pro Tier: Unlimited requests per day
Enterprise Tier: Custom rate limits based on your subscription
If you exceed the rate limits for your tier, you will receive a 429 Too Many Requests response with a message indicating that you have exceeded your rate limit. You can upgrade your subscription to increase your rate limits.
Authentication
To authenticate requests, include a valid Bearer token in the Authorization header. You can obtain an API key by signing up for an account on the Spro platform.
Pro Tips
Use the mask_char Field: If you are using character masking, you can specify the character to use for masking sensitive data. This allows you to customize the redaction process to suit your needs.
Use entities Field: If you want to redact specific entities from the text, you can provide an array of entities to redact. This gives you more control over the redaction process and ensures that only the specified entities are masked.
Leverage the mask_type Field: The mask_type field allows you to choose the type of masking to apply to the text. You can choose between character masking, entity masking, and enhanced entity masking to suit your specific use case.
Monitor Your Credits: Keep an eye on your remaining credits to ensure that you do not exceed your daily limit. If you are running low on credits, you can upgrade your subscription to increase your rate limits.
Support
If you have any questions or need assistance with the Redaction API, please contact our support team at hrida.aiofficial@gmail.com