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

# Generation History

> List past generations with filtering, favorites, and ratings

## Query Parameters

<ParamField query="page" type="integer" default="1">Page number.</ParamField>
<ParamField query="limit" type="integer" default="20">Items per page (max 100).</ParamField>
<ParamField query="category" type="string">Filter: `text`, `image`, `video`, `tts`, `stt`, `tool`</ParamField>
<ParamField query="model_slug" type="string">Filter by model slug.</ParamField>
<ParamField query="status" type="string">Filter: `completed`, `pending`, `failed`</ParamField>
<ParamField query="favorites_only" type="boolean">Show only favorited generations.</ParamField>

## Request

```bash theme={null}
curl "https://elumenta.ru/api/v2/user/history?category=image&limit=10" \
  -H "Authorization: Bearer nb_YOUR_API_KEY"
```

## Response

```json theme={null}
{
  "items": [
    {
      "id": 18491,
      "model_slug": "flux-1.1-pro",
      "model_name": "Flux 1.1 Pro",
      "category": "image",
      "prompt": "Portrait of a CEO in a modern office",
      "status": "completed",
      "result_text": null,
      "result_url": "https://storage.elumenta.ru/generations/18491.webp",
      "tokens_spent": 8,
      "is_favorited": false,
      "user_rating": null,
      "created_at": "2026-03-08T12:02:30Z"
    }
  ],
  "total": 142,
  "page": 1,
  "limit": 10
}
```

## Toggle Favorite

```bash theme={null}
POST /api/v2/user/history/{generation_id}/favorite
```

## Rate a Generation

```bash theme={null}
POST /api/v2/user/history/{generation_id}/rate
Content-Type: application/json

{"rating": 5}
```

## Delete

```bash theme={null}
DELETE /api/v2/user/history/{generation_id}
```

<Note>
  File retention depends on your plan: Starter 7 days, Basic 30 days, Pro/VIP 90 days, Elite unlimited.
</Note>
