api.syncropic.com, managed inference
OpenAI-compatible inference gateway for Syncropel customers. Use any OpenAI SDK with your Syncropel API key: one endpoint, several models, usage records in your own workspace, and quotas that follow your subscription.
In short
api.syncropic.com is an OpenAI-compatible inference gateway run by Syncropic. Point any OpenAI SDK at https://api.syncropic.com/v1 with your Syncropel API key and you get:
- One endpoint, several leading models, no per-provider API keys
- The OpenAI Chat Completions request and response format, so every major SDK works without changes
- Quotas that follow your subscription and appear on your hosted workspace bill
- A record of every call in your own workspace, with cost, tokens and tier
Most customers don't call api.syncropic.com directly. Your hosted workspace does it for you when your CLI or workspace runs a model-backed task. This page is for customers who want to call it from their own code (scripts, application backends, custom agents).
What it is
A managed inference gateway: one HTTPS endpoint in the OpenAI format, with several models behind it. You set it up once and get whichever model you name in the request.
┌────────────────────────┐
your client / app ─→│ api.syncropic.com │─→ backing model
│ auth · quota · audit │
└────────────────────────┘You don't manage per-model API keys. Your Syncropel subscription decides what you can call, the gateway sends the request to the right model, and you get a normal OpenAI-style response back. A record of each call lands in your workspace, so you can query cost and usage.
Authentication
Send a bearer token on the Authorization header:
Authorization: Bearer <your-syncropel-api-key>Three kinds of token are accepted:
| Token | Issued by | Use case |
|---|---|---|
| Workspace token | Hosted workspace setup | Your hosted workspace uses this automatically |
| User-issued API key | syncropel.com/account/api-keys | Your scripts and apps; each key can be revoked on its own |
| Self-host token | Your own spl serve | Customers running their own workspace |
Create a user-issued API key at syncropel.com/account/api-keys. Store the value in a secret manager. It is shown only once, when you create it.
For local testing:
export SYNCROPEL_API_KEY=sk-...your-key...Quick start (curl)
curl https://api.syncropic.com/v1/chat/completions \
-H "Authorization: Bearer $SYNCROPEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5",
"messages": [
{"role": "user", "content": "Say hello in one sentence."}
],
"max_tokens": 1500
}'The response is OpenAI-compatible:
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "claude-haiku-4-5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello, happy to help."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 7,
"total_tokens": 19
}
}Response headers carry Syncropel-specific cost data:
| Header | Meaning |
|---|---|
X-Syncropic-Cost-Cents | What this call cost you, in USD cents |
X-Syncropic-Tier | Tier the call was served from (paid, anonymous or self-host) |
X-Syncropic-Request-ID | Request ID for support; include it when you contact us |
Quick start (any OpenAI SDK)
Because the API is OpenAI-compatible, any OpenAI SDK works by changing the base URL:
Python (openai package)
from openai import OpenAI
client = OpenAI(
api_key="<your-syncropel-api-key>",
base_url="https://api.syncropic.com/v1",
)
response = client.chat.completions.create(
model="claude-haiku-4-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)TypeScript / Node
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.SYNCROPEL_API_KEY,
baseURL: "https://api.syncropic.com/v1",
});
const response = await client.chat.completions.create({
model: "claude-haiku-4-5",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);LangChain, LlamaIndex and other frameworks
Any framework that lets you set the OpenAI base URL works. Set:
- Base URL:
https://api.syncropic.com/v1 - API key: your Syncropel API key
Streaming responses
The gateway supports streaming Server-Sent Events (text/event-stream) when the request includes "stream": true. Set it on any chat completion request and consume the stream the same way you would against OpenAI directly.
curl https://api.syncropic.com/v1/chat/completions \
-H "Authorization: Bearer $SYNCROPEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5",
"stream": true,
"messages": [
{"role": "user", "content": "Write a one-line haiku about clean code."}
]
}'Python (openai SDK):
stream = client.chat.completions.create(
model="claude-haiku-4-5",
stream=True,
messages=[{"role": "user", "content": "Hello"}],
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)Notes:
- You pay for what you receive. You are billed for what was actually streamed to your client. If you cancel mid-stream, the record shows the partial token count.
- Records carry a
stream_statefield:"completed"for a normal end,"client_disconnect"if your client closed the connection before the model finished. - Limits are checked first. Your subscription, rate limit and spending cap are checked before the request starts, so a 429 or 402 comes back as a normal HTTP response, not inside the stream.
- The anonymous tier supports streaming on the included model, with the same limits as non-streaming requests.
Available models
Use the model name as listed below. Prices are what you pay, per 1M tokens.
| Model | Tier required | Approx. cost (per 1M tokens) |
|---|---|---|
claude-haiku-4-5 | Paid | $1.30 in / $6.50 out |
claude-sonnet-4-6 | Paid | $3.90 in / $19.50 out |
gpt-4o | Paid | $3.25 in / $13.00 out |
gemini-flash-1.5 | Anonymous + Paid | $0.10 in / $0.39 out |
gemini-pro | Paid | $1.63 in / $6.50 out |
The full, current model list with prices is available from the capabilities endpoint:
curl https://api.syncropic.com/v1/capabilities \
-H "Authorization: Bearer $SYNCROPEL_API_KEY"If your subscription includes inference credit, that credit is used first. Usage beyond it is added to your monthly invoice at the listed price.
Subscription tiers
Three tiers decide what you can use:
| Tier | Token | Models | Rate limit | Monthly cap |
|---|---|---|---|---|
| Paid | Workspace token or user-issued API key (with an active subscription) | All models | 60 req/min | Credit included in your subscription, then metered usage |
| Anonymous | None (no Syncropel account) | One included model | Low | A small daily message limit |
| Self-host | Self-host token | All models | 60 req/min | Pay as you go through your subscription |
The anonymous tier is for trying the gateway without a Syncropel subscription. It is limited to one low-cost model. Sign up for a paid plan to use the full model list.
See pricing for current subscription prices and what's included.
Rate limits and errors
Rate limits return 429 Too Many Requests with a Retry-After header (seconds):
HTTP/1.1 429 Too Many Requests
Retry-After: 30
Content-Type: application/json
{
"error": {
"code": "rate_limited",
"kind": "usage",
"message": "60 requests per minute on paid tier; retry in 30s",
"retry_after_seconds": 30,
"request_id": "req_abc123"
}
}Other common error codes:
| HTTP | error.code | Meaning |
|---|---|---|
| 401 | invalid_bearer | The token isn't recognized |
| 401 | invalid_jwt_signature | The token's signature doesn't verify |
| 402 | subscription_required | No active subscription; upgrade or use the anonymous tier |
| 402 | quota_exceeded | Subscription monthly cap exceeded |
| 429 | rate_limited | Per-minute rate limit hit; retry after retry_after_seconds |
| 503 | provider_error | The model is having problems; retry or try a different model |
| 503 | internal_error | Gateway error; report request_id to support |
Every error response includes a request_id. Include it when you contact support so we can find the request quickly.
A record of every call
Every successful call writes a record in your hosted workspace, on the th_audit_api_usage thread. Each record carries:
cost_usd: what the call cost youtokens_input,tokens_output: what was billedmodel: which model answeredtier: paid, anonymous or self-hostlatency_ms: how long the call tookendpoint,request_id: for tracing
Query the thread directly:
spl thread records th_audit_api_usage -o json \
| jq '.[] | .body | {cost_usd, model, tokens_input, tokens_output}'You can check monthly costs with a record query; no separate billing dashboard is needed.
Why use api.syncropic.com instead of a model provider directly
You don't have to. If you already have an API key for a model provider, you can call it directly. The gateway offers three things:
- One endpoint, many models. Switch from one model to another by changing one model string. No new API key, no new SDK.
- One bill. Your monthly invoice includes inference alongside your hosted workspace, with included credit, instead of several provider invoices.
- Usage in your own records. Cost and usage land in your workspace as records, queryable like any other data.
On cost alone, calling a provider directly can be cheaper if you only ever use one provider. The gateway is worth it when you use several models or want one bill and one audit trail.
See also
- Pricing: subscription tiers and included credit
- User-issued API keys: create, revoke and scope keys
- HTTP API reference: the Syncropel workspace API (a different endpoint with the same sign-in)
Media that plays
Audio and video are content your workspace presents and you interact with. Adding a new kind of playable media is a matter of writing a record.
AI clients, three integration patterns
Connect Syncropel to AI clients including Claude Desktop, Claude Code, Cursor, Cline, Zed, Kiro, OpenCode, Gemini CLI and Codex CLI. Three patterns (MCP, shell and programmatic) cover the main ways to connect.