Skip to main content
POST
/
api
/
v1
/
llm
/
feedback
/
responses
/
batch
Python (SDK)
from mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.llm.feedback.batch_get_response_feedback(ids=[
        "resp-xyz789",
        "resp-missing123",
    ])

    # Handle response
    print(res)
{
  "results": [
    {
      "id": "resp-xyz789",
      "rating": "thumbs_down",
      "description": "The response missed key details.",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "resp-missing123",
      "error": "not_found"
    }
  ]
}

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Body

application/json

Request parameters for batch retrieving feedback by multiple request IDs.

ids
string[]
required

Array of request IDs (chatcmpl-xxx or resp-xxx) to retrieve feedback for

Required array length: 1 - 100 elements

Response

200 - application/json

OK

Response containing batch feedback results. Each result is either the feedback data or a not_found error.

results
object[]
required

Array of feedback results in the same order as the input IDs

Error result when the completion/response ID doesn't exist