> ## 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 de modelos

> Lista o histórico geral dos modelos.

## Endpoint

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

## Cabeçalhos

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

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

## Query string

| Parâmetro   | Tipo         | Obrigatório | Descrição                           | Exemplo      |
| ----------- | ------------ | ----------- | ----------------------------------- | ------------ |
| `last`      | `string`     | Não         | Cursor/offset da última página lida | `"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_001",
      "responsible": "Sistema",
      "responsibleId": "system",
      "action": "created ai model",
      "type": "neutral",
      "date": "2025-08-22T18:32:45.000Z",
      "versionControl": "v1.0.0"
    }
  ],
  "next": "hist_010"
}
```

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