Skip to main content

Overview

Use this endpoint to report a cached response that was incorrect, outdated, irrelevant, or otherwise unsafe to reuse. When an entry accumulates enough negative feedback, LemonData can automatically invalidate it.

Notes

  • Authentication requires a standard inference API key.
  • feedback_type accepts wrong_answer, outdated, irrelevant, or other.
  • request_id is optional and helps tie feedback back to the original request log.
  • description is optional free-form context for operators and audits.

Request / Response

Use the interactive OpenAPI panel above for the exact schema and response fields.

Example

curl -X POST "https://api.lemondata.cc/v1/cache/feedback" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "cache_entry_id": "abc123",
    "feedback_type": "wrong_answer",
    "request_id": "req_1234567890",
    "description": "The cached answer referenced an outdated pricing table."
  }'
{
  "object": "cache.feedback",
  "recorded": true,
  "invalidated": false,
  "stats": {
    "negative_feedback_count": 1,
    "total_hit_count": 18,
    "negative_feedback_rate": 0.0556
  }
}