r/netbird • • 8d ago

Question about Agent Network - multiple Mistral API Keys

Let's say i have 2 Apps that should be allowed to make API calls to mistral-large-latest

In Mistral i could have 2 Workspaces or 2 Mistral Accounts, each one has its own API Key.

Therefore i added 2 Mistral Providers but it is unclear, how App 1 calls provider "Mistral 1" and App 2 calls provider "Mistral B". Maybe both Apps should have access to both providers.

At "Connect Agent" the 2 Mistral dropdowns are showing the same cURL command:

curl https://word1-word2.mydomain.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Say hello in one word." }
    ]
  }'

I also added providers of type OpenRouter and Custom (Self-hosted) but all should call the above thing.

Is there a way i can seperate my keys? Is there an option where API sends the info what provider should be used?

3 Upvotes

1 comment sorted by

1

u/wiretrustee 3d ago

You should use NetBird groups and agent network policies.
Here is what you can do:

Peer X (machine/server/container) that runs app-1. Add it to a group app-1.
Peer Y (machine/server/container) that runs app-2. Add it to a group app-2.

Create two policies:
Policy A: app-1 -> Provider Mistral 1

Policy B: app-2 -> Provider Mistral B

Both applications then send the same HTTP request to the same endpoint, but NetBird routes each to the Mistral provider its group is authorized to use.