FIDUCY

Gateway API

The SDK wraps all of these. You only need this page for custom clients.

Every response is JSON { data, message }, except provider proxy responses, which are passed through untouched.

Authentication

Server calls send the app secret: authorization: Bearer fsk_.... The widget's POST /keys is authenticated by the browser origin instead.

Endpoints

Method and pathWho calls itPurpose
GET /healthanyoneLiveness
GET /attestation?nonce=anyoneNitro attestation document for the running enclave
GET /widget?app=&origin=the iframeKey entry page. CSP locks frame-ancestors to origin
POST /keysthe iframeSeal a key. Returns { handle } or { handle, record }
DELETE /keys/:keyIDyour serverRevoke (Fiducy-stored records only)
ANY /{provider}/...your serverProxy to the provider with the user's key

Provider proxy

ProviderGateway base URL
OpenAI/openai/v1
Anthropic/anthropic/v1
Gemini/gemini/v1beta
OpenRouter/openrouter/api/v1

Headers:

HeaderValue
authorizationBearer fsk_... (your app secret, not the user's key)
x-key-handlekh_...
x-key-recordbase64url JSON record, only in app-owned mode

Errors from the gateway itself:

StatusMeaning
400Missing or malformed handle or record
401Bad app secret
403The handle belongs to another app or cannot open its key, or a key was added outside the widget
404No key with this ID for this app
409Revoke through the gateway on an app that stores its own records. Delete the record instead
429The key reached its monthly request limit