Agents and integrations

Use Foundry with n8n.

Give n8n an OpenAI credential with the gateway's address and your key, and run its AI nodes on 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.

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

Create a new OpenAI credential and fill it in as below:

FieldValue
API KeyYour key
Organization ID (optional)Leave empty.
Base URLhttps://api.usdf.fi/v1
  1. Add the OpenAI Chat Model node to a root node such as AI Agent, and pick the credential above. The node sends its requests to the credential's Base URL.
  2. In Model, switch from From List to ID and enter a model id, such as claude-sonnet-5-5. Every id is on Models.
  3. Leave Use Responses API off: the node then sends chat completions.

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…