Inference Providers

Fetch models from a custom OpenAI-compatible provider

Changed on

Calls GET {baseUrl}/models on an OpenAI-compatible provider with its API key (or, with inferenceProviderId, the saved key of that custom provider, only for its saved address's origin) and returns each model with suggested models.dev-style settings, matched against the models.dev OpenRouter catalog. status is detailed (OpenRouter-style entries), basic (ids only) or unavailable (with a reason). The address must be public HTTPS or approved by the operator. 10-second timeout, 5 MB and 500 models at most. Nothing is stored. Requires the Manage Gateway providers permission and enabled Gateway management; a person must send it, never the agent or an API key. Limited to 20 per member and 60 per organization every ten minutes.

post/v1/inference-providers/custom/discover-models

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

union required
object required
OR
object required

Response

Fetch models from a custom OpenAI-compatible provider

GatewayCustomDiscoverResponse required
status, 'detailed' | 'basic' | 'unavailable' required
baseUrl, string required
reason, string nullable required
upstreamStatus, integer nullable required
models, object[] required

Changes

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed subschema #2 from the response body anyOf list for the response status

    • info

      added the optional property message to the response with the status

    1 more change in this revision