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}"
}'
{
"success": true,
"data": {
"id": "cli28c2vd00016itbrlhekwql",
"name": "My prompt",
"template": "...",
"input_variables": [
"question",
"history"
],
}
}
Prompts
/prompts
Create new prompt.
POST
/
api
/
v1
/
prompts
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}"
}'
{
"success": true,
"data": {
"id": "cli28c2vd00016itbrlhekwql",
"name": "My prompt",
"template": "...",
"input_variables": [
"question",
"history"
],
}
}
Body
string
The name of the prompt.
object
An
array containing input variables.string
The prompt template.
Response
boolean
Indicates whether the call was successful.
object
A
prompt object.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}"
}'
{
"success": true,
"data": {
"id": "cli28c2vd00016itbrlhekwql",
"name": "My prompt",
"template": "...",
"input_variables": [
"question",
"history"
],
}
}
⌘I