Skip to main content
POST
/
api
/
v1
/
llm
/
prompts
Python (SDK)
from mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.llm.prompts.create(name="Customer Support Classifier", template="Classify the following customer message into one of these categories: {{categories}}\n\nMessage: {{message}}", description="Classifies incoming customer messages by intent")

    # Handle response
    print(res)
{
  "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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.mka1.com/llms.txt

Use this file to discover all available pages before exploring further.

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

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json
name
string
required

Human-readable prompt name

Required string length: 1 - 255
template
string
required

The prompt template text with {{variable}} placeholders

Required string length: 1 - 100000
description
string

Detailed description of the prompt

Maximum string length: 2000
metadata
object

Custom metadata key-value pairs

Response

201 - application/json

OK

id
string
required

Unique prompt identifier

object
any
required

Object type

name
string
required

Human-readable prompt name

active_version
integer
required

Currently active version number

Required range: -9007199254740991 <= x <= 9007199254740991
latest_version
integer
required

Most recent version number

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

Custom metadata key-value pairs

created_at
string<date-time>
required

Timestamp when the prompt was created

updated_at
string<date-time>
required

Timestamp when the prompt was last updated

version
object
required

The initial version created with this prompt

description
string

Detailed description of the prompt