Agents and integrations

Use Foundry with Kilo Code.

Add Foundry to Kilo Code as a custom provider with the gateway's address and your key, and run Kilo Code 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.

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

  1. Open Settings (the gear icon) and go to the Providers tab.
  2. Scroll down and click Custom provider.
  3. Fill in the dialog as in the table below, then click Submit.
FieldValue
Provider IDfoundry
Display nameFoundry
Provider APIOpenAI Compatible
Base URLhttps://api.usdf.fi/v1
API keyYour key
ModelsThe ids to offer, such as claude-sonnet-5-5 and claude-haiku-5-5
HeadersLeave empty: the key is sent as a Bearer token.

The models you added then appear in Kilo Code's model picker.

Kilo Code works through tool calls, so pick models that call tools. claude-sonnet-5-5 for the work and claude-haiku-5-5 for small tasks are the gateway's choice now. Every id is on Models, and GET /v1/models lists the models that serve now.

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…