Skip to main content
POST
/
api
/
evaluators
Python
import requests

url = "https://app.langwatch.ai/api/evaluators"

payload = {
    "name": "<string>",
    "config": {}
}
headers = {
    "X-Auth-Token": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "<string>",
  "projectId": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "type": "<string>",
  "config": {},
  "workflowId": "<string>",
  "copiedFromEvaluatorId": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "fields": [
    {
      "identifier": "<string>",
      "type": "<string>",
      "optional": true
    }
  ],
  "outputFields": [
    {
      "identifier": "<string>",
      "type": "<string>",
      "optional": true
    }
  ],
  "workflowName": "<string>",
  "workflowIcon": "<string>"
}

Authorizations

X-Auth-Token
string
header
required

Body

application/json
name
string
required
Required string length: 1 - 255
config
object
required

Response

Success

id
string
required
projectId
string
required
name
string
required
slug
string | null
required
type
string
required
config
object
required
workflowId
string | null
required
copiedFromEvaluatorId
string | null
required
createdAt
string
required
updatedAt
string
required
fields
object[]
required
outputFields
object[]
required
workflowName
string
workflowIcon
string