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:
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| name | The name of the prompt. | string | Required. |
| template | The prompt text body. Can contain ${variable} placeholders. | string | Required. |
| version | The version of the prompt. | integer | Optional. |
| description | A description of the prompt. | string | Optional. |
| integrations | The LLM integrations to associate with this prompt, in the format integrationName:modelName. The integration must already exist in your Conductor cluster. | Array of strings | Optional. |
| temperature | The temperature for the prompt. | integer | Optional. |
| topP | Top-p nucleus sampling parameter. | integer | Optional. |
| responseFormat | The output format of the prompt. | string | Optional. |
| stopWords | The stop sequences for generation. | Array of strings | Optional. |
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.