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

Parameters

content
string
आवश्यक
evaluate करने और जरूरत पड़ने पर regenerate करने के लिए शुरुआती AI से बना text।
prompt
string
आवश्यक
वह original user prompt जिससे content बना। regeneration को guide करने के लिए use होता है।
threshold
number
आवश्यक
कम-से-कम स्वीकार्य RAIL score (0–10)। इससे नीचे score वाले content को regenerate किया जाता है।
mode
string
डिफ़ॉल्ट:"basic"
हर iteration में use होने वाली evaluation depth: तेज़ scoring के लिए "basic" या ज्यादा detailed analysis के लिए "deep"
max_iterations
integer
डिफ़ॉल्ट:"3"
अधिकतम regeneration कोशिशें (1–5)।
dimensions
string[]
जिन खास dimensions पर threshold enforce करनी है। सभी 8 पर लगाने के लिए छोड़ दें।

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 हुआ) या सबसे अच्छा regenerated version।
result.final_score
number
लौटाए गए content का RAIL score।
result.passed_threshold
boolean
true अगर final content threshold पूरा करता है।
result.iterations_taken
integer
कितने evaluation+regeneration cycles चले।
credits_consumed
number
request का usage। हर iteration एक standalone evaluation की तरह meter होता है; अगर पहली ही response pass हो जाए, तो सिर्फ़ एक charge होता है।