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/v1Requests 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
- Sign in at chat.synapsex.ai .
- Open Settings → API Keys.
- Name the key and click Create key.
- 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:
| Scope | Unlocks |
|---|---|
intelligence | Chat completions, Intelligence operations, model catalog |
compute | Agent/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
| Status | Meaning |
|---|---|
401 | Missing, invalid, revoked or expired credential |
403 | The key lacks the scope/capability for this endpoint |
429 | Your plan’s usage allowance or rate limit was reached |
5xx | Service 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 API | Platform API | |
|---|---|---|
| Base URL | chat.synapsex.ai/api/v1 | platform.synapsex.ai/api/v1 |
| Credential | sxc_… personal key | sk-synapsex-… key |
| Personal tools & scripts | ✅ | ✅ |
| SynapseX Desktop / CLI | ✅ | — |
| SaaS / customer backends | — | ✅ |
| Workloads serving third parties | — | ✅ |
| Billing | your subscription | metered credits |
Building for customers? Start with the Platform API overview.