> ## 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.

# Histórico por Modelo

> Lista o histórico de um modelo específico.

## Endpoint

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

## Cabeçalhos

Requer cabeçalho `authorization:  <seu_token>`.

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

## Parâmetros de rota

* `id` — ID do modelo (ex.: `MODEL_67890`)

## Query string

| Nome      | Tipo            | Obrigatório | Descrição                      | Exemplo     |
| --------- | --------------- | ----------- | ------------------------------ | ----------- |
| last      | string          | Não         | Cursor/offset da última página | "hist\_010" |
| limit     | string          | Não         | Quantidade por página          | "20"        |
| field     | string          | Não         | Campo para ordenação           | "date"      |
| direction | "asc" \| "desc" | Não         | Direção da ordenação           | "desc"      |

## Corpo da requisição

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

## Resposta (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"
    }
  ]
}
```

## Códigos de erro

### 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
}
```
