API referenceEmbeddings

Embeddings

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/embeddings

An embedding turns a piece of text into a list of numbers (a vector). Texts with similar meaning get vectors that are close together, so you can search by meaning, group similar items, find duplicates and recommend related content. The request and response follow the widely used OpenAI-compatible embeddings shape, so existing client code works after changing the base URL and key.

When to use it

  • Semantic search and retrieval for a knowledge base (then pass the best passages to chat, with citations).
  • Clustering support tickets or feedback by topic.
  • Finding near-duplicate records.
  • Recommending “similar items”.

Authentication

Authorization: Bearer sk_live_..., Content-Type: application/json.

Request body

FieldTypeRequiredDetails
modelstringYessyntic-embed-1.
inputstring or array of stringsYesUp to 2,048 strings, each up to 8,192 tokens, 300,000 tokens per request in total. Empty strings are not allowed.
dimensionsintegerNoShorten vectors to 256, 512 or 1,024 (default 1,024). Shorter vectors use less storage at a small cost in quality.
encoding_formatstringNofloat (default) or base64 (smaller response).
input_typestringNodocument or query. Use document when indexing and query when searching for slightly better matches. Default document.
userstringNoEnd-user id, as on Request parameters.

Response

{
  "object": "list",
  "model": "syntic-embed-1",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, 0.0789] },
    { "object": "embedding", "index": 1, "embedding": [0.0021, 0.0334, -0.0102] }
  ],
  "usage": { "prompt_tokens": 18, "total_tokens": 18 }
}
FieldDescription
data[].indexPosition of the input this vector belongs to.
data[].embeddingThe vector: dimensions floats (or a base64 string of little-endian float32). Vectors are normalised to length 1, so cosine similarity equals the dot product.
usage.prompt_tokensTokens billed.

Examples

curl https://app.syntic.ai/v1/embeddings \
  -H "Authorization: Bearer $SYNTIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "syntic-embed-1",
    "input": ["How do I reset my router?", "Router factory reset steps"],
    "input_type": "document"
  }'

Errors

Unified envelope.

StatuscodeparamCause
400input_requiredinputMissing or empty.
400input_too_longinput[i]One string over 8,192 tokens.
400too_many_inputsinputOver 2,048 strings or 300,000 tokens.
400invalid_dimensionsdimensionsNot 256, 512 or 1,024.
404model_not_foundmodelUnknown embedding model. Chat models cannot embed.
429rate_limitedOver the per-minute token limit.

Limits and pricing

Price$0.02 per million tokens (usage credits). Included in plan allowances at a weight of 1 embedding token = 0.01 chat input tokens.
Rate limit1,000,000 tokens per minute per organisation on the first tier
BatchesNot available for embeddings; send up to 2,048 inputs per request instead

Vectors from different embedding models are not comparable. If the model changes, re-embed your stored documents.

Build notes for the platform team

  • Serve from a hosted embedding model under the Syntic name; confirm licence terms before launch.
  • Normalise vectors server-side. Truncate for dimensions only if the model was trained for it; otherwise offer just the native size.
  • Separate usage line embeddings in reports.
Was this page helpful?