Getting started

Authentication

Create an API key in the Silvertext app, send it as a Bearer token on every request, and scope it to what your integration does.

Create a key

Keys are created in the Silvertext app under Account, then API. A key is shown once, at creation, and can be revoked at any time. An account can hold up to five live keys, so a staging integration and a production one can carry different keys, and a leaked key can be rotated without downtime.

The first key on an account grants 1,500 starter credits once, so the first requests need no card.

Send it

Every request carries the key in the Authorization header:

Authorization: Bearer st_live_…

The API also accepts the same key in an x-api-key header for clients that cannot set Authorization. Prefer the Bearer form; it is the one every example here uses.

Scopes

Each key carries the scopes it was created with. A call that needs a scope the key lacks answers 403 insufficient_scope.

Prop

Type

Endpoints outside the public API answer 403 key_not_permitted to a key no matter its scopes; the reference lists exactly what a key can reach.

Keep keys server-side

A key in client code is a key anyone can read

Call the API from your backend, a serverless function, or an agent runtime you control. Store the key in an environment variable or a secrets manager, never in source control, and revoke a key the moment you suspect it leaked.

Test the key

Terminal
curl https://api.silvertext.com/v1/me/usage \
  -H "Authorization: Bearer $SILVERTEXT_API_KEY"

A 200 with your credit position means the key works. A 401 invalid_api_key means the key is unknown or revoked.

On this page