openapi: 3.0.1 info: title: Klu Actions Feedback API description: 'REST API for the Klu (klu.ai) LLM app platform. The Klu Engine runs Actions - each encapsulating a prompt template, model config, context (RAG), and output parsing - against input variables to generate completions, and manages the data, feedback, sessions, models, apps, and workspaces around them. Authentication is via a Bearer API key obtained from the workspace API Keys settings. NOTE - Endpoints under the Actions, Context, and Apps/Workspaces paths reflect the publicly documented Klu API reference and SDK surface. Where the public docs document a capability via the SDK but do not publish the exact REST path, this spec models the conventional resource path used by the Klu Engine; see review.yml for which operations are documented verbatim versus inferred from the SDK.' termsOfService: https://klu.ai/terms contact: name: Klu Support url: https://help.klu.ai/ version: '1.0' servers: - url: https://api.klu.ai/v1 description: Klu Engine production API security: - bearerAuth: [] tags: - name: Feedback description: Ratings, corrections, and issues attached to data points. paths: /feedback: post: operationId: createFeedback tags: - Feedback summary: Submit feedback on a data point description: Submits feedback - a rating, correction, or issue - for a generation. For ratings, Klu uses 1 for negative and 2 for positive. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateFeedbackRequest' responses: '200': description: Feedback recorded. content: application/json: schema: $ref: '#/components/schemas/Feedback' '401': $ref: '#/components/responses/Unauthorized' components: schemas: Feedback: type: object properties: guid: type: string data_guid: type: string type: type: string value: oneOf: - type: integer - type: string CreateFeedbackRequest: type: object required: - data_guid - type properties: data_guid: type: string description: GUID of the data point being rated. type: type: string description: Feedback type - rating, correction, or issue. enum: - rating - correction - issue value: description: For a rating, 1 (negative) or 2 (positive); for a correction, the corrected text. oneOf: - type: integer - type: string Error: type: object properties: error: type: string message: type: string responses: Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer description: Klu API key passed as a Bearer token in the Authorization header.