v1 · Beta
SYNCROF API
Authenticate, meter, and route AI payments programmatically. Every call is billed against your prepaid wallet.
Quickstart
- Sign in or create an account.
- Fund your wallet. Your first API key is emailed automatically after the first successful top-up.
- Copy your key from the email or your account page.
- Make your first authenticated call:
bash
curl https://api.syncrof.com/v1/wallet \
-H "Authorization: Bearer sk_test_your_key_here"Authentication
All requests use bearer authentication. Include your API key in the Authorization header:
http
Authorization: Bearer sk_test_...- Keys prefixed
sk_test_operate against the sandbox;sk_live_against production. - Keys are shown once at creation. Store them in a secrets manager — never commit them to source control.
- Compromised keys can be rotated from your account page.
GET /v1/wallet
Returns your current wallet balance and environment.
Request
bash
curl https://api.syncrof.com/v1/wallet \
-H "Authorization: Bearer sk_test_your_key_here"Response · 200
json
{
"balance_cents": 5000,
"currency": "usd",
"environment": "sandbox"
}Node.js
javascript
const res = await fetch("https://api.syncrof.com/v1/wallet", {
headers: { Authorization: `Bearer ${process.env.SYNCROF_API_KEY}` },
});
const wallet = await res.json();Usage & metering
Every authenticated request is metered. We record the endpoint, HTTP method, status code, units consumed, and cost in cents. Review activity on your account page — requests over the last 30 days are aggregated per endpoint, per day.
Wallet debits: costed endpoints automatically debit your prepaid balance. Calls fail with
402 insufficient_funds when the wallet cannot cover the request.Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing, malformed, or revoked API key. |
| 402 | insufficient_funds | Wallet balance too low for this call. |
| 404 | not_found | Resource does not exist. |
| 429 | rate_limited | Too many requests. Back off and retry. |
| 500 | internal_error | Something went wrong on our end. |
Roadmap
- POST /v1/completions — unified AI completion routing across providers.
- POST /v1/embeddings — unified embeddings.
- Webhooks — subscribe to wallet, key, and usage events.
- SDKs — official TypeScript and Python clients.
Building against SYNCROF? Reach out — we'd love to hear what you're building.