sdkHosted AI, explicit consent

Create segment

pipeline.createSegment

Generate GTM buyer segments from company context using the workspace's BYOK LLM and persist them as draft segments. Set regenerate=true to replace existing drafts instead of appending.

Parameters

workspaceIdrequired
string
No description.
count
number
Segments to generate, clamped 3-8. Defaults to 5.
regenerate
boolean
Replace existing draft segments instead of appending.
context
object
No description.
allowHostedAi
boolean
Must be true when this operation uses Pipeline hosted inference.

Example

TypeScripttypescript
await pipeline.createSegment({
"workspaceId": "00000000-0000-4000-8000-000000000000",
"allowHostedAi": true
})

Response

The operation is available, but its typed response schema has not been published yet.

Exceptions

PipelineError
Thrown for validation, authentication, JSON-RPC, HTTP, and network failures. Inspect code and data when present.
Pipeline TypeScript SDK documentation | Pipeline