curl --request POST \
--url https://api.promptlayer.com/rest/prompt-templates \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"prompt_template": {
"prompt_name": "<string>",
"tags": []
},
"prompt_version": {
"prompt_template": {
"content": [
{
"type": "<any>",
"text": "<string>"
}
],
"input_variables": [],
"template_format": "f-string",
"type": "<any>"
},
"commit_message": "<string>",
"metadata": {
"model": {
"provider": "<string>",
"name": "<string>",
"parameters": {}
},
"customField": "<string>"
}
}
}'
{
"id": 123,
"prompt_name": "<string>",
"tags": [
"<string>"
],
"prompt_template": {
"content": [
{
"type": "<any>",
"text": "<string>"
}
],
"input_variables": [],
"template_format": "f-string",
"type": "<any>"
},
"metadata": {
"model": {
"provider": "<string>",
"name": "<string>",
"parameters": {}
},
"customField": "<string>"
},
"commit_message": "<string>"
}
curl --request POST \
--url https://api.promptlayer.com/rest/prompt-templates \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"prompt_template": {
"prompt_name": "<string>",
"tags": []
},
"prompt_version": {
"prompt_template": {
"content": [
{
"type": "<any>",
"text": "<string>"
}
],
"input_variables": [],
"template_format": "f-string",
"type": "<any>"
},
"commit_message": "<string>",
"metadata": {
"model": {
"provider": "<string>",
"name": "<string>",
"parameters": {}
},
"customField": "<string>"
}
}
}'
{
"id": 123,
"prompt_name": "<string>",
"tags": [
"<string>"
],
"prompt_template": {
"content": [
{
"type": "<any>",
"text": "<string>"
}
],
"input_variables": [],
"template_format": "f-string",
"type": "<any>"
},
"metadata": {
"model": {
"provider": "<string>",
"name": "<string>",
"parameters": {}
},
"customField": "<string>"
},
"commit_message": "<string>"
}
Successful Response
The response is of type object
.
Was this page helpful?