post/summarize

Summarize

Summarize PII-free text via OpenAI. Rate limited by slowapi (hourly burst) and, when AUTH_MODE=api_key, the org's daily/monthly request quota (enforced in verify_auth before this handler runs). Quota headers are included on every response so clients can self-throttle.

Request body

Request example
{
  "redacted_text": "<Redacted Text>",
  "length": "short",
  "session_id": "string"
}

Responses

200Successful Response
Example · 200
{
  "summary": "<Summary>"
}
422Validation Error
Example · 422
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "<Message>",
      "type": "<Error Type>"
    }
  ]
}

Code samples

Generated from the live OpenAPI spec. Replace $SAVITAR_API_KEY with a key from your dashboard.

curl -X POST "https://redactra-api-direct-yjxsqk46ja-el.a.run.app/summarize" \
  -H "Authorization: Bearer $SAVITAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "redacted_text": "<Redacted Text>",
  "length": "short",
  "session_id": "string"
}'