Skip to main content
POST
/
api
/
v1
/
llm
/
prompts
/
{id}
/
versions
Typescript (SDK)
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"
}

Authorizations

Authorization
string
header
required

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>.

Path Parameters

id
string
required

Parent prompt identifier

Body

application/json
template
string
required

The prompt template text

Required string length: 1 - 100000

Response

201 - application/json

OK

id
string
required

Unique version identifier

prompt_id
string
required

Parent prompt identifier

version
integer
required

Version number

Required range: -9007199254740991 <= x <= 9007199254740991
object
any
required

Object type

template
string
required

The prompt template text with {{variable}} placeholders

created_at
string<date-time>
required

Timestamp when this version was created