sdkHosted AI, explicit consent
Generate content
pipeline.generateContent
Generate a LinkedIn post using the workspace voice config, content examples, and intelligence context. The route requires workspace_id as a query param (auto-injected from the API key when present). Returns hook + body + cta + alternatives + reasoning.
Parameters
workspaceId
string
Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client.
workspace_id
string
Workspace UUID (sent as ?workspace_id query param). Auto-injected with API key auth.
workspace_slug
string
Optional workspace slug for the agent context.
topicrequired
string
What the post should be about (10-5000 chars).
postType
string
No description.
thought_leadership | lead_magnet | case_study | personal_story
postLength
string
No description.
short | medium | long
linkedinAccountId
string
Optional - pin the post to a specific account voice.
hookStyle
string
No description.
question | contrarian | story | statistic | bold_claim | curiosity_gap
regenerateInstructions
string
User feedback when iterating on a previous draft.
previousPost
string
Previous post content for regeneration context.
strategyContext
object
No description.
allowHostedAi
boolean
Must be true when this operation uses Pipeline hosted inference.
Example
TypeScripttypescript
await pipeline.generateContent({"topic": "example","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.