Skip to main content
POST
/
v1
/
analytics
/
retrievers
/
{retriever_id}
/
analyze-tuning
Analyze For Tuning
curl --request POST \
  --url https://api.mixpeek.com/v1/analytics/retrievers/{retriever_id}/analyze-tuning \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Namespace: <x-namespace>'
{
  "analysis_period": {
    "end": "2025-10-28T00:00:00Z",
    "start": "2025-10-21T00:00:00Z"
  },
  "current_performance": {
    "avg_latency_ms": 145.3,
    "avg_results": 10,
    "cache_hit_rate": 0.72,
    "p95_latency_ms": 287.5
  },
  "recommendations": [
    {
      "confidence": 0.85,
      "current_value": 10,
      "expected_impact": "Improve recall by ~15%, increase latency by ~8ms",
      "reasoning": "Query patterns show users often click beyond top 10 results",
      "recommendation_type": "increase_k",
      "recommended_value": 20
    }
  ],
  "retriever_id": "ret_abc123"
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your API key. Format: 'Bearer your_api_key'. To get an API key, create an account at mixpeek.com/start and generate a key in your account settings.

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer sk_live_abc123def456"

"Bearer sk_test_xyz789"

X-Namespace
string
required

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Path Parameters

retriever_id
string
required

Query Parameters

days
integer
default:7

Days of history to analyze

Required range: 1 <= x <= 90
func
string
required

Function reference (internal use only)

Response

Successful Response

Response for interaction tuning analysis.

retriever_id
string
required

Retriever identifier

analysis_period
object
required

Analysis period

recommendations
InteractionTuningRecommendation · object[]
required

Tuning recommendations

current_performance
object
required

Current performance baseline