curl -X POST https://api.helicone.ai/v1/prompt-2025/update \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promptId": "prompt_abc123xyz",
"promptVersionId": "version_def456uvw",
"newMajorVersion": false,
"commitMessage": "Updated temperature and added max_tokens",
"environment": "production",
"promptBody": {
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful customer support agent. Be polite and professional."
},
{
"role": "user",
"content": "{{user_question}}"
}
],
"temperature": 0.5,
"max_tokens": 750
}
}'
{
"data": {
"id": "version_ghi789rst"
},
"error": null
}
Prompts
Update Prompt
Create a new version of an existing prompt
POST
/
v1
/
prompt-2025
/
update
curl -X POST https://api.helicone.ai/v1/prompt-2025/update \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promptId": "prompt_abc123xyz",
"promptVersionId": "version_def456uvw",
"newMajorVersion": false,
"commitMessage": "Updated temperature and added max_tokens",
"environment": "production",
"promptBody": {
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful customer support agent. Be polite and professional."
},
{
"role": "user",
"content": "{{user_question}}"
}
],
"temperature": 0.5,
"max_tokens": 750
}
}'
{
"data": {
"id": "version_ghi789rst"
},
"error": null
}
Creates a new version of an existing prompt. You can create either a minor version (incremental updates) or a major version (breaking changes).
Request Body
The unique identifier of the prompt to update
The version ID to base the new version on
Whether to create a new major version (true) or minor version (false)
Description of the changes in this version
Optional environment to associate with this version (e.g., “production”, “staging”)
The updated prompt content in OpenAI chat format
Show Prompt Body
Show Prompt Body
The model to use
Array of message objects with role and content
Sampling temperature (0-2)
Nucleus sampling parameter
Maximum tokens to generate
Array of tool/function definitions
Controls which tool to call
Response
Error message if the request failed, null otherwise
curl -X POST https://api.helicone.ai/v1/prompt-2025/update \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promptId": "prompt_abc123xyz",
"promptVersionId": "version_def456uvw",
"newMajorVersion": false,
"commitMessage": "Updated temperature and added max_tokens",
"environment": "production",
"promptBody": {
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful customer support agent. Be polite and professional."
},
{
"role": "user",
"content": "{{user_question}}"
}
],
"temperature": 0.5,
"max_tokens": 750
}
}'
{
"data": {
"id": "version_ghi789rst"
},
"error": null
}
Version Management
Minor Versions
SetnewMajorVersion: false for incremental updates:
- Bug fixes
- Small improvements
- Configuration tweaks
Major Versions
SetnewMajorVersion: true for breaking changes:
- Complete rewrites
- Structural changes
- Different model or approach
⌘I
