Skip to main content
Once OpenClaw is installed and your gateway is running, configure it to route all AI model calls through Fhddos. You only need your Fhddos API key — no individual provider credentials for OpenAI, Anthropic, or Google. Fhddos’s unified endpoint handles authentication and routing to whichever model you choose.

Prerequisites

1

Obtain a Fhddos API key

Sign in to the Fhddos console and create an API key. The key format is sk-xxxx. The Fhddos base URL is https://aiapi.fhddos.com.
2

Verify OpenClaw is installed and running

Confirm the OpenClaw CLI is installed and the gateway starts without errors. See Install & Launch if you haven’t completed that step yet.

Protocol overview

Fhddos proxies requests to different AI providers while presenting a consistent interface. OpenClaw supports all three protocols Fhddos exposes — choose the one that matches the model family you want to use.
ProtocolEndpoint patternSupported models
OpenAI (GPT protocol)POST /v1/chat/completions or POST /v1/responsesGPT series and any OpenAI-compatible model
Anthropic (Claude protocol)POST /v1/messagesClaude series
Google (Gemini protocol)POST .../models/{model}:generateContentGemini series
You can configure one protocol or all three simultaneously. Set agents.defaults.model.primary to whichever model you want OpenClaw to use by default.

Edit the OpenClaw configuration file

Open ~/.openclaw/openclaw.json in your editor and add the provider blocks for the protocols you need.
The examples below use JSON5 syntax (comments and trailing commas are allowed). If your environment requires strict JSON, remove all comments and trailing commas before saving. Replace model IDs with the exact IDs shown in your Fhddos console — they are case-sensitive and must match precisely.

GPT via the OpenAI protocol

Use this block for GPT models and any other OpenAI-compatible model available in Fhddos.
{
  agents: {
    defaults: {
      model: { primary: "fhddos-openai/gpt-5.4" },
    },
  },

  models: {
    mode: "merge",
    providers: {
      "fhddos-openai": {
        baseUrl: "https://aiapi.fhddos.com",
        apiKey: "${FHDDOS_API_KEY}",
        api: "openai-completions",
        // Add extra request headers here if your Fhddos project requires them:
        // headers: { "X-Fhddos-Project": "xxx" },
        models: [
          { id: "gpt-5.4", name: "GPT 5.4 (via Fhddos, OpenAI protocol)" },
        ],
      },
    },
  },
}

Claude via the Anthropic protocol

Use this block for Claude models. Fhddos proxies the Anthropic messages API natively.
{
  agents: {
    defaults: {
      model: { primary: "fhddos-anthropic/claude-opus-4-6" },
    },
  },

  models: {
    mode: "merge",
    providers: {
      "fhddos-anthropic": {
        baseUrl: "https://aiapi.fhddos.com",
        apiKey: "${FHDDOS_API_KEY}",
        api: "anthropic-messages",
        models: [
          { id: "claude-opus-4-6", name: "Claude Opus 4.6 (via Fhddos, Anthropic protocol)" },
        ],
      },
    },
  },
}

Gemini via the Google protocol

Gemini uses Google’s native protocol, which differs from both OpenAI and Anthropic. No api field is required.
{
  agents: {
    defaults: {
      model: { primary: "google/gemini-3-pro-preview" },
    },
  },

  models: {
    mode: "merge",
    providers: {
      google: {
        baseUrl: "https://aiapi.fhddos.com",
        apiKey: "${FHDDOS_API_KEY}",
      },
    },
  },
}

Configuration field reference

FieldDescription
agents.defaults.model.primaryOpenClaw’s default model, in provider/model format
models.providers.*.baseUrlFhddos gateway entry point for the protocol
models.providers.*.apiKeyYour Fhddos API key (use an environment variable)
models.providers.*.apiProtocol type: openai-completions for GPT or anthropic-messages for Claude; omit for Gemini
models.providers.*.models[].idExact model ID from the Fhddos console — must match character for character
models.providers.*.models[].nameDisplay name shown in the OpenClaw Web UI
Configure only the protocols you actually need. If you want multiple protocols active at the same time, add each provider block and set agents.defaults.model.primary to your preferred default.

Store your API key as an environment variable

Avoid writing your Fhddos API key directly into the configuration file. Export it as an environment variable instead:
export FHDDOS_API_KEY="YOUR_FHDDOS_API_KEY"
Reference it in your config with ${FHDDOS_API_KEY}. Make sure the process that starts OpenClaw inherits this variable — set it in your shell profile (.bashrc, .zshrc) or your process manager’s environment configuration.

Restart the gateway

Apply your configuration changes by restarting the gateway. Direct start:
openclaw gateway --port 18789 --verbose
Daemon / systemd mode:
systemctl --user restart openclaw-gateway.service
After restarting, run a health check to confirm the gateway is up:
openclaw doctor

Verify the integration

Test protocol connectivity with curl

Run the appropriate command for each protocol you configured. GPT (OpenAI protocol):
curl -X POST "https://aiapi.fhddos.com/v1/chat/completions" \
  -H "Authorization: Bearer ${FHDDOS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [{ "role": "user", "content": "Hello — introduce yourself in one sentence." }],
    "temperature": 0.7
  }'
Claude (Anthropic protocol):
curl -X POST "https://aiapi.fhddos.com/v1/messages" \
  -H "Authorization: Bearer ${FHDDOS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-6",
    "max_tokens": 1024,
    "messages": [{ "role": "user", "content": "Hello — introduce yourself." }]
  }'
Gemini (Google protocol):
curl -X POST "https://aiapi.fhddos.com/v1beta/models/gemini-3-pro-preview:generateContent" \
  -H "Authorization: Bearer ${FHDDOS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{ "parts": [{ "text": "Hello" }] }]
  }'

Test from the OpenClaw CLI

openclaw agent --message "Confirm that you are responding through the Fhddos model gateway."
A successful response means:
  • The terminal prints generated text from the model.
  • The Call Logs / Monitoring section of the Fhddos console shows the corresponding request.

Test from the Web UI

  1. Open the OpenClaw Web UI (usually http://127.0.0.1:18789).
  2. Navigate to Models and confirm your Fhddos provider entries are listed.
  3. Open WebChat or Playground, select a Fhddos-backed model, send a message, and verify you receive a valid response.

Troubleshooting

  • Confirm your Fhddos API key is correct, unexpired, and has sufficient permissions.
  • Test the key directly with the curl commands above to isolate whether the issue is in Fhddos or OpenClaw.
  • If using ${FHDDOS_API_KEY}, verify the variable is set in the terminal session that started OpenClaw (echo $FHDDOS_API_KEY).
  • Open the Fhddos console and copy the model ID exactly as shown — including any prefix and capitalization.
  • Update models.providers.*.models[].id in openclaw.json to match, then restart the gateway.
  • Confirm OpenClaw is reading ~/.openclaw/openclaw.json (check the path printed at startup).
  • Verify that agents.defaults.model.primary uses the provider/model format and that the model ID matches the entry in models[].id exactly.
  • If you use environment variables, make sure they are exported in the same process that runs OpenClaw.
  • Check basic connectivity: curl -I https://aiapi.fhddos.com
  • Confirm each baseUrl in your configuration is set to https://aiapi.fhddos.com.
  • If you use a proxy, ensure the OpenClaw process is configured to route through it.