---
title: Get an evaluation (deprecated)
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[AI Gateway](https://developers.cloudflare.com/api/python/resources/ai_gateway)

[Evaluations](https://developers.cloudflare.com/api/python/resources/ai_gateway/subresources/evaluations)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get an evaluation (deprecated)

ai\_gateway.evaluations.get(strid, EvaluationGetParams\*\*kwargs) -> [EvaluationGetResponse](<https://developers.cloudflare.com/api/python/resources/ai_gateway#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/evaluations/{id}

Retrieves an evaluation and its results. Evaluations and datasets are deprecated and unavailable to new accounts.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



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

**Example:**<code>X-Auth-Email: user@example.com</code>

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

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`AI Gateway Write``AI Gateway Read`

##### ParametersExpand Collapse

account\_id: str

[Link to this property](<#(resource)%20ai_gateway.evaluations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

gateway\_id: str

Unique identifier of the AI Gateway within the account.

maxLength64

minLength1

[Link to this property](<#(resource)%20ai_gateway.evaluations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20gateway_id%20%3E%20(schema)>)

id: str

[Link to this property](<#(resource)%20ai_gateway.evaluations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class EvaluationGetResponse: …

</summary>

id: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

datasets: List\[Dataset]

</summary>

id: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

account\_id: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20account_id">Link to this property</a>

account\_tag: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20account_tag">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20created_at">Link to this property</a>

enable: bool

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20enable">Link to this property</a>

<details>

<summary>

filters: List\[DatasetFilter]

</summary>

<details>

<summary>

key: Literal\["created\_at", "request\_content\_type", "response\_content\_type", 10 more]

</summary>

One of the following:

"created\_at"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%200">Link to this property</a>

"request\_content\_type"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%201">Link to this property</a>

"response\_content\_type"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%202">Link to this property</a>

"success"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%203">Link to this property</a>

"cached"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%204">Link to this property</a>

"provider"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%205">Link to this property</a>

"model"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%206">Link to this property</a>

"cost"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%207">Link to this property</a>

"tokens"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%208">Link to this property</a>

"tokens\_in"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%209">Link to this property</a>

"tokens\_out"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%2010">Link to this property</a>

"duration"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%2011">Link to this property</a>

"feedback"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key%20%3E%20(member)%2012">Link to this property</a>

</details>

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20key">Link to this property</a>

<details>

<summary>

operator: Literal\["eq", "contains", "lt", "gt"]

</summary>

One of the following:

"eq"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20operator%20%3E%20(member)%200">Link to this property</a>

"contains"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20operator%20%3E%20(member)%201">Link to this property</a>

"lt"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20operator%20%3E%20(member)%202">Link to this property</a>

"gt"

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20operator%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20operator">Link to this property</a>

<details>

<summary>

value: List\[Union\[str, float, bool]]

</summary>

One of the following:

str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

float

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

bool

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%202">Link to this property</a>

</details>

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20filters">Link to this property</a>

gateway\_id: str

Unique identifier of the AI Gateway within the account.

maxLength64

minLength1

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20gateway_id">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20modified_at">Link to this property</a>

name: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20datasets">Link to this property</a>

gateway\_id: str

Unique identifier of the AI Gateway within the account.

maxLength64

minLength1

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20gateway_id">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

name: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

processed: bool

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20processed">Link to this property</a>

<details>

<summary>

results: List\[Result]

</summary>

id: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20created_at">Link to this property</a>

evaluation\_id: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20evaluation_id">Link to this property</a>

evaluation\_type\_id: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20evaluation_type_id">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20modified_at">Link to this property</a>

result: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20result">Link to this property</a>

status: float

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20status">Link to this property</a>

status\_description: str

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20status_description">Link to this property</a>

total\_logs: float

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20total_logs">Link to this property</a>

</details>

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20results">Link to this property</a>

total\_logs: float

<a href="#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)%20%3E%20(property)%20total_logs">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20evaluation_get_response%20%3E%20(schema)>)

### Get an evaluation (deprecated)

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
evaluation = client.ai_gateway.evaluations.get(
    id="id",
    account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
    gateway_id="my-gateway",
)
print(evaluation.id)
```

200 example

```
{
  "result": {
    "id": "id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "datasets": [
      {
        "id": "id",
        "account_id": "account_id",
        "account_tag": "account_tag",
        "created_at": "2019-12-27T18:11:19.117Z",
        "enable": true,
        "filters": [
          {
            "key": "created_at",
            "operator": "eq",
            "value": [
              "string"
            ]
          }
        ],
        "gateway_id": "my-gateway",
        "modified_at": "2019-12-27T18:11:19.117Z",
        "name": "name"
      }
    ],
    "gateway_id": "my-gateway",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "processed": true,
    "results": [
      {
        "id": "id",
        "created_at": "2019-12-27T18:11:19.117Z",
        "evaluation_id": "evaluation_id",
        "evaluation_type_id": "evaluation_type_id",
        "modified_at": "2019-12-27T18:11:19.117Z",
        "result": "result",
        "status": 0,
        "status_description": "status_description",
        "total_logs": 0
      }
    ],
    "total_logs": 0
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "result": {
    "id": "id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "datasets": [
      {
        "id": "id",
        "account_id": "account_id",
        "account_tag": "account_tag",
        "created_at": "2019-12-27T18:11:19.117Z",
        "enable": true,
        "filters": [
          {
            "key": "created_at",
            "operator": "eq",
            "value": [
              "string"
            ]
          }
        ],
        "gateway_id": "my-gateway",
        "modified_at": "2019-12-27T18:11:19.117Z",
        "name": "name"
      }
    ],
    "gateway_id": "my-gateway",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "processed": true,
    "results": [
      {
        "id": "id",
        "created_at": "2019-12-27T18:11:19.117Z",
        "evaluation_id": "evaluation_id",
        "evaluation_type_id": "evaluation_type_id",
        "modified_at": "2019-12-27T18:11:19.117Z",
        "result": "result",
        "status": 0,
        "status_description": "status_description",
        "total_logs": 0
      }
    ],
    "total_logs": 0
  },
  "success": true
}
```