Partially update a prompt template by creating a new version from an existing base version. Use this endpoint to change selected prompt fields, model parameters, release labels, or version metadata without resending the full template.Documentation Index
Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt
Use this file to discover all available pages before exploring further.
version and label select the base version to patch; omit both to patch from the latest version.messages, tools, and functions can be patched by index with an object or fully replaced with an array.content follows the same patch-or-replace behavior.model_parameters are shallow-merged; existing keys not mentioned in the request are preserved.release_labels are created or moved to the newly created version.The prompt template name or ID.
Request body for partially updating a prompt template by creating a new version from the latest, a specific version, or a release label.
The base version number to patch from. Mutually exclusive with label. If neither is provided, the latest version is used.
x > 0The release label identifying the base version to patch from (e.g. 'prod', 'staging'). Mutually exclusive with version.
Index-based patch. Keys are string indices (e.g. "0", "1"), values are the replacement message objects.
Patch for tools. Object for index-based patching, array for full replacement, null to remove. Chat templates only.
Patch for functions. Object for index-based patching, array for full replacement, null to remove. Chat templates only.
Replace the function_call setting. Set to null to remove. Chat templates only.
Replace the tool_choice setting. Set to null to remove. Chat templates only.
Patch for completion template content. Object for index-based patching, array for full replacement. Completion templates only.
Parameters to shallow-merge into existing model parameters. Existing keys not provided are preserved.
Convenience field to set response_format in model parameters. Cannot be used simultaneously with response_format inside model_parameters. Set to null to remove.
A message describing the changes in this version.
Release labels to create or move to the newly created version.
New version created successfully
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.
External ID mappings attached to the prompt template.
Metadata associated with the prompt blueprint. Supports additional custom fields beyond the model field.