Skip to main content

Hosts & Gateways

Fireworks AI

Call Fireworks AI models through your Verdictan gateway. Your Fireworks key stays on the gateway, and your application calls the gateway with its application token.

Fireworks names every model by its full resource name, accounts/<account>/models/<model>. Use that full name in the configuration and in each request. Verdictan does not shorten it or add the account segment.

Before you start​

  • A working gateway from the quickstart.
  • A Fireworks AI API key, and the full resource name of one model that the key can use.
  • The gateway startup command, and a separate application token for test requests.

Configure the provider​

Keep /inference at the end of base_url:

policy-config.yaml
pack:
  name: fireworks-integration
  version: 1.0.0
  enabled: true
policies:
  chain:
    - prompt-injection
providers:
  targets:
    - id: fireworks-primary
      provider: fireworks
      model: "accounts/replace-with-account/models/replace-with-model"
      base_url: https://api.fireworks.ai/inference
      secret_key_ref:
        env: VERDICTAN_FIREWORKS_API_KEY

The gateway appends /v1/chat/completions, so requests go to /inference/v1/chat/completions. It sends the key from VERDICTAN_FIREWORKS_API_KEY as a Bearer token.

Start and verify​

With CLI 0.1.14 or later, deploy this file through the test gateway's agent. Wait for In sync. Then send the request with the complete Fireworks resource name.

With the quickstart in Docker, follow the container steps instead of steps 1 to 3.

  1. In the gateway terminal, set the key and lint the file:

    export VERDICTAN_FIREWORKS_API_KEY="<provider-api-key>"
    verdictan policy lint --file policy-config.yaml
  2. Restart the test gateway with the key in its environment.

  3. Deploy the file to the test agent in Configurations. If that agent already runs pack.version 1.0.0, increase the version first. Then wait for the gateway log line connected read model refresh applied updated config with your version as config_version. Try the change on a test gateway has the steps.

  4. In a second terminal, send a request with the full resource name:

    export VERDICTAN_CLIENT_TOKEN="<application-token>"
    curl --fail-with-body http://127.0.0.1:41002/v1/chat/completions \
      -H "Authorization: Bearer ${VERDICTAN_CLIENT_TOKEN}" \
      -H "Content-Type: application/json" \
      -d '{"model":"accounts/replace-with-account/models/replace-with-model","messages":[{"role":"user","content":"Reply with Hello."}]}'

choices[0].message.content contains the reply, and the request appears in History when capture is on, or in the delivered events.

Supported requests​

RequestSupport
Chat CompletionsYes. Streaming and tools work if the model supports them.
MessagesTranslated to Chat Completions
Responses, embeddings, image input, response_format, parallel tool callsNo

Failure behavior​

ProblemWhat to check
401 from the gatewayThe application token is active, and the key is set on the gateway host.
Provider authentication errorVERDICTAN_FIREWORKS_API_KEY is set in the gateway process. Restart the gateway.
404 or model not foundbase_url ends in /inference, and the model is the full resource name that your key can use.
capability.unsupported_familyThe request is Chat Completions or Messages.
Provider 429 or another upstream errorThe response body and your Fireworks limits. See Error Handling.

Limits​

  • Model names, prices, rate limits, and data terms are in the Fireworks AI documentation.
  • Base models and your own account models use the same name shape. Confirm the key can use the one you configure.
  • A listener on a non-loopback address needs TLS and network controls.

Next steps​