---
title: "[Beta] Auto-Generate Insights Job Config"
method: POST
path: "/api/v1/sessions/{session_id}/insights/configs/generate"
tags: ["tracer-sessions"]
---

# \[Beta\] Auto-Generate Insights Job Config

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

## Request

- Base URL: `https://api.smith.langchain.com`
- URL: `https://api.smith.langchain.com/api/v1/sessions/{session_id}/insights/configs/generate`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-Tenant-Id`
  - HTTP bearer

Generate an Insights job configuration for a project.

## Path parameters

- `session_id` string, uuid, required

## Request body

- GenerateClusteringJobConfigRequest: Request to generate an Insights job configuration.
  - `user_context` object, required
  - `model` 'openai' | 'anthropic'
  - `cluster_model` string, nullable
  - `summary_model` string, nullable

## Response `200`

Successful Response

- GenerateClusteringJobConfigResponse: Generated Insights job configuration. This configuration is not saved.
  - `summary_prompt` string, required
  - `name` string, nullable
  - `attribute_schemas` object, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `1a8ee9358d81`: 4 breaking
  - the `detail/items/` response's property type changed from `object` to `string` for status `422`
  - removed the required property `detail/items/loc` from the response with the `422` status
  - removed the required property `detail/items/msg` from the response with the `422` status
  - removed the required property `detail/items/type` from the response with the `422` status

[Operation history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/api/v1/sessions/:session_id/insights/configs/generate/post.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) - [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) - [OpenAPI document](https://skmtc.dev/langchain-ai/apis/langsmith/revisions/7a01c01f75e8?raw)
