Retrieves all versions of a specific prompt, optionally filtered by major version.
Request Body
The unique identifier of the prompt
Filter versions by specific major version number
Response
Returns an array of prompt version objects.
Unique identifier of the prompt version
The model specified in the prompt
The ID of the parent prompt
The commit message for this version
ISO timestamp when the version was created
S3 URL where the prompt body is stored (if applicable)
curl -X POST "https://api.helicone.ai/v1/prompt-2025/query/versions" \
-H "Authorization: Bearer $HELICONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promptId": "prompt_123",
"majorVersion": 1
}'
[
{
"id": "version_456",
"model": "gpt-4",
"prompt_id": "prompt_123",
"major_version": 1,
"minor_version": 0,
"commit_message": "Initial version",
"created_at": "2024-01-14T10:30:00Z"
},
{
"id": "version_789",
"model": "gpt-4",
"prompt_id": "prompt_123",
"major_version": 1,
"minor_version": 1,
"commit_message": "Minor improvements to system prompt",
"created_at": "2024-01-15T14:20:00Z"
}
]