---
title: "Create LiteLLM gateway provider"
method: POST
path: "/v1/inference-providers/litellm"
tags: ["Inference Providers"]
---

# Create LiteLLM gateway provider

`POST /v1/inference-providers/litellm`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/inference-providers/litellm`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Connects the organization's own LiteLLM proxy and syncs its models. mode=entra is for a proxy that accepts sign-in tokens instead of LiteLLM keys: it stores the Entra app registration (oauthTenantId, oauthClientId, write-only oauthClientSecret), one API scope (oauthScope) and the model list (modelIds), creates an "All LiteLLM models" group granted to the given audiences, reads nothing from the proxy, and each person then signs in with Microsoft through oauth/start. mode=oidc is the same for a proxy that validates the company's own OpenID Connect access tokens (JWT auth), when the organization has SSO model sign-in: it checks and stores the authorization server's issuer (oidcIssuer, whose discovery document must name exactly that issuer), the app people sign in through (oauthClientId, write-only oauthClientSecret), one or more API scopes (oidcScope) and modelIds, and each person signs in once with company SSO; 403 feature_disabled when the organization does not have it. mode=org stores one organization LiteLLM key used for everyone, creates an "All LiteLLM models" group granted to the given audiences, and keeps OpenWork spend tracking and limits on. mode=member stores a LiteLLM admin key used only to sync models and teams; each person then connects their own LiteLLM key, which picks the shared group matching that key's models. The given audiences are granted the empty "Can connect a LiteLLM key" group, and OpenWork spend tracking is off because LiteLLM budgets those keys. Keys are write-only. Requires the Manage Gateway providers permission and Gateway management; session callers must recently reauthenticate.

## Request body

- union
  - object
    - `name` string
    - `baseUrl` string, required: LiteLLM proxy URL, with or without /v1.
    - `mode` 'org' | 'member' | 'issued', required: org: one organization LiteLLM key for everyone, with OpenWork spend tracking. member: each person connects their own LiteLLM key. issued: OpenWork creates a LiteLLM key for each allowed person, found by their OpenWork email. In member and issued modes apiKey is a LiteLLM admin key and OpenWork spend tracking is off.
    - `issueStrategy` 'per_team' | 'mirror': issued mode. per_team: one key per LiteLLM team the person belongs to, or one key without a team when they are in none. mirror: a copy of their oldest active key (team, models, aliases, tags, expiry; never key-level budgets or rate limits).
    - `mirrorFallback` 'per_team' | 'error': issued + mirror: for someone with no key to copy, create per-team keys, or report them and create nothing.
    - `apiKey` string, required: Organization key (org mode) or admin key (member and issued modes). Write-only.
    - `allMembers` boolean
    - `memberIds` string[]
    - `teamIds` string[]
  - object
    - `name` string
    - `baseUrl` string, required: LiteLLM proxy URL, with or without /v1.
    - `mode` 'entra', required: entra: the proxy accepts sign-in tokens instead of LiteLLM keys (LiteLLM JWT auth). Each allowed person signs in with Microsoft Entra ID, and their own access token is sent to LiteLLM. No LiteLLM key is stored, nothing is synced, and OpenWork spend tracking is off.
    - `oauthTenantId` string, required: Directory (tenant) ID of the Entra ID tenant, a GUID.
    - `oauthClientId` string, required: Application (client) ID of the Entra app registration people sign in to.
    - `oauthClientSecret` string, required: A client secret of that app registration. Write-only.
    - `oauthScope` string, required: One API scope that app registration exposes, for example api://<application-id>/access. LiteLLM must accept access tokens for it; Microsoft Graph and Azure Cognitive Services scopes are refused.
    - `modelIds` string[], required: The LiteLLM model names people may use. OpenWork holds no LiteLLM key in this mode, so it cannot read them from the proxy.
    - `allMembers` boolean
    - `memberIds` string[]
    - `teamIds` string[]
  - object
    - `name` string
    - `baseUrl` string, required: LiteLLM proxy URL, with or without /v1.
    - `mode` 'oidc', required: oidc: the proxy accepts sign-in tokens instead of LiteLLM keys (LiteLLM JWT auth), and people sign in with the company's own OpenID Connect identity provider, such as Okta. Each person signs in once on the identity provider's page; OpenWork then refreshes their token in the background. No LiteLLM key is stored, nothing is synced, and OpenWork spend tracking is off. Requires the SSO model sign-in feature.
    - `oidcIssuer` string, required: Issuer URL of the authorization server people sign in with, exactly as its discovery document names it, for example https://example.okta.com/oauth2/default. OpenWork reads <oidcIssuer>/.well-known/openid-configuration. It must issue signed access tokens (JWTs) LiteLLM can check; Okta's org authorization server does not, so use a custom one.
    - `oauthClientId` string, required: Client ID of the OIDC web app people sign in to.
    - `oauthClientSecret` string, required: A client secret of that app. Write-only.
    - `oidcScope` string, required: The API scopes that authorization server issues LiteLLM access tokens for, separated by spaces, for example litellm. OpenWork adds openid, profile and offline_access itself.
    - `modelIds` string[], required: The LiteLLM model names people may use. OpenWork holds no LiteLLM key in this mode, so it cannot read them from the proxy.
    - `allMembers` boolean
    - `memberIds` string[]
    - `teamIds` string[]

## Response `201`

Create LiteLLM gateway provider

- object
  - `inferenceProvider` GatewayProviderDetails, required
    - `modelIds` string[], required: Provider universe policy: [] follows all supported catalog models; nonempty restricts to these IDs. Does not grant group membership.
    - `pinnedModelIds` string[], required: Ordered catalog model IDs in management responses; only caller-usable gwm aliases in public list/connect responses. Pins never grant access.
    - `catalogWarning` string
    - `id` string, typeid, required: Den TypeID with 'ipr_' prefix and a 26-character base32 suffix.
    - `providerId` string, required
    - `name` string, required
    - `source` 'openwork_gateway', required
    - `credentialMode` 'org' | 'member', required
    - `credentialStatus` 'ready' | 'member_auth_required' | 'org_credential_missing', required
    - `authUrl` string, nullable, required
    - `status` 'active' | 'disabled', required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time, required
    - `providerConfig` object, required
    - `models` object[], required
      - `id` string, required
      - `name` string, required
      - `config` object, required
        - `id` string, required
      - `upstreamModelId` string, required
      - `modelGroupId` string, typeid, required: Den TypeID with 'gmg_' prefix and a 26-character base32 suffix.
      - `modelGroupName` string, required
      - `credentialSetId` string, typeid, required: Den TypeID with 'gcs_' prefix and a 26-character base32 suffix.
      - `credentialSetName` string, required
    - `modelAssignmentsComplete` boolean, required: True only when models and authorizationRequests.models represent every effective active grant's model alias within the provider universe. False for credential, catalog, or model configuration omissions, even when aggregate credentialStatus is ready. Only true permits absence to establish model removal.
    - `authorizationRequests` object[], required
      - `credentialSetId` string, typeid, required: Den TypeID with 'gcs_' prefix and a 26-character base32 suffix.
      - `name` string, required
      - `authUrl` string, required
      - `models` object[]
        - `id` string, required
        - `name` string, required
        - `config` object, required
          - `id` string, required
        - `upstreamModelId` string, required
        - `modelGroupId` string, typeid, required: Den TypeID with 'gmg_' prefix and a 26-character base32 suffix.
        - `modelGroupName` string, required
        - `credentialSetId` string, typeid, required: Den TypeID with 'gcs_' prefix and a 26-character base32 suffix.
        - `credentialSetName` string, required
    - `migration` object
      - `llmProviderId` string, typeid, required: Den TypeID with 'lpr_' prefix and a 26-character base32 suffix.
      - `runtimeEnvNames` string[], required
    - `litellm` GatewayLiteLlmStatus
      - `mode` 'org' | 'member', required
      - `keySource` 'personal' | 'issued' | 'entra' | 'oidc', nullable, required
      - `issueStrategy` 'per_team' | 'mirror', nullable, required
      - `mirrorFallback` 'per_team' | 'error', nullable, required
      - `issuedMemberCount` integer, required
      - `attentionCount` integer, required
      - `attention` object[], required
        - `memberId` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
        - `name` string, nullable, required
        - `email` string, nullable, required
        - `reason` 'not_in_litellm' | 'no_key_to_mirror' | 'no_models' | 'error', required
      - `baseUrl` string, nullable, required
      - `spendTracking` boolean, required
      - `hasSyncKey` boolean, required
      - `lastSyncedAt` string, date-time, nullable, required
      - `lastSyncError` string, nullable, required
      - `modelCount` integer, required
      - `teamCount` integer, required
      - `connectedMemberCount` integer, required
      - `entraScope` string: keySource entra: the API scope members' Microsoft access tokens are issued for. Only for callers who hold Manage Gateway providers.
      - `oidcIssuer` string: keySource oidc: the issuer of the company identity provider members sign in with. Only for callers who hold Manage Gateway providers.
      - `oidcScope` string: keySource oidc: the API scope members' access tokens are issued for. Only for callers who hold Manage Gateway providers.
      - `signInCheck` GatewayLiteLlmSignInCheck, nullable
        - `at` string, date-time, required
        - `memberId` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
        - `memberName` string, nullable, required
        - `outcome` 'verified' | 'connected' | 'litellm_rejected' | 'missing_models' | 'failed', required: verified: LiteLLM accepted the person's token and listed the models. connected: signed in, but LiteLLM could not be reached to check. litellm_rejected: LiteLLM refused the token. missing_models: LiteLLM accepted it but did not list some configured models. failed: sign-in did not finish.
        - `step` 'identity_provider' | 'token_exchange' | 'identity' | 'litellm', nullable, required: Where a failed or rejected sign-in stopped: identity_provider (the identity provider refused), token_exchange, identity (the ID token did not verify) or litellm.
        - `code` string, nullable, required: A stable code: an OpenWork error code such as oauth_invalid_client, idp_<error> returned by the identity provider such as idp_access_denied, or a LiteLLM reason such as jwt_mismatch.
        - `httpStatus` integer, nullable, required
    - `truefoundry` GatewayTrueFoundryStatus: TrueFoundry providers: addresses, sync state and people OpenWork has no working token for. Never a key or token.
      - `controlPlaneUrl` string, nullable, required
      - `gatewayBaseUrl` string, nullable, required
      - `createMissingUsers` boolean, required
      - `trackUsageCosts` boolean, required: Track usage costs in OpenWork: models with public pricing are served priced, and requests to them count towards usage limits and usage tracking.
      - `hasAdminKey` boolean, required
      - `lastSyncedAt` string, date-time, nullable, required
      - `lastSyncError` string, nullable, required
      - `modelCount` integer, required: Models people are served.
      - `availableModels` object[], required: Every chat model TrueFoundry listed at the last sync, picked or not.
        - `id` string, required
        - `name` string, required
      - `selectedModelIds` string[], nullable, required: Models an admin picked, or null when people get every TrueFoundry model.
      - `activeMemberCount` integer, required
      - `createdUserCount` integer, required
      - `attentionCount` integer, required
      - `attention` object[], required
        - `memberId` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
        - `name` string, nullable, required
        - `email` string, nullable, required
        - `reason` 'not_in_truefoundry' | 'user_inactive' | 'token_limit' | 'no_models' | 'error', required
        - `message` string, nullable, required
    - `custom` GatewayCustomProviderStatus: Custom OpenAI-compatible providers: address, models and whether a key is stored (never the key). Only for callers who hold Manage Gateway providers.
      - `baseUrl` string, required
      - `models` object[], required
        - `id` string, required
        - `name` string
        - `attachment` boolean, required
        - `reasoning` boolean, required
        - `reasoning_options` union[]
          - union
            - object
              - …
            - object
              - …
        - `tool_call` boolean, required
        - `structured_output` boolean, required
        - `temperature` boolean, required
        - `modalities` object, required
          - `input` string[], required
          - `output` string[], required
        - `limit` object, required
          - `context` integer, required
          - `output` integer, required
        - `cost` object
          - `input` number
          - `output` number
          - `cache_read` number
          - `cache_write` number
      - `discovery` object, required
        - `status` 'detailed' | 'basic' | 'unavailable', required
        - `lastFetchedAt` string, date-time, nullable, required
        - `listedModelIds` string[]
      - `hasKey` boolean, required
    - `settings` object, required
    - `modelGroups` object[], required
      - `name` string, required
      - `description` string, nullable, required
      - `modelIds` string[], required
      - `status` 'active' | 'disabled', required
      - `id` string, typeid, required: Den TypeID with 'gmg_' prefix and a 26-character base32 suffix.
    - `credentialSets` object[], required
      - `id` string, typeid, required: Den TypeID with 'gcs_' prefix and a 26-character base32 suffix.
      - `name` string, required
      - `createdAt` string, date-time
      - `createdBy` object, nullable: Who created the set. Omitted unless the caller holds Manage Gateway providers.
        - `id` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
        - `name` string, nullable, required
        - `email` string, nullable, required
      - `credentialMode` 'org' | 'member', required
      - `status` 'active' | 'disabled', required
      - `configured` boolean, required
      - `credentialStatus` 'ready' | 'member_auth_required' | 'org_credential_missing', required
      - `oauthClientId` string, nullable
      - `hasOauthClientSecret` boolean
      - `oauthTenantId` string, nullable
      - `awsSso` object, nullable
        - `startUrl` string, required
        - `region` string, required
        - `accountId` string, required
        - `roleName` string, required
    - `accessGrants` object[], required
      - `modelGroupId` string, typeid, required: Den TypeID with 'gmg_' prefix and a 26-character base32 suffix.
      - `credentialSetId` string, typeid, required: Den TypeID with 'gcs_' prefix and a 26-character base32 suffix.
      - `audience` union, required
        - object
          - `type` 'organization', required
        - object
          - `type` 'team', required
          - `teamId` string, typeid, required: Den TypeID with 'tem_' prefix and a 26-character base32 suffix.
        - object
          - `type` 'member', required
          - `memberId` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
      - `id` string, typeid, required: Den TypeID with 'ipa_' prefix and a 26-character base32 suffix.
    - `oauthCallbackUrl` string
    - `credentials` object[]: Per-person credential rows. Only for callers who hold Manage Gateway providers.
      - `id` string, typeid, required: Den TypeID with 'ipc_' prefix and a 26-character base32 suffix.
      - `credentialSetId` string, typeid, required: Den TypeID with 'gcs_' prefix and a 26-character base32 suffix.
      - `subject` string, required
      - `orgMembershipId` string, typeid, nullable, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
      - `memberName` string, nullable, required
      - `memberEmail` string, nullable, required
      - `kind` 'api_key' | 'api_key_map' | 'aws_keys' | 'gcp_service_account' | 'oauth_google' | 'oauth_azure' | 'aws_sso' | 'oauth_oidc', required
      - `status` 'active' | 'revoked' | 'refresh_failed', required
      - `expiresAt` string, date-time, nullable, required
    - `credentialCounts` object: Credential counts by status, returned instead of credentials to callers who may only view providers.
      - `total` integer, required
      - `active` integer, required
      - `revoked` integer, required
      - `refreshFailed` integer, required
  - `sync` object, required
    - `modelCount` integer, required
    - `groupCount` integer, required
    - `teamCount` integer, required
    - `members` object, required
      - `matched` integer, required
      - `rejected` integer, required
      - `unavailable` integer, required
      - `removed` integer, required
    - `warnings` string[], required
    - `issued` object
      - `people` integer, required
      - `keys` integer, required
      - `notInLiteLlm` integer, required
      - `noKeyToMirror` integer, required
      - `noModels` integer, required
      - `errors` integer, required
      - `removed` integer, required

## Other responses

- `400`: Invalid request or provider configuration.
- `401`: Sign-in required.
- `403`: Access denied or Gateway management disabled.
- `404`: Resource not found.
- `409`: Selection or resource conflict.

## Changes

- **2026-11-30** `75c644595afb`: 1 info
  - added the optional property `inferenceProvider/litellm/signInCheck` to the response with the `201` status
- **2026-11-29** `eb74df3e353d`: 2 warning, 3 info
  - added the new `oauth_oidc` enum value to the `inferenceProvider/credentials/items/kind` response property for the response status `201`
  - added the new `oidc` enum value to the `inferenceProvider/litellm/keySource/anyOf[subschema #1]/` response property for the response status `201`
  - added `subschema #3` to the request body `oneOf` list
  - added the optional property `inferenceProvider/litellm/oidcIssuer` to the response with the `201` status
  - …1 more
- **2026-11-18** `fbba8745503c`: 1 info
  - added the required property `inferenceProvider/truefoundry/trackUsageCosts` to the response with the `201` status
- **2026-11-18** `863deef8adb4`: 1 breaking, 10 warning, 2 info
  - the request's body type changed from `object` to no type
  - removed the request property `allMembers`
  - removed the request property `apiKey`
  - removed the request property `baseUrl`
  - …9 more
- **2026-11-17** `a98c89d60588`: 2 info
  - added the required property `inferenceProvider/truefoundry/availableModels` to the response with the `201` status
  - added the required property `inferenceProvider/truefoundry/selectedModelIds` to the response with the `201` status

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/inference-providers/litellm/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
