Skip to main content

Create Prompts in Bulk

Endpoint: POST /api/prompts/

Creates or updates prompts in bulk. New prompts are created with full access granted to the caller. Existing ones are updated if the caller has UPDATE permission.

Note

This endpoint processes prompts sequentially. A validation failure on one prompt (e.g. a missing integration) throws immediately and halts processing of remaining prompts in the list. If the caller lacks UPDATE permission on an existing prompt, that prompt is silently skipped.

Request body

Format the request body as a JSON array of objects. Each object supports the following fields:

ParameterDescriptionTypeRequired/ Optional
nameThe name of the prompt.stringRequired.
templateThe prompt text body. Can contain ${variable} placeholders.stringRequired.
versionThe version of the prompt.integerOptional.
descriptionA description of the prompt.stringOptional.
integrationsThe LLM integrations to associate with this prompt, in the format integrationName:modelName. The integration must already exist in your Conductor cluster.Array of stringsOptional.
temperatureThe temperature for the prompt.integerOptional.
topPTop-p nucleus sampling parameter.integerOptional.
responseFormatThe output format of the prompt.stringOptional.
stopWordsThe stop sequences for generation.Array of stringsOptional.

Response

  • Returns 200 OK with no response body on success.
  • Returns 401 if authentication is required.
  • Returns 403 if the caller does not have READ access to a referenced integration.
  • Returns 404 if a referenced integration does not exist.

Examples

Create prompts in bulk

Request

curl -X 'POST' \
'https://<YOUR-SERVER-URL>/api/prompts/' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"name": "email-summary",
"template": "Summarize this email in ${language}: ${email_body}",
"description": "Summarizes an email",
"integrations": ["openAI:gpt-4o"],
"version": 1,
"temperature": 0.1,
"topP": 1.0,
"responseFormat": "text",
"stopWords": []
},
{
"name": "meeting-notes",
"template": "Summarize the following meeting transcript: ${transcript}",
"description": "Summarizes a meeting transcript",
"integrations": ["openAI:gpt-4o"],
"version": 1,
"temperature": 0.1,
"topP": 1.0,
"responseFormat": "text",
"stopWords": []
}
]'

Response

Returns 200 OK, indicating that the prompts have been created successfully.