Concept: Safe Regeneration | Python:
client.safe_regenerate()Parameters
The initial AI-generated text to evaluate and potentially regenerate.
The original user prompt that produced the content. Used to guide regeneration.
Minimum acceptable RAIL score (0–10). Content below this score is regenerated.
Evaluation mode per iteration:
"basic" (1.0 credit each) or "deep" (3.0 credits each).Maximum regeneration attempts (1–5).
Specific dimensions to enforce the threshold on. Omit to apply across all 8.
Request
Response
The final content - either the original (if it passed) or the best regenerated version.
RAIL score of the returned content.
true if the final content meets the threshold.Number of evaluation+regeneration cycles performed.
Total credits charged:
eval_credit × iterations_taken.