Templates
Get the latest version
This is the most common endpoint you'll use when working with prompt templates.
This route is used by the Lunary SDKs to fetch the latest version of a template before making an LLM call.
This route differs from all the next ones in that:
- it requires only the
slug
parameter to reference a template - it doesn't require using a Private Key to authenticate the request (Public Key is enough)
GET
/v1/template-versions/latest
Parameters
Name | Located In | Required | Schema |
---|---|---|---|
slug | query | Yes | string |
Responses
200
Latest version of the template
Property | Type | Description |
---|---|---|
id | string | |
templateId | string | |
content | array | |
extra | object | |
testValues | object | |
isDraft | boolean | |
notes | string | |
createdAt | string | |
version | number |
404
Template not found