Prompt Versions
Diff Prompt Versions
Compares the templates of two prompt versions side-by-side and returns a unified diff. Requires read access to the prompt.
get/v1/prompts/{id}/versions/diff
Path parameters
idstring uuid required
Query parameters
fromstring required
The source version number (integer) or version tag (string) to compare from.
tostring required
The target version number (integer) or version tag (string) to compare to.
Response
Versions compared successfully
Example response
{
"from_version": 1,
"to_version": 2,
"from_template": "Hello {{ .name }}",
"to_template": "Hello {{ .name }}!\nWelcome to px0.",
"diff": "--- v1\n+++ v2\n@@ -1 +1,2 @@\n-Hello {{ .name }}\n+Hello {{ .name }}!\n+Welcome to px0.\n"
}