Saltar al contenido
Documentación de la API

Autenticación

Creating API keys, using bearer tokens, key security and rate limit headers.

Every request requires an API key. The key is sent in the Authorization header using the Bearer scheme; keys are not accepted as query parameters.

Encabezado de solicitud

Add the header below to every request. If it is missing or the key is invalid, a 401 response is returned.

Authorization: Bearer ab_live_xxxxxxxxxxxxxxxxxxxxxxxx

¿Dónde obtengo mi clave?

Las claves API se generan exclusivamente desde el panel de clientes API en www.astrosabio.com/api-panel; su cuenta del sitio web principal no otorga acceso a la API. Cree su cuenta de cliente API allí, adquiera un plan o paquete y genere su clave.

Ir al Panel API

Ciclo de vida de la clave

  1. Creación The full key value is shown only once at creation time; afterwards only the last characters are visible.
  2. Rotación You can keep as many parallel keys as your plan allows, switching to a new one before retiring the old.
  3. Cancelación Revoke a suspected leaked key instantly from the panel; requests made with a revoked key receive 401.

Formato de clave

Live keys start with the ab_live_ prefix. The prefix makes it easy to detect a key that was accidentally shared in a codebase.

No expongas la clave en el cliente

API keys must live server-side only. Keys placed in a browser, a mobile app bundle or a public repository are exposed to credit drain and abuse.

Encabezados de límite de velocidad

Every response carries headers reporting your remaining allowance. When the limit is exceeded a 429 is returned and the Retry-After header tells you how many seconds to wait.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
Retry-After: 24