Getting Started
Audit Logs
Datasets
- GETList datasets
- POSTCreate a new dataset
- GETGet dataset by ID or slug
- DELDelete a dataset
- PATCHUpdate a dataset
- POSTCreate a new prompt
- GETGet prompt by ID
- DELDelete a prompt
- PATCHUpdate a prompt
- GETGet prompt variation by ID
- DELDelete a prompt variation
- PATCHUpdate a prompt variation
- POSTCreate a new prompt variation
Evals
Runs
Templates
Templates
Create a new version
This endpoint allows you to push a new version of a prompt. You can specify the content, extra parameters, test values, draft status, and notes for the new version.
POST
/
v1
/
templates
/
{id}
/
versions
curl --request POST \
--url https://api.lunary.ai/v1/templates/{id}/versions \
--header 'Content-Type: application/json' \
--data '{
"content": "Hello {{name}}, welcome to {{company}}!",
"extra": {
"temperature": 0.7,
"max_tokens": 150
},
"isDraft": false,
"notes": "Updated welcome message with company name"
}'
{
"id": "123",
"templateId": "456",
"content": "Hello {{name}}, welcome to {{company}}!",
"extra": {
"temperature": 0.7,
"max_tokens": 150
},
"isDraft": false,
"notes": "Updated welcome message with company name",
"createdAt": "2023-06-01T12:00:00Z",
"version": 2
}
Path Parameters
The ID of the template to create a new version for
Body
application/json
Response
200 - application/json
Successful response
The response is of type object
.
curl --request POST \
--url https://api.lunary.ai/v1/templates/{id}/versions \
--header 'Content-Type: application/json' \
--data '{
"content": "Hello {{name}}, welcome to {{company}}!",
"extra": {
"temperature": 0.7,
"max_tokens": 150
},
"isDraft": false,
"notes": "Updated welcome message with company name"
}'
{
"id": "123",
"templateId": "456",
"content": "Hello {{name}}, welcome to {{company}}!",
"extra": {
"temperature": 0.7,
"max_tokens": 150
},
"isDraft": false,
"notes": "Updated welcome message with company name",
"createdAt": "2023-06-01T12:00:00Z",
"version": 2
}