Contents

Authentication

Send the API key as a bearer token. Keys start with sail_.

Header
Authorization: Bearer sail_7f3a9c2e1b8d4f6a0c5e2b9d7a1f3c8e
  • A key is shown once, at creation. It is stored as a hash and cannot be shown again. A lost key is revoked and replaced.
  • A key works in every region unless you restrict it. The base URL you call picks the region. Rules on the keys page limit a key to regions or models, whatever the client sends.
  • Revoke a key from the keys page. Requests using it fail within a minute, in every region.
  • Keep keys server-side. A key in a browser or a mobile app is public.

A request without a valid key returns 401 with the code invalid_api_key.

These docs as plain text for coding agents: llms.txt