POST
/
rest
/
track-metadata
curl --request POST \
  --url https://api.promptlayer.com/rest/track-metadata \
  --header 'Content-Type: application/json' \
  --data '{
  "api_key": "<string>",
  "request_id": "<string>",
  "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"}
  },
)

Request Parameters

api_key
string

Your PromptLayer API Key

request_id
string
metadata
object

👋 Contact us at hello@magniv.io if you run into any problems.