cURL
curl --fail-with-body --request POST \
--url "$XPILOT_API_BASE_URL/v1/brand-kits" \
--header "Authorization: Bearer $XPILOT_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"brand_name":"Acme","theme_color":{"primary":"#2563eb","accent":"#f97316"}}'const response = await fetch(process.env.XPILOT_API_BASE_URL + "/v1/brand-kits", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.XPILOT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"brand_name": "Acme",
"theme_color": {
"primary": "#2563eb",
"accent": "#f97316"
}
}),
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);import os, json, requests
response = requests.request(
"POST",
os.environ["XPILOT_API_BASE_URL"] + "/v1/brand-kits",
headers={
"Authorization": "Bearer " + os.environ["XPILOT_API_KEY"],
"Content-Type": "application/json",
},
json=json.loads("{\"brand_name\":\"Acme\",\"theme_color\":{\"primary\":\"#2563eb\",\"accent\":\"#f97316\"}}"),
timeout=70,
)
print(response.status_code, response.text)
response.raise_for_status(){
"data": {
"id": 1,
"brand_name": "Acme",
"brand_logo": "<asset_url>",
"content_style_description": "Friendly and concise.",
"theme_color": {
"primary": "#2563eb",
"accent": "#f97316",
"background": "#ffffff",
"text": "#0f172a"
},
"created_at": 1791849600,
"updated_at": 1791849600
}
}{
"error": {
"code": "invalid_parameter",
"message": "Check parameter types, required fields and idempotency key."
},
"request_id": "<request_id>"
}{
"error": {
"code": "invalid_token",
"message": "Use an active scoped API Key. MCP OAuth tokens cannot call REST."
},
"request_id": "<request_id>"
}{
"error": {
"code": "insufficient_scope",
"message": "Check the credential scope and resource ownership."
},
"request_id": "<request_id>"
}{
"error": {
"code": "idempotency_conflict",
"message": "The same idempotency key must use the exact same input. A conversation may already be busy."
},
"request_id": "<request_id>"
}{
"error": {
"code": "rate_limited",
"message": "Credential/workspace rate or concurrency limit reached. Respect Retry-After before retrying.",
"retry_after": 60
},
"request_id": "<request_id>"
}Brand kits
Create brand kit
Create a brand kit referenced by video_config.brand_kit_id. Unknown fields return 400.
POST
/
v1
/
brand-kits
cURL
curl --fail-with-body --request POST \
--url "$XPILOT_API_BASE_URL/v1/brand-kits" \
--header "Authorization: Bearer $XPILOT_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"brand_name":"Acme","theme_color":{"primary":"#2563eb","accent":"#f97316"}}'const response = await fetch(process.env.XPILOT_API_BASE_URL + "/v1/brand-kits", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.XPILOT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"brand_name": "Acme",
"theme_color": {
"primary": "#2563eb",
"accent": "#f97316"
}
}),
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);import os, json, requests
response = requests.request(
"POST",
os.environ["XPILOT_API_BASE_URL"] + "/v1/brand-kits",
headers={
"Authorization": "Bearer " + os.environ["XPILOT_API_KEY"],
"Content-Type": "application/json",
},
json=json.loads("{\"brand_name\":\"Acme\",\"theme_color\":{\"primary\":\"#2563eb\",\"accent\":\"#f97316\"}}"),
timeout=70,
)
print(response.status_code, response.text)
response.raise_for_status(){
"data": {
"id": 1,
"brand_name": "Acme",
"brand_logo": "<asset_url>",
"content_style_description": "Friendly and concise.",
"theme_color": {
"primary": "#2563eb",
"accent": "#f97316",
"background": "#ffffff",
"text": "#0f172a"
},
"created_at": 1791849600,
"updated_at": 1791849600
}
}{
"error": {
"code": "invalid_parameter",
"message": "Check parameter types, required fields and idempotency key."
},
"request_id": "<request_id>"
}{
"error": {
"code": "invalid_token",
"message": "Use an active scoped API Key. MCP OAuth tokens cannot call REST."
},
"request_id": "<request_id>"
}{
"error": {
"code": "insufficient_scope",
"message": "Check the credential scope and resource ownership."
},
"request_id": "<request_id>"
}{
"error": {
"code": "idempotency_conflict",
"message": "The same idempotency key must use the exact same input. A conversation may already be busy."
},
"request_id": "<request_id>"
}{
"error": {
"code": "rate_limited",
"message": "Credential/workspace rate or concurrency limit reached. Respect Retry-After before retrying.",
"retry_after": 60
},
"request_id": "<request_id>"
}Documentation by X-Pilot
Required scope:brand_kits:write.
Manage API keys · Authentication and recovery

Authorizations
Scoped X-Pilot API key
Body
application/json
Brand name, 1–120 characters.
Maximum string length:
120Example:
"Acme"
http(s) logo URL, preferably returned by POST /v1/assets.
Maximum string length:
2048Tone and style guidance for scripts, up to 20,000 characters.
Maximum string length:
20000Theme colors. Keys: primary, secondary, accent, background, text, textSecondary, success, warning, error, surface, surfaceLight, shadow. Values: #rgb, #rrggbb, #rrggbbaa or rgb()/rgba(); null clears a color.
Show child attributes
Show child attributes
Example:
{ "primary": "#2563eb", "accent": "#f97316" }
Response
Success
