Libraries
Synex is a plain HTTP + JSON API you can call from any language or framework — no SDK required. There is no official first-party client library yet, so the documentation shows raw requests for cURL, JavaScript (fetch), and Python (requests). The small helpers below give you a typed-enough starting point in each.
Everything you need is a bearer token and a base URL. If we publish official SDKs in the future, they'll wrap exactly these endpoints — building against the HTTP API today means you won't have to migrate.
A tiny client
Wrap the base URL and your API key once, then reuse it for every call. These are the exact patterns used throughout the resource docs.
Minimal client
# Keep these in your shell profile or a .env file
export SYNEX_API_KEY="synex_sk_..."
export SYNEX_API="https://api.synexcloud.com/v1"
# Then every call is just:
curl -s $SYNEX_API/ontologies -H "Authorization: Bearer $SYNEX_API_KEY"
Conventions worth building in
Whichever language you use, bake these into your client once:
- Auth — send
Authorization: Bearer synex_sk_...on every request. See Authentication. - Idempotency — add an
Idempotency-Keyheader toPOSTs you might retry. See Idempotency. - Pagination — follow
next_cursoruntilhas_moreisfalse. See Pagination. - Errors — branch on
error.typethenerror.code; retry429/5xxwith backoff. See Errors.