Skip to Content

SynapseX Account API

The SynapseX Account API lets you use your SynapseX account from personal tools, scripts, CLI clients and compatible applications. Technically it is the Chat API served at:

https://chat.synapsex.ai/api/v1

Requests use the subscription entitlements and usage limits associated with your SynapseX account — the same plan, the same monthly allowance and the same model access you have in the web chat. One account, one allowance, every surface.

Building a SaaS product, a customer-facing application, a shared backend or a workload that serves third parties? Use the SynapseX Platform API instead. The Account API extends your own account to your own tools; the Platform API is the developer product for software you ship to others. See Two accounts, two key formats.

Create an API key

  1. Sign in at chat.synapsex.ai .
  2. Open Settings → API Keys.
  3. Name the key and click Create key.
  4. Copy the sxc_… value immediately.

The plaintext is shown exactly once — only a SHA-256 hash is stored. Keys can be revoked at any time from the same list, and a key’s scopes determine which endpoints it can call. Full details: Personal API keys.

Store the key like any secret — an environment variable or a secret manager, never in code or version control:

export SYNAPSEX_API_KEY="sxc_..."

Authentication

Every request carries the key as a bearer token:

curl https://chat.synapsex.ai/api/v1/models \ -H "Authorization: Bearer $SYNAPSEX_API_KEY"

List models — GET /api/v1/models

Returns the model catalog for your account: the same models you see in the web chat, with your current plan attached so clients can tell which tiers your subscription unlocks. The catalog evolves — always discover models from this endpoint rather than hard-coding ids.

Chat completions — POST /api/v1/chat/completions

An OpenAI-compatible completions endpoint. Requires a key with the intelligence scope (keys created today carry it by default).

curl https://chat.synapsex.ai/api/v1/chat/completions \ -H "Authorization: Bearer $SYNAPSEX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "<MODEL_ID>", "messages": [ { "role": "user", "content": "Explain quantum error correction in two sentences." } ] }'

Replace <MODEL_ID> with an id from GET /api/v1/models.

Python (OpenAI SDK)

import os from openai import OpenAI client = OpenAI( api_key=os.environ["SYNAPSEX_API_KEY"], base_url="https://chat.synapsex.ai/api/v1", ) response = client.chat.completions.create( model="<MODEL_ID>", messages=[{"role": "user", "content": "Hello from SynapseX"}], ) print(response.choices[0].message.content)

TypeScript / JavaScript

import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.SYNAPSEX_API_KEY, baseURL: "https://chat.synapsex.ai/api/v1", }); const response = await client.chat.completions.create({ model: "<MODEL_ID>", messages: [{ role: "user", content: "Hello from SynapseX" }], }); console.log(response.choices[0].message.content);

Streaming

Set "stream": true for server-sent events with OpenAI-compatible chunks. To receive token usage in-band on the final chunk, add "stream_options": {"include_usage": true}.

Other OpenAI-compatible clients can connect by overriding the base URL, subject to the protocol features each client requires.

Scopes

A key’s scopes are set when it is created and shown in the key list:

ScopeUnlocks
intelligenceChat completions, Intelligence operations, model catalog
computeAgent/Desktop/CLI operations, model catalog

Keys created from Settings → API Keys today carry both. Older keys may carry only compute; requests outside a key’s scopes are refused with 403 — create a new key to pick up the current defaults.

The /api/v1/agent/* endpoints exist for the SynapseX Desktop and CLI clients (scope compute). Their contract is documented with those clients rather than here.

Errors

StatusMeaning
401Missing, invalid, revoked or expired credential
403The key lacks the scope/capability for this endpoint
429Your plan’s usage allowance or rate limit was reached
5xxService or upstream provider failure

Authentication and authorization errors use a flat body, with a stable machine code on authorization refusals:

{ "error": "This credential does not grant \"chat.complete\".", "code": "INSUFFICIENT_CAPABILITY" }

Request and quota errors on /chat/completions use the OpenAI-style envelope:

{ "error": { "message": "...", "type": "insufficient_quota" } }

Usage and limits

Requests through the Account API consume the usage allowance associated with your SynapseX account. Limits and model availability depend on your plan and entitlements, and programmatic usage counts toward the same limits as the web chat. Usage is governed by the account’s plan, entitlements, quotas and usage policies.

Account API vs Platform API

Account APIPlatform API
Base URLchat.synapsex.ai/api/v1platform.synapsex.ai/api/v1
Credentialsxc_… personal keysk-synapsex-… key
Personal tools & scripts
SynapseX Desktop / CLI
SaaS / customer backends
Workloads serving third parties
Billingyour subscriptionmetered credits

Building for customers? Start with the Platform API overview.