> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkeia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# History by Model

> Lists the history of a specific model.

## Endpoint

`GET https://gateway.orkeia.ai/ai-models/{id}/history`

## Headers

Requires header `authorization:  <your_token>`.

```http theme={null}
authorization:  <your_token>
Content-Type: application/json
```

## Route Parameters

* `id` — Model ID (e.g., `MODEL_67890`)

## Query String

| Name      | Type            | Required | Description                    | Example     |
| --------- | --------------- | -------- | ------------------------------ | ----------- |
| last      | string          | No       | Cursor/offset of the last page | "hist\_010" |
| limit     | string          | No       | Amount per page                | "20"        |
| field     | string          | No       | Field for sorting              | "date"      |
| direction | "asc" \| "desc" | No       | Sorting direction              | "desc"      |

## Request Body

```json theme={null}
{
  "environment": {
    "company": "acme-inc",
    "sector": "engineering"
  }
}
```

## Response (200)

```json theme={null}
{
"status": "ok", 
"data": {
  "items": [
    {
      "id": "hist_021",
      "responsible": "João Vitor",
      "responsibleId": "user_123",
      "action": "updated ai model",
      "type": "neutral",
      "date": "2025-08-22T19:15:10.000Z",
      "versionControl": "v1.0.1"
    }
  ]
}
```

## Error Codes

### 500 — Server Error

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
