POST
/
rest
/
track-metadata

Associate a metadata dictionary with a request. This can be used for things like session_ids, user_ids, location, etc.

Example Code

import requests
response = requests.post(
  "https://api.promptlayer.com/rest/track-metadata",
  json={
      "api_key": "<YOUR_API_KEY>",
      "request_id": "<REQUEST_ID>",
      "metadata": {"session_id": "abc123", "user_id": "user123"}
  },
)

Body

application/json
api_key
string
required

Your PromptLayer API Key.

request_id
integer
required

The unique identifier for the request to which the metadata is associated.

metadata
object
required

A dictionary of metadata items to associate with the request. Can include session_ids, user_ids, location, etc.

Response

200 - application/json
success
boolean
required
message
string
required