The prompt template object
⚠️
Preview — this feature is being built; the design below is the spec.
The prompt_template object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.
Example
{
"id": "ptpl_01JDB1C3E5G7J9L1N3Q5",
"type": "prompt_template",
"name": "support",
"latest_version": 13,
"labels": {
"production": 12,
"staging": 13
},
"model": "Amara S1.2",
"variables": [
"ticket",
"customer_tier"
],
"created_at": "2026-09-01T10:00:00Z",
"updated_at": "2026-11-05T10:00:00Z",
"version": {
"number": 12,
"messages": [
{
"role": "system",
"content": "You answer billing questions for Acme."
},
{
"role": "user",
"content": "{{ticket}}"
}
],
"created_at": "2026-10-20T10:00:00Z",
"created_by": "user_01J9Y0A2C4E6G8J0L2N4"
}
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique id of this object. |
type | string | The object type, always prompt_template. |
name | string | Unique in the workspace. Requests refer to name@label or name-v<version>. |
latest_version | integer | See the endpoint pages below. |
labels | object | Label name to version number. production and staging are conventions, not special. |
model | string | Model id. |
variables | array | Variables used by the latest version, found from its {{placeholders}}. |
created_at | string | When it was created, RFC 3339 UTC (some older objects use Unix seconds). |
updated_at | string | When it last changed. |
version | object | Version number. |
Returned by
POST /v1/prompts/templatesGET /v1/prompts/templatesGET /v1/prompts/templates/{template}PUT /v1/prompts/templates/{template}/labels/{label}
Was this page helpful?