POST
/
v1
/
prompt-2025
/
query
/
versions
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"
  }
]
Retrieves all versions of a specific prompt, optionally filtered by major version.

Request Body

promptId
string
required
The unique identifier of the prompt
majorVersion
number
Filter versions by specific major version number

Response

Returns an array of prompt version objects.
id
string
Unique identifier of the prompt version
model
string
The model specified in the prompt
prompt_id
string
The ID of the parent prompt
major_version
number
The major version number
minor_version
number
The minor version number
commit_message
string
The commit message for this version
created_at
string
ISO timestamp when the version was created
s3_url
string
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"
  }
]