Skip to content
Start here

List evaluator types (deprecated)

client.aiGateway.evaluationTypes.list(EvaluationTypeListParams { account_id, order_by, order_by_direction, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<EvaluationTypeListResponse { id, created_at, description, 5 more } >
GET/accounts/{account_id}/ai-gateway/evaluation-types

Lists the evaluator types that evaluations can use to score AI Gateway responses. Evaluations are deprecated and unavailable to new accounts.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
AI Gateway WriteAI Gateway Read
ParametersExpand Collapse
params: EvaluationTypeListParams { account_id, order_by, order_by_direction, 2 more }
account_id: string

Path param

order_by?: string

Query param

order_by_direction?: "asc" | "desc"

Query param

One of the following:
"asc"
"desc"
page?: number

Query param

minimum1
per_page?: number

Query param

maximum50
minimum5
ReturnsExpand Collapse
EvaluationTypeListResponse { id, created_at, description, 5 more }
id: string
created_at: string
formatdate-time
description: string
enable: boolean
mandatory: boolean
modified_at: string
formatdate-time
name: string
type: string

List evaluator types (deprecated)

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const evaluationTypeListResponse of client.aiGateway.evaluationTypes.list({
  account_id: '0d37909e38d3e99c29fa2cd343ac421a',
})) {
  console.log(evaluationTypeListResponse.id);
}
{
  "result": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "enable": true,
      "mandatory": true,
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "type": "type"
    }
  ],
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}
Returns Examples
{
  "result": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "enable": true,
      "mandatory": true,
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "type": "type"
    }
  ],
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}