from openapi 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"
}
}Crea un nuevo aviso con su primera versión. La plantilla soporta marcadores de posición .
from openapi 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"
}
}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>.
Nombre de solicitud legible por humanos
1 - 255El texto de la plantilla del aviso con marcadores de posición {{variable}}.
1 - 100000Descripción detallada del aviso
2000Pares de clave-valor de metadatos personalizados
Show child attributes
Está bien
Identificador de prompt único
Tipo de objeto
Nombre de solicitud legible por humanos
Número de versión actualmente activa
-9007199254740991 <= x <= 9007199254740991Número de versión más reciente
-9007199254740991 <= x <= 9007199254740991Pares de clave-valor de metadatos personalizados
Show child attributes
Sello de tiempo cuando se creó la solicitud
Marca de tiempo cuando se actualizó por última vez el aviso
La versión inicial creada con este aviso.
Show child attributes
Descripción detallada del aviso
¿Esta página le ayudó?