NetBird Full API Reference + Read-Only MCP Prototype
POST/api/agent-network/catalog/providers/models

Discover the models a provider credential can reach

Asks the vendor which models the supplied credential can actually use, so the provider form can offer a live list instead of only the static catalog. The endpoint, auth header and response shape are taken from the catalog entry, never from the request.

Supply either an api_key together with the upstream_url being configured (before the provider is saved), or a provider_id of an existing record to reuse its stored credential.

Returns 422 for a catalog provider that has no listing endpoint (most gateways); the caller should fall back to the catalog's own model list. A model whose price the shipped table does not know is returned with pricing_known false, and the operator must set rates for it.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

4 body fields
api_keystringoptional
Credential to query the vendor with, for a provider that has not been saved yet. Mutually exclusive with provider_id.
catalog_provider_idstringrequired
Catalog provider to query (AgentNetworkCatalogProvider.id). Determines the listing endpoint, the auth header and the response shape.
provider_idstringoptional
Existing Agent Network provider record to query with. Its stored credential is used, and its upstream unless upstream_url overrides it, so the form can refresh the list without the client holding the key.
upstream_urlstringoptional
The upstream being configured. Used to reach vendors that serve their listing from the same host as inference, and to read back the region for those whose host embeds one. Sent alongside provider_id, it overrides the stored upstream, so an edit can be listed against the URL on the form before it is saved.

6 status codes
200The models the credential can reach
modelsarray<object>required
Models the credential can reach, in the order the vendor returned them.
400Bad Request
401Requires authentication
403Forbidden
422Validation failed
500Internal Server Error

Error handling

A 400 is returned: Bad Request. A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 422 is returned: Validation failed. A 500 is returned: Internal Server Error.