API reference

Platforms

Sub-keys for platforms, and providers serving their own endpoint.

On this page

GET/v1/platform/keys

The platform's sub-keys.

Auth: Platform key (Authorization: Bearer $USDF_PLATFORM_KEY) or the platform account's own session. An ordinary API key is refused 403 not_platform_key. See Platforms and providers.

No parameters.

GET /v1/platform/keys

curl
curl https://api.usdf.fi/v1/platform/keys \
  -H "Authorization: Bearer $USDF_PLATFORM_KEY"

POST/v1/platform/keys/{id}/revoke

Revokes one sub-key.

Auth: Platform key (Authorization: Bearer $USDF_PLATFORM_KEY) or the platform account's own session. An ordinary API key is refused 403 not_platform_key. See Platforms and providers.

NameTypeRequiredDescription
idstringYesPath. The sub-key id.

POST /v1/platform/keys/{id}/revoke

curl
curl -X POST https://api.usdf.fi/v1/platform/keys/{id}/revoke \
  -H "Authorization: Bearer $USDF_PLATFORM_KEY"

GET/v1/platform/usage

Usage across sub-keys.

Auth: Platform key (Authorization: Bearer $USDF_PLATFORM_KEY) or the platform account's own session. An ordinary API key is refused 403 not_platform_key. See Platforms and providers.

NameTypeRequiredDescription
end_user_refstringNoQuery. Only this end user's.

GET /v1/platform/usage

curl
curl https://api.usdf.fi/v1/platform/usage \
  -H "Authorization: Bearer $USDF_PLATFORM_KEY"

GET/v1/providers

Registered providers.

Auth: None

No parameters.

GET /v1/providers

curl
curl https://api.usdf.fi/v1/providers

POST/v1/providers

Registers your own endpoint. Every field is on the Platforms and providers page, under Serve your own endpoint.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
namestringYesThe provider's name.
slugstringNoIts id in the catalog.
base_urlstringYesYour OpenAI-compatible endpoint, https.
authobjectNoThe header and value the gateway sends your endpoint.
modelsarrayYesThe models you serve, each with its prices.
data_policyobjectNoWhat your endpoint keeps of a request.

POST /v1/providers

curl
curl -X POST https://api.usdf.fi/v1/providers \
  -H "Authorization: Bearer $SESSION" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Compute", "slug": "acme", "base_url": "https://api.example.com/v1", "auth": {"header": "authorization", "value": "Bearer sk-..."}, "data_policy": {"retains": false, "trains": false, "region": "us"}, "models": [{"id": "llama-3.3-70b-instruct", "upstream_model": "acme/llama-70b", "input_price": 0.08, "output_price": 0.2, "context": 65536, "max_output": 8192}]}'

GET/v1/referrals

The account's referrals.

Auth: API key (Authorization: Bearer sk_…) or a session

No parameters.

GET /v1/referrals

curl
curl https://api.usdf.fi/v1/referrals \
  -H "Authorization: Bearer $USDF_API_KEY"
Foundry documentation

Confirm it's you

Confirm to continue the action you started.

Checking confirmation options…