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

# Obohatit buňky

> Použití AI k obohacení nebo generování hodnot pro konkrétní sloupec napříč vybranými řádky.

## Parametry cesty

<ParamField path="table_id" type="string" required>
  Jedinečný identifikátor tabulky.
</ParamField>

## Tělo požadavku

<ParamField body="row_ids" type="string[]" required>
  Pole ID řádků k obohacení. Nesmí být prázdné.
</ParamField>

<ParamField body="column_key" type="string" required>
  Klíč sloupce k obohacení.
</ParamField>

<ParamField body="prompt" type="string" required>
  Instrukce pro AI popisující, co má generovat nebo jak transformovat data.
</ParamField>

<ParamField body="model" type="string" default="gemini-pro">
  AI model k použití. Výchozí je `gemini-pro`.
</ParamField>

<ParamField body="web_search" type="boolean" default="true">
  Zda může AI použít webové vyhledávání k nalezení dalších informací.
</ParamField>

<ParamField body="target_language" type="string">
  Cílový jazyk pro obohacení založená na překladu.
</ParamField>

<ParamField body="use_glossary" type="boolean" default="false">
  Zda se mají při obohacení použít pojmy z vašeho slovníku.
</ParamField>

## Odpověď

Obohacení probíhá asynchronně. Odpověď potvrzuje, že úloha byla zařazena do fronty.

<ResponseField name="id" type="string">Identifikátor úlohy obohacení.</ResponseField>
<ResponseField name="status" type="string">Vždy `queued`.</ResponseField>
<ResponseField name="estimated_credits" type="number">Odhadovaná cena v kreditech.</ResponseField>
<ResponseField name="rows_queued" type="integer">Počet řádků zařazených do fronty pro obohacení.</ResponseField>

<RequestExample>
  ```typescript TypeScript theme={null}
  const job = await client.enhance.cells("tbl_abc123", {
    row_ids: ["row_1", "row_2", "row_3"],
    column_key: "description",
    prompt: "Write a compelling product description based on the product name and specifications.",
    web_search: true,
  });

  console.log(job.id);                // "enhance_..."
  console.log(job.estimated_credits); // 6
  ```

  ```python Python theme={null}
  job = client.enhance.cells(
      "tbl_abc123",
      row_ids=["row_1", "row_2", "row_3"],
      column_key="description",
      prompt="Write a compelling product description based on the product name and specifications.",
      web_search=True,
  )

  print(job["id"])                 # "enhance_..."
  print(job["estimated_credits"])  # 6
  ```

  ```bash cURL theme={null}
  curl -X POST "https://hub.banditshq.com/api/v1/tables/tbl_abc123/enhance" \
    -H "Authorization: Bearer lasso_..." \
    -H "Content-Type: application/json" \
    -d '{
      "row_ids": ["row_1", "row_2", "row_3"],
      "column_key": "description",
      "prompt": "Write a compelling product description based on the product name and specifications.",
      "web_search": true
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "enhance_abc123",
    "status": "queued",
    "estimated_credits": 6,
    "rows_queued": 3
  }
  ```
</ResponseExample>
