SDKs

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

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

github.com/syntext-dev/syntext-sdk-go

syntext on PyPI. Sync and async clients.

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

All SDKs authenticate with a project API key:

import { Syntext } from '@syntext/sdk'
const client = new Syntext('stx_abc12345_...')
import "github.com/syntext-dev/syntext-sdk-go"

client := syntext.NewClient("stx_abc12345_...")
from syntext import Syntext
client = 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/types — see Errors

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

Was this page helpful?