Reference
Track Prompt
POST
/
rest
/
track-prompt
Associate a prompt template with a request.
Example Code
import requests
response = requests.post(
"https://api.promptlayer.com/rest/track-prompt",
json={
"api_key": "<YOUR_API_KEY>",
"prompt_name": "<PROMPT_NAME>",
"prompt_input_variables": {"variable1": "value1", "variable2": "value2"},
"request_id": "<REQUEST_ID>",
"version": "<VERSION>"
},
)
Body
application/json
api_key
string
requiredYour PromptLayer API Key.
prompt_name
string
requiredThe name of the prompt template.
prompt_input_variables
object
Input variables for the prompt template.
request_id
integer
requiredThe unique identifier for the request.
version
integer
The version of the prompt template. Both version and label cannot be specified. Only one or none.
label
string
The label of the prompt template version. Both version and label cannot be specified. Only one or none.
Response
200 - application/json
success
boolean
requiredmessage
string
requiredWas this page helpful?