---
title: "Analyze For Tuning"
method: POST
path: "/v1/analytics/retrievers/{retriever_id}/analyze-tuning"
tags: ["Analytics", "Analytics - Retrievers"]
---

# Analyze For Tuning

`POST /v1/analytics/retrievers/{retriever_id}/analyze-tuning`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/analytics/retrievers/{retriever_id}/analyze-tuning`
- Auth: HTTP bearer and API key in header `X-Namespace`

Analyze retriever and generate tuning recommendations.

Performs comprehensive analysis and generates actionable recommendations:
- Parameter tuning suggestions
- Cache optimization opportunities
- Performance improvement estimates

**Recommendations Include:**
- Increase/decrease k value
- Adjust reranking thresholds
- Enable/optimize caching
- Stage reordering suggestions

**Use Cases:**
- Initial retriever configuration
- Periodic performance optimization
- A/B testing parameter changes
- Cost optimization

**Example:**
```bash
curl -X POST "https://api.mixpeek.com/v1/analytics/retrievers/ret_abc123/analyze-tuning?days=7" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Namespace: your-namespace"
```

## Path parameters

- `retriever_id` string, required

## Query parameters

- `days` integer: Days of history to analyze

## Response `200`

Successful Response

- InteractionTuningResponse: Response for interaction tuning analysis.
  - `retriever_id` string, required: Retriever identifier
  - `analysis_period` ApiAnalyticsModelsTimeRange, required: Time range for analytics queries.
    - `start` string, date-time, required: Start time (UTC)
    - `end` string, date-time, required: End time (UTC)
  - `recommendations` InteractionTuningRecommendation[], required: Tuning recommendations
    - `recommendation_type` string, required: Type of recommendation
    - `current_value` unknown
    - `recommended_value` unknown, required
    - `expected_impact` string, required: Expected performance impact
    - `confidence` number, required: Confidence score
    - `reasoning` string, required: Explanation of recommendation
  - `current_performance` object, required: Current performance baseline

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/analytics/retrievers/:retriever_id/analyze-tuning/post.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) - [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpeek/apis/mixpeek-api/revisions/790bc16455f6?raw)
