Quickstart: SynapseX API
This page takes you from no account to a completed chat completion against the
SynapseX OpenAI-compatible API. By the end you will have a workspace, a credit
balance, a working sk-synapsex-… key, and a response body returned by
https://platform.synapsex.ai/api/v1/chat/completions.
The API platform is a separate product from SynapseX Chat, with its own account, its own keys and its own balance. A chat subscription grants nothing here.
Step 1: Create your API platform account
Go to https://platform.synapsex.ai/auth/register and register with your name, email and a password of at least 8 characters — or choose Continue with Google.
A personal workspace is created for you automatically on first sign-in. That workspace owns your API keys, your credits and your usage history, so there is nothing else to set up.
Step 2: Buy credits — this is mandatory
Go to /dashboard/credits in the console and buy a credit pack.
With a zero balance, every API call fails before any model runs, with HTTP 402:
{"error":{"message":"Insufficient credits","type":"insufficient_quota"}}There is no way around this step. Billing here is pay-as-you-go: there is no monthly subscription to buy, and 1 credit = US$1.00.
| Pack | You pay | You receive |
|---|---|---|
| Starter | $25 | $25 in credits |
| Builder | $100 | $100 in credits |
| Scale | $500 | $525 in credits |
| Growth | $1,000 | $1,100 in credits |
Step 3: Create an API key
Go to /dashboard/api-keys and create a key.
The sk-synapsex-… value is shown exactly once, at creation. Copy it
immediately and store it in a secret manager or an environment variable — only a
hash is kept on the server, so it cannot be shown to you again. New keys are
created with the chat:write scope, which is what the chat completions endpoint
requires.
Step 4: Make your first call
The base URL is https://platform.synapsex.ai/api/v1 — that is the customer
endpoint, and it is the only base URL you should point a client at.
export SYNAPSEX_API_KEY=sk-synapsex-YOUR-API-KEY
curl https://platform.synapsex.ai/api/v1/chat/completions \
-H "Authorization: Bearer $SYNAPSEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "synapsex-forge-code-14b-v1",
"messages": [{"role": "user", "content": "Hello!"}]
}'The response is a standard OpenAI chat.completion object, so the assistant’s
text is at choices[0].message.content.
Why this model, and how to find the others
The example uses synapsex-forge-code-14b-v1 because it is one of the ids
available to customer API keys, which makes it a safe first call.
To see the catalog:
curl https://platform.synapsex.ai/api/v1/models \
-H "Authorization: Bearer $SYNAPSEX_API_KEY"Be aware of one thing before you pick an id from that response: /models
returns the SynapseX model catalog, and it is not filtered down to the models
your key is allowed to call. Some ids in the list are refused with HTTP 403
when you actually use them. The 403 body names the models that are available
on the public API, so if you hit one, take an id from that message rather than
trying the list one entry at a time.
Step 5: Call it from Python
With the SynapseX SDK
pip install synapsex-platformfrom synapsex_platform import LLMClient # not "from synapsex import ..."
client = LLMClient() # reads SYNAPSEX_API_KEY from the environment
resp = client.chat_completions(
model="synapsex-forge-code-14b-v1",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp["choices"][0]["message"]["content"])The package is synapsex-platform and the import is synapsex_platform. There
is a different, unrelated package on PyPI called synapsex — installing that
one will not give you this client.
With the stock OpenAI SDK
Because the wire format is OpenAI-compatible, you can keep the client you already use and change two lines:
from openai import OpenAI
client = OpenAI(
api_key="sk-synapsex-YOUR-API-KEY",
base_url="https://platform.synapsex.ai/api/v1",
)
resp = client.chat.completions.create(
model="synapsex-forge-code-14b-v1",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)The four errors you are most likely to hit first
| Status | Meaning | Fix |
|---|---|---|
| 401 | Invalid or expired API key | Check the header is Authorization: Bearer sk-synapsex-…, and that the key was not deleted |
| 402 | Insufficient credits | Buy a credit pack at /dashboard/credits |
| 403 | The key does not have the chat:write scope, or the model id is not available on the public API | Create a new key — new keys get chat:write by default. If the message names the model, use one of the model ids it lists |
| 429 | Rate limited | Back off and retry with exponential backoff and a retry cap |
Full error shapes and the complete list: API errors.
Next steps
- Authentication — key formats, scopes and headers
- Chat completions — the request and response in full
- OpenAI compatibility — which parameters are forwarded
- Credits and spending — spend limits and usage reporting