---
title: POST /api/v1/runs
description: Launch Run
locale: ru
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/ru/api/runs/post-runs/
---

> Documentation index: https://enterium-developer-docs.pages.dev/developers/llms.txt — every page of this portal has a Markdown twin at <route>.md; the frozen API contract is at https://enterium-developer-docs.pages.dev/developers/api/openapi.json.

:::note
Сгенерировано из OpenAPI-контракта — не редактировать руками. Сводки операций и описания полей приводятся на английском (дословно из контракта). Интерактивный обозреватель с полными схемами: [https://entherium.duckdns.org:8443/reference](https://entherium.duckdns.org:8443/reference); замороженная спецификация этой сборки: [openapi.json](/developers/api/openapi.json). Группа: [runs](../).
:::

Launch Run

validate, create a queued run, stage the fixture, enqueue the job.

**Авторизация:** нужен `Authorization: Bearer <token>`

## Запрос

```sh
curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/runs" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"allow_regenerate":false,"entity":"generated_articles","guid":31567,"mode":"live","params":{},"pipeline_id":"generate"}'
```

## Ответ `201`

```json
{
  "createtime": "2026-09-03T02:14:04Z",
  "current_step": "make_article_structure",
  "entity_guid": 31567,
  "entity_name": "generated_articles",
  "guid": 1842,
  "metrics": {
    "llm_calls": 11
  },
  "mode": "live",
  "pipeline_id": "generate",
  "started_at": "2026-09-03T02:14:05Z",
  "started_by": "agent@entherium.dev",
  "status": "running",
  "steps_done": 7,
  "steps_total": 18,
  "trigger": "api",
  "updatetime": "2026-09-03T02:19:40Z"
}
```

## Возвращает

`PipelineRunRead` — Successful Response

| Поле | Тип | Описание |
| --- | --- | --- |
| `createtime` | `string` |  |
| `current_step` | `string \| null` (opt.) |  |
| `entity_guid` | `integer` |  |
| `entity_name` | `string` |  |
| `error` | `string \| null` (opt.) |  |
| `error_step` | `string \| null` (opt.) |  |
| `finished_at` | `string \| null` (opt.) |  |
| `guid` | `integer` |  |
| `metrics` | `object` (opt.) |  |
| `mode` | `string` |  |
| `pipeline_id` | `string` |  |
| `started_at` | `string \| null` (opt.) |  |
| `started_by` | `string \| null` (opt.) |  |
| `status` | `string` |  |
| `steps_done` | `integer` |  |
| `steps_total` | `integer` |  |
| `trigger` | `string` |  |
| `updatetime` | `string` |  |

## Параметры

| Параметр | Где | Обязателен | Тип | По умолчанию | Ограничения | Описание |
| --- | --- | --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | нет | `string` | — | uuid | Optional. |

## Тело запроса

| Поле | Тип | Обязательно | Описание |
| --- | --- | --- | --- |
| `allow_regenerate` | `boolean` | нет |  |
| `entity` | `string` | да |  |
| `guid` | `integer` | да |  |
| `mode` | `"live" \| "mock" \| "replay"` | нет |  |
| `params` | `object` | нет |  |
| `pipeline_id` | `string` | да |  |
| `pipeline_variant` | `string \| null` | нет |  |
| `pipeline_version` | `string \| null` | нет |  |
| `steps` | `массив string \| null` | нет |  |

_Пример:_

```json
{
  "allow_regenerate": false,
  "entity": "generated_articles",
  "guid": 31567,
  "mode": "live",
  "params": {},
  "pipeline_id": "generate"
}
```

## Ошибки

| Код | Смысл | Тело |
| --- | --- | --- |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `409` | The record already generated successfully and allow_regenerate is false, or the entity is locked | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |
| `429` | Agent token: the concurrent-run cap for this token is reached | `ErrorResponse` |

Тело любой ошибки — `{detail, code?, request_id, doc_url}`: `request_id` — что цитировать, `doc_url` ведёт в [Справочник ошибок](../../../reference/errors/).
