TypeScript SDK: Embeddings

⚠️
Preview — this feature is being built; the design below is the spec.

Vectors for search and similarity.

import Syntic from '@syntic/sdk'
 
const client = new Syntic() // reads SYNTIC_API_KEY
MethodEndpointReturns
embeddings.createPOST /v1/embeddingsEmbeddingResponse

Methods

embeddings.create

Embed one string or a list of up to 2,048 strings. Maps to POST /v1/embeddings.

const result = await client.embeddings.create({
  model: "syntic-embed-1",
  input: [
    "refund policy",
    "shipping times"
  ]
})

Conventions

Every method accepts a final options object with headers, query, timeout, maxRetries and signal (an AbortSignal). List methods return pages that work with for await across all pages.

See the TypeScript SDK overview for installation, errors and retries.

Was this page helpful?