cURL
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": [], "folder_id": 1 }, "prompt_version": { "prompt_template": { "content": [ { "text": "<string>", "type": "text" } ], "input_variables": [], "template_format": "f-string", "type": "completion" }, "commit_message": "<string>", "metadata": { "model": { "provider": "<string>", "name": "<string>", "parameters": {} }, "customField": "<string>" } }, "release_labels": [ "<string>" ] } '
{ "id": 123, "prompt_name": "<string>", "prompt_version_id": 123, "version_number": 123, "tags": [ "<string>" ], "prompt_template": { "content": [ { "text": "<string>", "type": "text" } ], "input_variables": [], "template_format": "f-string", "type": "completion" }, "release_labels": [ "<string>" ], "metadata": { "model": { "provider": "<string>", "name": "<string>", "parameters": {} }, "customField": "<string>" }, "commit_message": "<string>" }
Show child attributes
Successful Response
The ID of the prompt template.
The name of the prompt template.
The ID of the created prompt version.
The version number of the prompt template.
Was this page helpful?