Data Models¶
Pydantic models define request and response payloads. These appear under pulse.core.models and are used across the Core Client and Analyzer results.
Embeddings¶
EmbeddingsRequestinputs: list[str](1..2000)fast: bool | NoneEmbeddingDocumentid: str | Nonetext: strvector: list[float]EmbeddingsResponseembeddings: list[EmbeddingDocument]requestId: str | None
Similarity¶
UnitAggunit: Literal["sentence", "newline", "word"]– Text splitting unitagg: Literal["mean", "max", "top2", "top3"](default"mean") – Aggregation methodwindow_size: int(default 1, ≥1) – Window size for sliding window processingstride_size: int(default 1, ≥1) – Stride size for sliding window processingSplitset_a: UnitAgg | None– Splitting configuration for set_aset_b: UnitAgg | None– Splitting configuration for set_bSimilarityRequestset: list[str] | None(2-44,721 items) – Self-similarity input textsset_a: list[str] | None,set_b: list[str] | None– Cross-similarity setsfast: bool | None– Synchronous or asynchronousflatten: bool(default False) – Return flattened resultsversion: str | None– API versionsplit: Split | None– Text splitting configurationSimilarityResponsescenario: Literal["self", "cross"]mode: Literal["matrix", "flattened"]n: intflattened: list[float]matrix: list[list[float]] | NonerequestId: str | None- Property:
similarity -> list[list[float]]– Returns a full matrix regardless of mode.
Themes¶
ThemesRequestinputs: list[str](2-500 items) – Input textsminThemes: int | None(≥1) – Minimum number of themesmaxThemes: int | None(≤50) – Maximum number of themescontext: str | None– Context to steer theme generationversion: str | None– API version (use "2025-09-01" for ThemeSetsResponse)prune: int | None(0-25) – Pruning thresholdinteractive: bool | None– Enable interactive modeinitialSets: int | None(1-3) – Number of initial theme sets (requires interactive=True when >1)fast: bool | None– Synchronous or asynchronousThemeshortLabel: str– Concise 2-4 word namelabel: str– Descriptive titledescription: str– 1-2 sentence summaryrepresentatives: list[str](exactly two strings) – Representative input stringsThemesResponsethemes: list[Theme]requestId: str | NoneThemeSetsResponse(version 2025-09-01)themeSets: list[list[Theme]](max 3 sets) – Multiple theme setsrequestId: str | None
Sentiment¶
SentimentResultsentiment: Literal["positive", "negative", "neutral", "mixed"]confidence: floatSentimentResponseresults: list[SentimentResult]requestId: str | None- Property:
sentiments -> list[str]convenience accessor for labels.
Extractions¶
ExtractionsRequestinputs: list[str](1-5,000 items) – Input textsdictionary: list[str](3-200 terms) – Dictionary terms to extracttype: Literal["named-entities", "themes"](default "named-entities") – Extraction typeexpand_dictionary: bool(default False) – Expand dictionary with synonymsexpand_dictionary_limit: int | None– Limit for dictionary expansionsversion: str | None– API versionfast: bool | None– Synchronous or asynchronous- Deprecated fields:
category,texts,categories,use_ner,use_llm,threshold ExtractionsResponsecolumns: list[{ category: str, term: str }]matrix: list[list[str]]– Rows per input, columns aligned tocolumns.requestId: str | None
Clustering¶
ClusteringRequestinputs: list[str](2-44,721 items) – Input textsk: int(1-50) – Number of clustersalgorithm: Literal["kmeans", "skmeans", "agglomerative", "hdbscan"](default "kmeans") – Clustering algorithmfast: bool | None– Synchronous or asynchronousClusterclusterId: int– Cluster identifieritems: list[str]– Items assigned to this clusterClusteringResponsealgorithm: str– Algorithm used for clusteringclusters: list[Cluster]– List of cluster groupsrequestId: str | None
Summaries¶
SummariesRequestinputs: list[str]question: strlength: Literal["bullet-points", "short", "medium", "long"] | Nonepreset: Literal["five-point","ten-point","one-tweet","three-tweets","one-para","exec","two-pager","one-pager"] | Nonefast: bool | NoneSummariesResponsesummary: strrequestId: str | None
Usage Estimation¶
UsageEstimateRequestfeature: Literal["embeddings", "sentiment", "themes", "extractions", "summaries", "clustering", "similarity"]– Feature to estimateinputs: list[str](≥1) – Input texts for estimationUsageEstimateResponseusage: dict[str, Any]– Estimated usage information
Usage Tracking¶
UsageRecordfeature: str– Name of the featurequantity: int– Quantity consumed (replaces deprecatedunitsfield)- Property:
units -> int– Backward compatibility accessor forquantity UsageReporttotal: int– Total units consumedrecords: list[UsageRecord]– Per-feature usage records
Error Handling¶
ErrorDetailcode: str | None– Error codemessage: str– Error messagepath: list[str | int] | None– Path to the field that caused the errorfield: str | None– Field name that caused the errorlocation: Literal["body", "query", "header", "path"] | None– Location of the errorErrorResponsecode: str– Error codemessage: str– Error messageerrors: list[ErrorDetail] | None– Detailed field-level error informationmeta: dict[str, Any] | None– Additional metadata about the error