List all the prompt templates in your project, along with their versions. Useful for usecases where you might want to pre-load all the templates in your application.
curl --request GET \
--url https://api.lunary.ai/v1/templates
[
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"mode": "text",
"createdAt": "2023-11-07T05:31:56Z",
"group": "<string>",
"projectId": "<string>",
"versions": [
{
"id": "<string>",
"templateId": "<string>",
"content": [
{
"role": "<string>",
"content": "<string>"
}
],
"extra": {},
"testValues": {},
"isDraft": true,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 123
}
]
}
]
Successful response
The response is of type object[]
.
curl --request GET \
--url https://api.lunary.ai/v1/templates
[
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"mode": "text",
"createdAt": "2023-11-07T05:31:56Z",
"group": "<string>",
"projectId": "<string>",
"versions": [
{
"id": "<string>",
"templateId": "<string>",
"content": [
{
"role": "<string>",
"content": "<string>"
}
],
"extra": {},
"testValues": {},
"isDraft": true,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 123
}
]
}
]
List all the prompt templates in your project, along with their versions. Useful for usecases where you might want to pre-load all the templates in your application.
curl --request GET \
--url https://api.lunary.ai/v1/templates
[
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"mode": "text",
"createdAt": "2023-11-07T05:31:56Z",
"group": "<string>",
"projectId": "<string>",
"versions": [
{
"id": "<string>",
"templateId": "<string>",
"content": [
{
"role": "<string>",
"content": "<string>"
}
],
"extra": {},
"testValues": {},
"isDraft": true,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 123
}
]
}
]
Successful response
The response is of type object[]
.
curl --request GET \
--url https://api.lunary.ai/v1/templates
[
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"mode": "text",
"createdAt": "2023-11-07T05:31:56Z",
"group": "<string>",
"projectId": "<string>",
"versions": [
{
"id": "<string>",
"templateId": "<string>",
"content": [
{
"role": "<string>",
"content": "<string>"
}
],
"extra": {},
"testValues": {},
"isDraft": true,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 123
}
]
}
]