curl -X POST https://api.helicone.ai/v1/prompt-2025 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Support Agent",
"tags": ["support", "customer-service"],
"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.7,
"max_tokens": 500
}
}'
{
"data": {
"id": "prompt_abc123xyz",
"versionId": "version_def456uvw"
},
"error": null
}
Prompts
Create Prompt
Create a new prompt with initial version
POST
/
v1
/
prompt-2025
curl -X POST https://api.helicone.ai/v1/prompt-2025 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Support Agent",
"tags": ["support", "customer-service"],
"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.7,
"max_tokens": 500
}
}'
{
"data": {
"id": "prompt_abc123xyz",
"versionId": "version_def456uvw"
},
"error": null
}
Creates a new prompt template with an initial version. The prompt body uses the OpenAI chat format.
Request Body
Name of the prompt template
Array of tags to categorize the prompt
The prompt content in OpenAI chat format
Show Prompt Body
Show Prompt Body
The model to use (e.g., “gpt-4o”, “claude-3-sonnet-20240229”)
Array of message objects
Show Message Object
Show Message Object
Message role: “system”, “user”, “assistant”, “developer”, “tool”, or “function”
Message content. Can be:
- A string for simple text messages
- An array of content parts for multi-modal messages
- null for certain message types
Optional name for the message
Required for tool messages
Tool calls made by the assistant
Sampling temperature (0-2)
Nucleus sampling parameter
Maximum tokens to generate
Controls which tool to call: “auto”, “none”, or specific tool
Response
Error message if the request failed, null otherwise
curl -X POST https://api.helicone.ai/v1/prompt-2025 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Support Agent",
"tags": ["support", "customer-service"],
"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.7,
"max_tokens": 500
}
}'
{
"data": {
"id": "prompt_abc123xyz",
"versionId": "version_def456uvw"
},
"error": null
}
⌘I
