curl --request POST \
--url https://api.example.com/v1/prompts \
--header 'Content-Type: application/json' \
--data '
{
"prompt": {
"name": "<string>",
"description": "<string>",
"source_prompt_id": "<string>",
"metadata": {}
},
"version": {
"model_provider": "OPENAI",
"model_name": "<string>",
"template": {
"type": "<string>",
"messages": [
{
"role": "user",
"content": "<string>"
}
]
},
"template_type": "STR",
"template_format": "MUSTACHE",
"invocation_parameters": {
"type": "<string>",
"openai": {
"temperature": 123,
"max_tokens": 123,
"max_completion_tokens": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"top_p": 123,
"seed": 123,
"reasoning_effort": "minimal"
}
},
"description": "<string>",
"tools": {
"type": "<string>",
"tools": [
{
"type": "<string>",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"tool_choice": {
"type": "<string>"
},
"disable_parallel_tool_calls": true
},
"response_format": {
"type": "<string>",
"json_schema": {
"name": "<string>",
"description": "<string>",
"schema": {},
"strict": true
}
}
}
}
'{
"data": {
"model_provider": "OPENAI",
"model_name": "<string>",
"template": {
"type": "<string>",
"messages": [
{
"role": "user",
"content": "<string>"
}
]
},
"template_type": "STR",
"template_format": "MUSTACHE",
"invocation_parameters": {
"type": "<string>",
"openai": {
"temperature": 123,
"max_tokens": 123,
"max_completion_tokens": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"top_p": 123,
"seed": 123,
"reasoning_effort": "minimal"
}
},
"id": "<string>",
"description": "<string>",
"tools": {
"type": "<string>",
"tools": [
{
"type": "<string>",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"tool_choice": {
"type": "<string>"
},
"disable_parallel_tool_calls": true
},
"response_format": {
"type": "<string>",
"json_schema": {
"name": "<string>",
"description": "<string>",
"schema": {},
"strict": true
}
}
}
}Create a new prompt and its initial version. A prompt can have multiple versions.
curl --request POST \
--url https://api.example.com/v1/prompts \
--header 'Content-Type: application/json' \
--data '
{
"prompt": {
"name": "<string>",
"description": "<string>",
"source_prompt_id": "<string>",
"metadata": {}
},
"version": {
"model_provider": "OPENAI",
"model_name": "<string>",
"template": {
"type": "<string>",
"messages": [
{
"role": "user",
"content": "<string>"
}
]
},
"template_type": "STR",
"template_format": "MUSTACHE",
"invocation_parameters": {
"type": "<string>",
"openai": {
"temperature": 123,
"max_tokens": 123,
"max_completion_tokens": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"top_p": 123,
"seed": 123,
"reasoning_effort": "minimal"
}
},
"description": "<string>",
"tools": {
"type": "<string>",
"tools": [
{
"type": "<string>",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"tool_choice": {
"type": "<string>"
},
"disable_parallel_tool_calls": true
},
"response_format": {
"type": "<string>",
"json_schema": {
"name": "<string>",
"description": "<string>",
"schema": {},
"strict": true
}
}
}
}
'{
"data": {
"model_provider": "OPENAI",
"model_name": "<string>",
"template": {
"type": "<string>",
"messages": [
{
"role": "user",
"content": "<string>"
}
]
},
"template_type": "STR",
"template_format": "MUSTACHE",
"invocation_parameters": {
"type": "<string>",
"openai": {
"temperature": 123,
"max_tokens": 123,
"max_completion_tokens": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"top_p": 123,
"seed": 123,
"reasoning_effort": "minimal"
}
},
"id": "<string>",
"description": "<string>",
"tools": {
"type": "<string>",
"tools": [
{
"type": "<string>",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"tool_choice": {
"type": "<string>"
},
"disable_parallel_tool_calls": true
},
"response_format": {
"type": "<string>",
"json_schema": {
"name": "<string>",
"description": "<string>",
"schema": {},
"strict": true
}
}
}
}Show child attributes
OPENAI, AZURE_OPENAI, ANTHROPIC, GOOGLE, DEEPSEEK, XAI, OLLAMA, AWS Show child attributes
"chat"STR, CHAT MUSTACHE, F_STRING, NONE Show child attributes
"openai"Show child attributes
minimal, low, medium, high Show child attributes
"tools"1Show child attributes
"function"Show child attributes
"json_schema"The newly created prompt version
Show child attributes
OPENAI, AZURE_OPENAI, ANTHROPIC, GOOGLE, DEEPSEEK, XAI, OLLAMA, AWS Show child attributes
STR, CHAT MUSTACHE, F_STRING, NONE Show child attributes
"openai"Show child attributes
minimal, low, medium, high Show child attributes
"tools"1Show child attributes
"function"Show child attributes
"json_schema"Was this page helpful?