Prompts
/prompts
Create new prompt.
POST
/
api
/
v1
/
prompts
Copy
curl --location --request POST 'https://api.rapidagent.ai/api/v1/prompts' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>' \
--data-raw '{
"name": "My prompt",
"input_variables": ["question", "history"],
"template": "My prompt template with {histroy} and {question}"
}'
Copy
{
"success": true,
"data": {
"id": "cli28c2vd00016itbrlhekwql",
"name": "My prompt",
"template": "...",
"input_variables": [
"question",
"history"
],
}
}
Body
The name of the prompt.
An array
containing input variables.
The prompt template.
Response
Indicates whether the call was successful.
A prompt
object.
Copy
curl --location --request POST 'https://api.rapidagent.ai/api/v1/prompts' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>' \
--data-raw '{
"name": "My prompt",
"input_variables": ["question", "history"],
"template": "My prompt template with {histroy} and {question}"
}'
Copy
{
"success": true,
"data": {
"id": "cli28c2vd00016itbrlhekwql",
"name": "My prompt",
"template": "...",
"input_variables": [
"question",
"history"
],
}
}
Copy
curl --location --request POST 'https://api.rapidagent.ai/api/v1/prompts' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>' \
--data-raw '{
"name": "My prompt",
"input_variables": ["question", "history"],
"template": "My prompt template with {histroy} and {question}"
}'
Copy
{
"success": true,
"data": {
"id": "cli28c2vd00016itbrlhekwql",
"name": "My prompt",
"template": "...",
"input_variables": [
"question",
"history"
],
}
}
Assistant
Responses are generated using AI and may contain mistakes.