Appearance
cURL Integration
cURL examples for the hosted API and self-hosted instances.
Health Check
bash
curl https://demo.questa-ai.online/health
# {"status": "ok"}Text Anonymization
bash
curl -X POST https://demo.questa-ai.online/anonymize/text \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"text": "My name is John Doe and my email is john@example.com."
}'With Entity Filtering
bash
curl -X POST https://demo.questa-ai.online/anonymize/text \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"text": "My name is John Doe and my SSN is 123-45-6789.",
"entities": "PERSON_NAME,NATIONAL_ID"
}'With Custom Entities
bash
curl -X POST https://demo.questa-ai.online/anonymize/text \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"text": "The Project Phoenix budget is classified.",
"custom_entities": [
{"original": "Project Phoenix", "placeholder": "PROJECT"}
]
}'File Anonymization
Upload a PDF
bash
curl -X POST https://demo.questa-ai.online/anonymize/pdf \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "file=@document.pdf"Response:
json
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "PDF anonymization job started."
}Upload with Options
bash
curl -X POST https://demo.questa-ai.online/anonymize/pdf \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "file=@document.pdf" \
-F "entities=PERSON_NAME,EMAIL_ADDRESS" \
-F 'custom_entities=[{"original":"Confidential","placeholder":"REDACTED"}]'Check Job Status
bash
curl https://demo.questa-ai.online/anonymize/status/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_TOKEN"Download the Result (Bash)
bash
curl -s https://demo.questa-ai.online/anonymize/status/JOB_ID \
-H "Authorization: Bearer YOUR_API_TOKEN" \
| jq -r '.result' \
| base64 -d > anonymized_output.pdfList Available Entities
bash
curl https://demo.questa-ai.online/anonymize/entities \
-H "Authorization: Bearer YOUR_API_TOKEN"Next: Python Integration