Skip to main content
POST
Create benchmark

Authorizations

Authorization
string
header
required

Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.

X-Namespace
string
header
required

Namespace id (ns_...), not the namespace name. This scopes the request rather than authenticating it, and it is required on every operation marked x-mixpeek-namespace-scoped.

Body

application/json

Request to create a new benchmark run.

benchmark_name
string
required

Human-readable name for this benchmark.

Required string length: 1 - 255
baseline_retriever_id
string
required

ID of the baseline retriever pipeline to compare against.

candidate_retriever_ids
string[]
required

IDs of candidate retriever pipelines to evaluate.

Minimum array length: 1
session_filter
SessionFilter · object | null

Optional filter criteria for selecting sessions to replay.

session_count
integer
default:1000

Number of sessions to include in the benchmark.

Required range: 10 <= x <= 10000

Response

Successful Response

Response containing benchmark details and results.

benchmark_id
string
required

Unique benchmark identifier.

benchmark_name
string
required

Human-readable name.

baseline_retriever_id
string
required

Baseline retriever ID.

candidate_retriever_ids
string[]
required

Candidate retriever IDs.

session_count
integer
required

Number of sessions in benchmark.

status
enum<string>
required

Current benchmark status.

Available options:
pending,
building_sessions,
replaying,
computing_metrics,
completed,
failed
created_at
string<date-time>
required

Creation timestamp.

session_filter
SessionFilter · object | null

Filter criteria used.

results
BenchmarkResult · object[] | null

Results per pipeline (available when completed).

comparison
BenchmarkComparison · object | null

Statistical comparison (available when completed).

started_at
string<date-time> | null

Execution start time.

completed_at
string<date-time> | null

Completion time.

error_message
string | null

Error message if failed.