---
title: "[Beta] Create Insights Job"
method: POST
path: "/api/v1/sessions/{session_id}/insights"
tags: ["tracer-sessions"]
---

# [Beta] Create Insights Job

`POST /api/v1/sessions/{session_id}/insights`

Create an insights job.

## Path parameters

- `session_id` string, uuid, required

## Request body

- CreateRunClusteringJobRequest — Request to create a run clustering job.
  - `config_id` string, uuid, nullable
  - `start_time` string, date-time, nullable
  - `end_time` string, date-time, nullable
  - `last_n_hours` integer, nullable
  - `hierarchy` integer[], nullable
  - `partitions` object, nullable
  - `sample` union
    - number
    - integer
  - `summary_prompt` string, nullable
  - `filter` string, nullable
  - `name` string, nullable
  - `attribute_schemas` object, nullable
  - `user_context` object, nullable
  - `model` 'openai' | 'anthropic'
  - `cluster_model` string, nullable
  - `summary_model` string, nullable
  - `is_scheduled` boolean
  - `validate_model_secrets` boolean

## Response `200`

Successful Response

- CreateRunClusteringJobResponse — Response to creating a run clustering job.
  - `id` string, uuid, required
  - `name` string, required
  - `status` string, required
  - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/langchain-ai/apis/langsmith.md) · [All operations](https://skmtc.net/langchain-ai/apis/langsmith/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/revisions/a0acb3a6a101/schema)
