Skip to main content
POST
/
v1
/
prompt-2025
/
query
/
environment-version
curl -X POST "https://api.helicone.ai/v1/prompt-2025/query/environment-version" \
  -H "Authorization: Bearer $HELICONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "promptId": "prompt_123",
    "environment": "production"
  }'
{
  "id": "version_789",
  "model": "gpt-4",
  "prompt_id": "prompt_123",
  "major_version": 2,
  "minor_version": 0,
  "commit_message": "Production release v2.0",
  "environment": "production",
  "created_at": "2024-01-20T14:00:00Z",
  "s3_url": "https://s3.amazonaws.com/bucket/prompt-body.json"
}
Retrieves the prompt version assigned to a specific environment (e.g., production, staging, development).

Request Body

promptId
string
required
The unique identifier of the prompt
environment
string
required
The environment to query (e.g., “production”, “staging”, “development”)

Response

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
environment
string
The environment this version is assigned to
created_at
string
ISO timestamp when the version was created
s3_url
string
S3 URL where the prompt body is stored
curl -X POST "https://api.helicone.ai/v1/prompt-2025/query/environment-version" \
  -H "Authorization: Bearer $HELICONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "promptId": "prompt_123",
    "environment": "production"
  }'
{
  "id": "version_789",
  "model": "gpt-4",
  "prompt_id": "prompt_123",
  "major_version": 2,
  "minor_version": 0,
  "commit_message": "Production release v2.0",
  "environment": "production",
  "created_at": "2024-01-20T14:00:00Z",
  "s3_url": "https://s3.amazonaws.com/bucket/prompt-body.json"
}