Agents and integrations

Use Foundry with Open WebUI.

Add Foundry to Open WebUI as an OpenAI API connection, and chat with the gateway's models from your USDF balance.

On this page

You need a Foundry API key with USDF on its balance. Create one in the dashboard; see Accounts and keys.

Open WebUI reaches the gateway through its OpenAI-compatible API at https://api.usdf.fi/v1. Replace sk_YOUR_KEY below with your key.

  1. Go to Settings > Admin > Connections.
  2. In Manage OpenAI API Connections, click Add Connection.
  3. Set URL to https://api.usdf.fi/v1 and API Key to your key. Verify Connection checks both.
  4. Optionally, type model ids under Model IDs and click + after each. Left empty, Open WebUI offers every model the gateway lists.
  5. Click Save.

From the environment

A new Open WebUI server can take the same connection from its environment when it first starts:

Environment

OPENAI_API_BASE_URL=https://api.usdf.fi/v1
OPENAI_API_KEY=sk_YOUR_KEY

Open WebUI keeps these settings in its database after the first start. Change them later in Connections.

Open WebUI reads the model list from GET /v1/models, which lists every model that serves now, embedding, image and speech models included. To offer chat models alone, list their ids under Model IDs, such as claude-sonnet-5-5. Every id is on Models.

To check the key and the model on their own, send one request from a shell where USDF_API_KEY holds your key:

Check

curl -sS https://api.usdf.fi/v1/chat/completions \
  -H "Authorization: Bearer $USDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "messages": [{"role": "user", "content": "Say hello in one word"}], "max_tokens": 256}'
AnswerWhat it means
200The key and the model work. The answer ends with its receipt: what was charged, and the request id.
401 invalid_api_keyNo valid key reached the gateway. Send a key that starts with sk_.
402 insufficient_balanceThe balance does not cover the request. Add USDF; see Accounts and keys.
404 model_not_foundThe id is not one the gateway serves. The error names the closest ids; every id is on Models.

See every client and coding agent

Foundry documentation

Confirm it's you

Confirm to continue the action you started.

Checking confirmation options…