API Guides
How to call Sinana's services directly from your own code — authentication, quotas, errors, and billing.
Getting started
Sinana is one platform for the AI capabilities your business needs — translation, sentiment analysis, image recognition, and transcription today, with more on the way. Every capability is called the same way: one request, one response, metered against one monthly plan allowance.
There are two ways to use a live service today:
- The Playground — sign in and call any live service directly from your browser. No code required.
- Your own code — call the same HTTP endpoints the Playground uses, using the same sign-in session (see Authentication below).
Authentication
Every live service today is authenticated the same way: a Cognito-issued ID token, sent as a standard bearer token.
Authorization: Bearer <id_token>
To get a token for testing outside the browser:
- Sign in at the top of any Playground page.
- Open your browser's dev tools → Application/Storage → Session Storage → find the key
sinana_id_token. - Use that value as the bearer token in
curl, Postman, or your own code.
Rate limits & quotas
Every plan includes a monthly request allowance shared across every live service:
| Plan | Requests / month | Over the limit |
|---|---|---|
| Free | 100 | Blocked (402) until next month or you upgrade |
| Starter | 2,000 | Billed $0.02 / request |
| Pro | 10,000 | Billed $0.015 / request |
| Business | 60,000 | Billed $0.01 / request |
One "request" is one call to Translation, Sentiment, or Image. Transcription isn't counted — it runs on a separate path that doesn't currently attribute usage to a signed-in account.
Hitting the Free plan's limit returns:
HTTP 402
{
"error": "quota_exceeded",
"plan": "free",
"used": 100,
"quota": 100,
"message": "Free plan limit reached — upgrade to continue."
}
Beyond the monthly count, a few endpoints cap the size of a single request:
| Service | Limit | Applies to |
|---|---|---|
| Translation | 5,000 characters | Free plan only — paid plans are uncapped |
| Sentiment | 5,000 characters | Every plan |
| Image | 5 MB | Every plan |
| Transcription | 4 MB | Every plan |
Errors & status codes
Every error response is a JSON object with at least an error field naming the problem.
| Status | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request — missing field, invalid input, or over a size limit. The error field explains which. |
| 401 | Missing, invalid, or expired bearer token |
| 402 | Free-plan quota exceeded — see Rate limits & quotas above |
| 502 | Upstream model or gateway error — safe to retry |
| 504 | Transcription only: the job timed out |
Billing & plans
Plans are self-service. Subscribe or upgrade from Usage & billing — checkout is handled by Stripe. Once subscribed, use Manage subscription on the same page to change plans, update payment details, or cancel — that also opens a Stripe-hosted page, so your payment details never touch Sinana's servers directly.
Your current usage — total requests this month, and a per-service breakdown of counts and last-used times — is on the same page once you're signed in.
Service reference
Each live service's request/response schema and a runnable curl example live
on that service's own page, right next to the "try it live" tool: