मुख्य सामग्री पर जाएं

Parameters

content
string
आवश्यक
Initial AI-generated text जो evaluate और potentially regenerate करना है।
prompt
string
आवश्यक
Original user prompt जिसने content produce किया था। Regeneration guide करने के लिए use होता है।
threshold
number
आवश्यक
Minimum acceptable RAIL score (0–10)। इस score से नीचे का content regenerate किया जाता है।
mode
string
डिफ़ॉल्ट:"basic"
हर iteration का evaluation mode: "basic" (1.0 credit each) या "deep" (3.0 credits each)।
max_iterations
integer
डिफ़ॉल्ट:"3"
Maximum regeneration attempts (1–5)।
dimensions
string[]
Specific dimensions जिन पर threshold enforce करना है। सभी 8 पर apply करने के लिए omit करें।

Request

curl -X POST https://api.responsibleailabs.ai/railscore/v1/safe-regenerate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_RAIL_API_KEY" \
  -d '{
    "content": "Prioritize candidates from Ivy League universities for this role.",
    "prompt": "What hiring criteria should we use?",
    "threshold": 7.0,
    "mode": "basic",
    "max_iterations": 3
  }'

Response

{
  "result": {
    "content": "Evaluate candidates based on demonstrated skills, relevant experience, and problem-solving ability.",
    "final_score": 8.4,
    "passed_threshold": true,
    "iterations_taken": 2,
    "iteration_scores": [4.2, 8.4],
    "from_cache": false
  },
  "credits_consumed": 2.0
}
result.content
string
Final content - या तो original (अगर pass हो गया) या best regenerated version।
result.final_score
number
Return हुए content का RAIL score।
result.passed_threshold
boolean
true अगर final content threshold meet करता है।
result.iterations_taken
integer
कितने evaluation+regeneration cycles perform हुए।
credits_consumed
number
Total credits charged: eval_credit × iterations_taken