import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.prompts.create({
name: "Customer Support Classifier",
description: "Classifies incoming customer messages by intent",
template: "Classify the following customer message into one of these categories: {{categories}}\n\nMessage: {{message}}",
});
console.log(result);
}
run();{
"id": "prompt_aa87e2b1112a455b8deabed784372198",
"object": "prompt",
"name": "Customer Support Classifier",
"description": "Classifies incoming customer messages by intent",
"active_version": 1,
"latest_version": 1,
"metadata": {},
"created_at": "2026-03-15T10:30:00Z",
"updated_at": "2026-03-15T10:30:00Z",
"version": {
"id": "pver_bb98f3c2223b566c9dfbcef895483209",
"prompt_id": "prompt_aa87e2b1112a455b8deabed784372198",
"version": 1,
"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 prompt with its first version. The template supports placeholders.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.prompts.create({
name: "Customer Support Classifier",
description: "Classifies incoming customer messages by intent",
template: "Classify the following customer message into one of these categories: {{categories}}\n\nMessage: {{message}}",
});
console.log(result);
}
run();{
"id": "prompt_aa87e2b1112a455b8deabed784372198",
"object": "prompt",
"name": "Customer Support Classifier",
"description": "Classifies incoming customer messages by intent",
"active_version": 1,
"latest_version": 1,
"metadata": {},
"created_at": "2026-03-15T10:30:00Z",
"updated_at": "2026-03-15T10:30:00Z",
"version": {
"id": "pver_bb98f3c2223b566c9dfbcef895483209",
"prompt_id": "prompt_aa87e2b1112a455b8deabed784372198",
"version": 1,
"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>.
Human-readable prompt name
1 - 255The prompt template text with {{variable}} placeholders
1 - 100000Detailed description of the prompt
2000Custom metadata key-value pairs
Show child attributes
OK
Unique prompt identifier
Object type
Human-readable prompt name
Currently active version number
-9007199254740991 <= x <= 9007199254740991Most recent version number
-9007199254740991 <= x <= 9007199254740991Custom metadata key-value pairs
Show child attributes
Timestamp when the prompt was created
Timestamp when the prompt was last updated
The initial version created with this prompt
Show child attributes
Detailed description of the prompt
Was this page helpful?