Bearer authentication
For OpenAI-compatible endpoints, send the full key as Authorization: Bearer YOUR_API_KEY. Preserve the space after Bearer. A masked key, fingerprint, or truncated value cannot authenticate.
curl --fail-with-body https://formalengines.com/inference/v1/billing/balance \
-H "Authorization: Bearer $FE_API_KEY"Model discovery is public. A successful GET /models request does not prove that your key works; use the authenticated balance endpoint above.
Create and manage keys
The API keys dashboard is the simplest way to create an additional key. Existing keys remain active until revoked. A new key belongs to the same account and shares that account’s credit and pricing.
curl --fail-with-body https://formalengines.com/inference/v1/keys \
-H "Authorization: Bearer $FE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"production-server"}'A successful creation returns HTTP 201 with the new plaintext in api_key and metadata in key. Save the plaintext immediately. GET /keys lists metadata only. Treat the create response as a secret; do not log it.
| Method | Path, relative to the base URL | Purpose |
|---|---|---|
| GET | /keys | List key metadata |
| POST | /keys | Create a key |
| PATCH | /keys/{fingerprint} | Update per-key limits |
| DELETE | /keys/{fingerprint} | Revoke a key; the final active key cannot be revoked here |
Rotate without interrupting clients
Create a new key, update your application’s secret, verify an authenticated request, then revoke the old key. Revocation affects future requests that use the old key. Account discounts apply to all keys on the account; a key name does not create a separate billing account.