import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.prompts.createVersion({
id: "prompt_aa87e2b1112a455b8deabed784372198",
requestBody: {
template: "You are a customer support classifier. Classify the message into: {{categories}}\n\nRespond with only the category name.\n\nMessage: {{message}}",
},
});
console.log(result);
}
run();{
"id": "pver_bb98f3c2223b566c9dfbcef895483209",
"prompt_id": "prompt_aa87e2b1112a455b8deabed784372198",
"version": 2,
"object": "prompt.version",
"template": "Classify the following customer message into one of these categories: {{categories}}\n\nMessage: {{message}}",
"created_at": "2026-03-15T10:30:00Z"
}Creates a new version of a prompt. The new version automatically becomes the active version. Fields not provided are carried forward from the previous version.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.prompts.createVersion({
id: "prompt_aa87e2b1112a455b8deabed784372198",
requestBody: {
template: "You are a customer support classifier. Classify the message into: {{categories}}\n\nRespond with only the category name.\n\nMessage: {{message}}",
},
});
console.log(result);
}
run();{
"id": "pver_bb98f3c2223b566c9dfbcef895483209",
"prompt_id": "prompt_aa87e2b1112a455b8deabed784372198",
"version": 2,
"object": "prompt.version",
"template": "Classify the following customer message into one of these categories: {{categories}}\n\nMessage: {{message}}",
"created_at": "2026-03-15T10:30:00Z"
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Parent prompt identifier
The prompt template text
1 - 100000OK
Unique version identifier
Parent prompt identifier
Version number
-9007199254740991 <= x <= 9007199254740991Object type
The prompt template text with {{variable}} placeholders
Timestamp when this version was created
Was this page helpful?