Prompt Versions
Diff Prompt Versions
Changed onCompares 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
Request
- Base URL: http://localhost:3000
- URL: http://localhost:3000/v1/prompts/{id}/versions/diff
- Auth: HTTP bearer
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"
}Changes
- info
for the
queryrequest parameterfrom, the type was generalized fromintegertostring - info
for the
queryrequest parameterto, the type was generalized fromintegertostring
- info
- info
the endpoint scheme security
ApiKeyAuthwas removed from the API
- info