SDKs

Official client libraries for the Syntext REST API, with typed resource methods, automatic retries with exponential backoff, and typed errors.

@syntext/sdk on npm. Works in Node, Bun, Deno, and the browser.

Go and Python SDKs are on the roadmap. Until then, the REST API is plain JSON over HTTPS and works from any language.

Common Capabilities

Capability Notes
Projects Get, list, create, update, delete
Builds Trigger, list, get status, cancel
Search Query a project's search index
AI Chat Streaming answers with citations
Domains Add, verify, remove custom domains
API Keys Create, list, rotate, revoke

Authentication

The SDK authenticates with a project API key:

import { Syntext } from '@syntext/sdk'
const client = new Syntext('stx_abc12345_...')

Set the key via the SYNTEXT_API_KEY environment variable in CI rather than hardcoding it.

Errors & Retries

  • 429 and 5xx responses are retried automatically with exponential backoff
  • Errors are typed: not-found, validation, auth, and rate-limit errors are distinct classes — see Errors

Using another language? The REST API is plain JSON over HTTPS — everything the SDK does is available directly.

Was this page helpful?