POST
/
rest
/
publish-prompt-template

Publish Prompt Template allows you to programmatically create a new version of a prompt. This endpoint works with the deprecated prompt template format. This was meant to be used alongside promptlayer_client.prompts.get. However, this function is deprecated. Use the promptlayer_client.templates.publish endpoint instead.

Body

application/json
api_key
string
required

Your PromptLayer API Key

metadata
object
prompt_name
string
required

Prompt name has to be less than 128 characters and can only contain letters, numbers, and underscores. If a prompt exists with this name it will be pushed into an older version

prompt_template
object
required

Chat Prompt Template

tags
string[]

Array of string tags for a template

commit_message
string

Commit message for the prompt version

Response

200 - application/json
id
integer
required
success
boolean
required