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

# Data Enrichment

> Prepare catalogue data and run enrichment workflows.

<Note>
  Authenticate every request with `Authorization: Bearer clr_live_YOUR_API_KEY`.
</Note>

## Prepare catalogue rows and columns for enrichment

<Badge color="blue">POST</Badge> `/objects/{objectId}/prepare`

Prepare catalogue rows and columns for enrichment through the Claro Public API.

**Required scopes:** `objects`, `enrich`

### Parameters

| Name       | Location | Type   | Required |
| ---------- | -------- | ------ | -------- |
| `objectId` | path     | string | Yes      |

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "column_ids": [
    "00000000-0000-4000-8000-000000000002"
  ]
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/objects/$OBJECT_ID/prepare" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "column_ids": [
      "00000000-0000-4000-8000-000000000002"
    ]
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  object_id = "YOUR_OBJECT_ID"
  url = f"https://platform.getclaro.ai/api/public/v1/objects/{object_id}/prepare"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "column_ids": [
      "00000000-0000-4000-8000-000000000002"
    ]
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const objectId = "YOUR_OBJECT_ID";

  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/${objectId}/prepare`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "column_ids": [
        "00000000-0000-4000-8000-000000000002"
      ]
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Start table enrichment

<Badge color="blue">POST</Badge> `/enrich`

Start table enrichment through the Claro Public API.

**Required scope:** `enrich`

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "projectId": "00000000-0000-4000-8000-000000000001",
  "tableId": "00000000-0000-4000-8000-000000000006",
  "numRows": 10
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/enrich" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "projectId": "00000000-0000-4000-8000-000000000001",
    "tableId": "00000000-0000-4000-8000-000000000006",
    "numRows": 10
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/enrich"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "projectId": "00000000-0000-4000-8000-000000000001",
    "tableId": "00000000-0000-4000-8000-000000000006",
    "numRows": 10
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/enrich`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "projectId": "00000000-0000-4000-8000-000000000001",
      "tableId": "00000000-0000-4000-8000-000000000006",
      "numRows": 10
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Enrich multiple cells

<Badge color="blue">POST</Badge> `/enrich/multiple-cells`

Enrich multiple cells through the Claro Public API.

**Required scope:** `enrich`

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "projectId": "00000000-0000-4000-8000-000000000001",
  "tableId": "00000000-0000-4000-8000-000000000006",
  "cellIds": [
    "00000000-0000-4000-8000-000000000007"
  ]
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/enrich/multiple-cells" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "projectId": "00000000-0000-4000-8000-000000000001",
    "tableId": "00000000-0000-4000-8000-000000000006",
    "cellIds": [
      "00000000-0000-4000-8000-000000000007"
    ]
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/enrich/multiple-cells"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "projectId": "00000000-0000-4000-8000-000000000001",
    "tableId": "00000000-0000-4000-8000-000000000006",
    "cellIds": [
      "00000000-0000-4000-8000-000000000007"
    ]
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/enrich/multiple-cells`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "projectId": "00000000-0000-4000-8000-000000000001",
      "tableId": "00000000-0000-4000-8000-000000000006",
      "cellIds": [
        "00000000-0000-4000-8000-000000000007"
      ]
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Generate enrichment categories

<Badge color="blue">POST</Badge> `/enrich/categories`

Generate enrichment categories through the Claro Public API.

**Required scope:** `enrich`

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "prompt": "Categorize products by department",
  "projectId": "00000000-0000-4000-8000-000000000001"
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/enrich/categories" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "prompt": "Categorize products by department",
    "projectId": "00000000-0000-4000-8000-000000000001"
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/enrich/categories"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "prompt": "Categorize products by department",
    "projectId": "00000000-0000-4000-8000-000000000001"
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/enrich/categories`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "prompt": "Categorize products by department",
      "projectId": "00000000-0000-4000-8000-000000000001"
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.
