Skip to main content
Send a chat transcript and receive a structured profile of how the group talks, plus a prompt_block — a rendered, drop-in instruction you can place in an agent’s prompt so it matches that voice.

When to call it

Not on every message. extract reads the whole transcript and reasons about it, so it takes seconds. It must never sit between a user’s message and your agent’s reply.
Call it in the background, cache the prompt_block, and have your reply path read the cache. Refresh on a slow clock — a group’s voice barely changes from one message to the next: A good default is to refresh once the conversation has grown by about 5 messages, and never more than once a minute. Pass a rolling window of the last ~100 messages rather than the entire history — you want the voice the group uses now. Cache it so your reply path never waits on it. See When to call each API for the full picture.

Authorization

string
required
Your bearer token: Bearer <token>. See Authentication.

Request body

object
required
The conversation to analyze.
Message[]
required
The messages to analyze, in order. Must contain at least one message.
string
Optional label for where the transcript came from (e.g. a chat name).
Each Message has:
string
required
A stable identifier for the message, unique within the transcript.
string
required
Who sent the message (a display name or stable id).
string
required
The message text.
string
Optional channel or room the message was sent in.
string
Optional timestamp for the message.
string
Optional id of the message this one replies to. Preserving reply structure improves the analysis.
Request

Response

string
A ready-to-use, human-readable instruction block describing how to write like this group. Drop it straight into an agent’s prompt.
object
The structured profile the prompt_block is rendered from. Top-level fields include summary, register (formality, warmth, casing), style (length, formatting, emoji), lexicon, banned_phrases, address, taboos, humor, roles, norms, in_jokes, and meta. Read individual fields when you want finer control than prompt_block gives.
200 OK

Errors

See Errors for the full envelope shape.

Example