Prompt update
Prompt
Integration methods
Prompt
- Prompt creation
- Prompt retrieval
- Prompt update
- Prompt delete
Multimodal integrations
Evaluations
Model
Prompt update
Prompt
PATCH
/
api
/
prompts
/
<prompt_id>
import requests
url = "https://api.keywordsai.co/api/prompts/<prompt_id>/"
api_key = "YOUR_KEYWORDS_AI_API_KEY" # Replace with your actual Keywords AI API key
data = {
"name": "Your Prompt Name",
"description": "Your Prompt Description"
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
You can update a prompt by sending a PATCH request to the prompt endpoint. The request should include the name of the prompt and an optional description.
The name of the prompt.
Description of the prompt
import requests
url = "https://api.keywordsai.co/api/prompts/<prompt_id>/"
api_key = "YOUR_KEYWORDS_AI_API_KEY" # Replace with your actual Keywords AI API key
data = {
"name": "Your Prompt Name",
"description": "Your Prompt Description"
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
import requests
url = "https://api.keywordsai.co/api/prompts/<prompt_id>/"
api_key = "YOUR_KEYWORDS_AI_API_KEY" # Replace with your actual Keywords AI API key
data = {
"name": "Your Prompt Name",
"description": "Your Prompt Description"
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())