Inference Providers

Create custom OpenAI-compatible gateway provider

Changed on

Adds an OpenAI-compatible provider to AI Gateway with a name, its API address (public HTTPS or operator-approved; a trailing /chat/completions is removed), one API key and its models (models.dev-shaped settings, usually from discover-models). Creates the provider, an "All Allowed Models" group, an organization credential set with the key and grants to allMembers, memberIds and teamIds, and returns management details. Test with custom/test-connection first; this route does not call the provider. The key is write-only. Requires the Manage Gateway providers permission and enabled Gateway management; session callers must recently reauthenticate.

post/v1/inference-providers/custom

Request

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

Request body

object required
name, string required
baseUrl, string required
apiKey, string required
models, object[] required
discoveryStatus, 'detailed' | 'basic' | 'unavailable'
listedModelIds, string[]
allMembers, boolean
memberIds, string[]
teamIds, string[]

Response

Create custom OpenAI-compatible gateway provider

object required
inferenceProvider, GatewayProviderDetails required

Changes

    • info

      added the optional property inferenceProvider/litellm/signInCheck to the response with the status

    • warning

      added the new oauth_oidc enum value to the inferenceProvider/credentials/items/kind response property for the response status

    • warning

      added the new oidc enum value to the inferenceProvider/litellm/keySource/anyOf[subschema #1] response property for the response status

    2 more changes in this revision