curl --request PATCH \
--url https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Namespace: <api-key>' \
--data '
{
"labels": {
"cl_0": "Gadget Reviews"
}
}
'import requests
url = "https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels"
payload = { "labels": { "cl_0": "Gadget Reviews" } }
headers = {
"Authorization": "Bearer <token>",
"X-Namespace": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Namespace': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({labels: {cl_0: 'Gadget Reviews'}})
};
fetch('https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'labels' => [
'cl_0' => 'Gadget Reviews'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Namespace: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels"
payload := strings.NewReader("{\n \"labels\": {\n \"cl_0\": \"Gadget Reviews\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Namespace", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels")
.header("Authorization", "Bearer <token>")
.header("X-Namespace", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"labels\": {\n \"cl_0\": \"Gadget Reviews\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Namespace"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"labels\": {\n \"cl_0\": \"Gadget Reviews\"\n }\n}"
response = http.request(request)
puts response.read_body{
"cluster_id": "<string>",
"run_id": "<string>",
"label_overrides": {}
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Rename Cluster Labels (Per-Execution)
Rename cluster labels for a single execution — no re-run required.
Entries merge into the execution record’s label_overrides map
(per-key upsert): a non-empty value sets/replaces the override for that
cluster_id, an empty string deletes it (restoring the original LLM/auto
label). Overrides are applied server-side wherever labels are read —
execution GETs (centroids[].label) and the cluster visualization
endpoint (cluster_label on centroid points) — so all clients agree.
Overrides are per-run because cluster ids (cl_0, cl_1, …) are
assigned per-run: a rename on one execution never leaks onto another.
Example body: {"labels": {"cl_0": "Gadget Reviews", "cl_2": ""}}
(renames cl_0, deletes any override on cl_2).
curl --request PATCH \
--url https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Namespace: <api-key>' \
--data '
{
"labels": {
"cl_0": "Gadget Reviews"
}
}
'import requests
url = "https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels"
payload = { "labels": { "cl_0": "Gadget Reviews" } }
headers = {
"Authorization": "Bearer <token>",
"X-Namespace": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Namespace': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({labels: {cl_0: 'Gadget Reviews'}})
};
fetch('https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'labels' => [
'cl_0' => 'Gadget Reviews'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Namespace: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels"
payload := strings.NewReader("{\n \"labels\": {\n \"cl_0\": \"Gadget Reviews\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Namespace", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels")
.header("Authorization", "Bearer <token>")
.header("X-Namespace", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"labels\": {\n \"cl_0\": \"Gadget Reviews\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/clusters/{cluster_id}/executions/{run_id}/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Namespace"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"labels\": {\n \"cl_0\": \"Gadget Reviews\"\n }\n}"
response = http.request(request)
puts response.read_body{
"cluster_id": "<string>",
"run_id": "<string>",
"label_overrides": {}
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Authorizations
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.
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.
Path Parameters
Cluster ID
Run ID whose labels to rename
Body
Body for PATCH /v1/clusters/{cluster_id}/executions/{run_id}/labels.
Renames cluster labels for a single execution without re-running
clustering. Entries merge into the execution record's
label_overrides map (per-key upsert); an empty-string value deletes
that key's override, restoring the original (LLM/auto) label.
Map of cluster_id -> new label (e.g. {'cl_0': 'Gadget Reviews'}). Values are trimmed; a non-empty value sets/replaces the override for that cluster_id, an empty string deletes it. Labels are capped at 200 characters. At least one entry is required.
Show child attributes
Show child attributes
{ "cl_0": "Gadget Reviews" }
{ "cl_2": "" }
Response
Successful Response
Response for PATCH .../executions/{run_id}/labels: the merged overrides.
Cluster the execution belongs to
Execution whose labels were patched
The execution's full label_overrides map AFTER applying this patch (merged; deleted keys removed). Empty dict when the last override was just deleted.
Show child attributes
Show child attributes
Was this page helpful?

