Python SDK reference
⚠️
Preview — this feature is being built; the design below is the spec.
Method-by-method reference for the syntic Python package. Each page lists the methods for one resource, the endpoint each calls, what it returns, and an example.
Client options
| Option | Default | Meaning |
|---|---|---|
api_key | SYNTIC_API_KEY env var | Inference key. |
base_url | https://app.syntic.ai/v1 | Override for testing against a mock server. |
timeout | 600 s (non-streaming) | Per request; accepts an httpx.Timeout. |
max_retries | 2 | Retries on 408, 409, 429, 5xx and connection errors, with exponential back-off honouring Retry-After. |
default_headers | {} | Added to every request, e.g. syntic-version. |
http_client | built in | Bring your own httpx.Client for proxies or custom TLS. |
from syntic import Syntic, AsyncSyntic
client = Syntic(max_retries=4, default_headers={"syntic-version": "2026-11-01"})
aclient = AsyncSyntic() # same methods, awaitableError classes
| Class | HTTP status |
|---|---|
syntic.BadRequestError | 400 |
syntic.AuthenticationError | 401 |
syntic.QuotaExhaustedError | 402 |
syntic.PermissionDeniedError | 403 |
syntic.NotFoundError | 404 |
syntic.ConflictError | 409 |
syntic.UnprocessableEntityError | 422 |
syntic.RateLimitError | 429 |
syntic.InternalServerError | 5xx |
syntic.APIConnectionError | network failure, no response |
Each HTTP error has .status_code, .code (the error envelope’s code), .request_id and .body.
Was this page helpful?