Security, credits & access
- Credits. The nine media tools —
generate_image,edit_image,img2img,create_variations,resize_image,upscale_image,remove_background,vectorize_image, andgenerate_video— draw from your organization’s shared credit pool at the app’s rates. Reads and model management are free. Check the balance any time withget_credit_balance. - Scopes. Every tool requires a scope. An API key or OAuth token only exposes the tools its scopes allow — narrow a key to exactly what an integration needs.
- Revoking access. An admin revokes an API key in Settings → API Keys; revocation is terminal and takes effect on the very next call. For an OAuth connection, disconnect the connector in your client (Claude or ChatGPT connector settings); access tokens can also be revoked at Samsa’s OAuth revocation endpoint. A revoked credential stops working immediately.
Troubleshooting
Repeated sign-in prompts or 401s
Repeated sign-in prompts or 401s
A
401 is the server asking the client to (re)authenticate.- OAuth clients: disconnect the Samsa connector and reconnect to restart the sign-in. If consent never completes, tell us at support@samsa.ai.
- API-key clients: confirm the header is exactly
Authorization: Bearer samsa_sk_...and the key is valid — a missing, expired, or revoked key returns401 invalid_api_key. Create a fresh key in Settings → API Keys if in doubt.
Which organization am I acting as?
Which organization am I acting as?
A credential always acts for one organization. An API key acts for the
organization that owns it — to act for a different org, use a key created in
that org. An OAuth connection acts for the account and organization you
signed in with — reconnect to switch. Credits are drawn from, and assets
appear in, that organization.
Tool call rejected — insufficient credits
Tool call rejected — insufficient credits
If the balance this connection can spend can’t cover a generation, the submit tool
returns a structured error before any job runs — nothing is charged. Which code you
get depends on the connection’s budget scope:
insufficient_credits when the organization has
no active teams,
insufficient_team_credits when it is bound
to a budgeted team, or
insufficient_unallocated_credits
when it is not. An operational failure inside the deduction falls back to the generic
insufficient_credits whatever the regime — retry before buying credits — and a
budget-exempt system organization stays under the org regime even with active
teams. Check get_credit_balance — its available is the number a job’s cost
must fit into, and its scope names the budget regime; under team or unallocated,
compare plan_credits with scope.remaining to see which one is binding (under org,
scope.remaining is null and only plan_credits can bind) — then top up, raise the
team’s budget, or
upgrade in the Samsa app. Reads are always free.Rate limited or too many jobs
Rate limited or too many jobs
Three independent limits can slow a burst of calls:
- Per-key request rate — 60 requests/minute; excess returns
rate_limited. - Per-organization concurrency — at most 5 in-flight jobs at once; a sixth
returns
too_many_active_jobs. Let jobs finish (pollget_job_status) before submitting more. - MCP transport concurrency — a burst of simultaneous
/mcprequests on a single worker can return a transient429 concurrency_limit_exceededwithRetry-After: 1. Wait one second and retry.
A tool is missing or says it lacks a scope
A tool is missing or says it lacks a scope
Tools you can’t call are hidden or rejected because the connected credential
lacks their scope. For example,
generate_image needs images.generate. Edit the key’s scopes (or issue a new
key) in Settings → API Keys, then reconnect.
