Authentication
Every edge v1 endpoint is protected. Requests authenticate with an organization-scoped df_ API key, supplied either as a bearer token or via a machine-local default credential.
This page covers how to use an existing key. If you do not have a df_ API key for your organization yet, request one from your Deepfaic administrator.
Bearer token
Send the key in the Authorization header on every request:
curl http://<edge-host>:9123/v1/health \
-H "Authorization: Bearer df_..."
The key is verified locally on the edge host.
Machine-local default credential
If you omit the Authorization header, the edge API falls back to the credential stored in api_cred.txt. During install this file is created at <runtime-root>/api_cred.txt and mounted into the API container.
When it contains a valid df_ key, callers on the edge machine can make headerless requests:
# Equivalent to sending the key in the Authorization header,
# as long as <runtime-root>/api_cred.txt holds a df_ key.
curl http://<edge-host>:9123/v1/health
If neither an Authorization header nor a populated api_cred.txt is present, the request is rejected with 401.
Errors
| Code | Condition |
|---|---|
401 | Missing key, malformed Authorization header, invalid key format, key fails verification, or token org does not match the configured organization. |
422 | Authenticated but requesting a model the key is not allowed to run. |