Sync LiteLLM models and groups
curl --request POST \
--url https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"inferenceProvider": {
"modelIds": [
"<string>"
],
"pinnedModelIds": [
"<string>"
],
"id": "<string>",
"providerId": "<string>",
"name": "<string>",
"source": "openwork_gateway",
"credentialMode": "org",
"credentialStatus": "ready",
"authUrl": "<string>",
"status": "active",
"updatedAt": "2023-11-07T05:31:56Z",
"providerConfig": {},
"models": [
{
"id": "<string>",
"name": "<string>",
"config": {
"id": "<string>"
},
"upstreamModelId": "<string>",
"modelGroupId": "<string>",
"modelGroupName": "<string>",
"credentialSetId": "<string>",
"credentialSetName": "<string>"
}
],
"authorizationRequests": [
{
"credentialSetId": "<string>",
"name": "<string>",
"authUrl": "<string>",
"models": [
{
"id": "<string>",
"name": "<string>",
"config": {
"id": "<string>"
},
"upstreamModelId": "<string>",
"modelGroupId": "<string>",
"modelGroupName": "<string>",
"credentialSetId": "<string>",
"credentialSetName": "<string>"
}
]
}
],
"settings": {},
"modelGroups": [
{
"name": "<string>",
"description": "<string>",
"modelIds": [
"<string>"
],
"status": "active",
"id": "<string>"
}
],
"credentialSets": [
{
"id": "<string>",
"name": "<string>",
"credentialMode": "org",
"status": "active",
"configured": true,
"credentialStatus": "ready",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"oauthClientId": "<string>",
"hasOauthClientSecret": true
}
],
"accessGrants": [
{
"modelGroupId": "<string>",
"credentialSetId": "<string>",
"audience": {
"type": "organization"
},
"id": "<string>"
}
],
"catalogWarning": "<string>",
"migration": {
"llmProviderId": "<string>",
"runtimeEnvNames": [
"<string>"
]
},
"litellm": {
"mode": "org",
"keySource": "personal",
"issueStrategy": "per_team",
"mirrorFallback": "per_team",
"issuedMemberCount": 0,
"attentionCount": 0,
"attention": [
{
"memberId": "<string>",
"name": "<string>",
"email": "<string>",
"reason": "not_in_litellm"
}
],
"baseUrl": "<string>",
"spendTracking": true,
"hasSyncKey": true,
"lastSyncedAt": "2023-11-07T05:31:56Z",
"lastSyncError": "<string>",
"modelCount": 0,
"teamCount": 0,
"connectedMemberCount": 0
},
"oauthCallbackUrl": "<string>",
"credentials": [
{
"id": "<string>",
"credentialSetId": "<string>",
"subject": "<string>",
"orgMembershipId": "<string>",
"memberName": "<string>",
"memberEmail": "<string>",
"kind": "api_key",
"status": "active",
"expiresAt": "2023-11-07T05:31:56Z"
}
]
},
"sync": {
"modelCount": 0,
"groupCount": 0,
"teamCount": 0,
"members": {
"matched": 0,
"rejected": 0,
"unavailable": 0,
"removed": 0
},
"warnings": [
"<string>"
],
"issued": {
"people": 0,
"keys": 0,
"notInLiteLlm": 0,
"noKeyToMirror": 0,
"noModels": 0,
"errors": 0,
"removed": 0
}
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Inference Providers
Sync LiteLLM models and groups
Reads the LiteLLM proxy with the stored organization key (org mode) or admin key (member mode) and refreshes the provider’s models. Org mode refreshes the “All LiteLLM models” group. Member mode refreshes team groups, re-checks every connected member key, moves members to the group matching their key’s models, revokes keys LiteLLM rejects, and removes automatic grants of people who may no longer connect. A failed read keeps the last synced catalog and records the error. Requires owner/admin and Gateway management.
POST
/
v1
/
inference-providers
/
{inferenceProviderId}
/
litellm
/
sync
Sync LiteLLM models and groups
curl --request POST \
--url https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"inferenceProvider": {
"modelIds": [
"<string>"
],
"pinnedModelIds": [
"<string>"
],
"id": "<string>",
"providerId": "<string>",
"name": "<string>",
"source": "openwork_gateway",
"credentialMode": "org",
"credentialStatus": "ready",
"authUrl": "<string>",
"status": "active",
"updatedAt": "2023-11-07T05:31:56Z",
"providerConfig": {},
"models": [
{
"id": "<string>",
"name": "<string>",
"config": {
"id": "<string>"
},
"upstreamModelId": "<string>",
"modelGroupId": "<string>",
"modelGroupName": "<string>",
"credentialSetId": "<string>",
"credentialSetName": "<string>"
}
],
"authorizationRequests": [
{
"credentialSetId": "<string>",
"name": "<string>",
"authUrl": "<string>",
"models": [
{
"id": "<string>",
"name": "<string>",
"config": {
"id": "<string>"
},
"upstreamModelId": "<string>",
"modelGroupId": "<string>",
"modelGroupName": "<string>",
"credentialSetId": "<string>",
"credentialSetName": "<string>"
}
]
}
],
"settings": {},
"modelGroups": [
{
"name": "<string>",
"description": "<string>",
"modelIds": [
"<string>"
],
"status": "active",
"id": "<string>"
}
],
"credentialSets": [
{
"id": "<string>",
"name": "<string>",
"credentialMode": "org",
"status": "active",
"configured": true,
"credentialStatus": "ready",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"oauthClientId": "<string>",
"hasOauthClientSecret": true
}
],
"accessGrants": [
{
"modelGroupId": "<string>",
"credentialSetId": "<string>",
"audience": {
"type": "organization"
},
"id": "<string>"
}
],
"catalogWarning": "<string>",
"migration": {
"llmProviderId": "<string>",
"runtimeEnvNames": [
"<string>"
]
},
"litellm": {
"mode": "org",
"keySource": "personal",
"issueStrategy": "per_team",
"mirrorFallback": "per_team",
"issuedMemberCount": 0,
"attentionCount": 0,
"attention": [
{
"memberId": "<string>",
"name": "<string>",
"email": "<string>",
"reason": "not_in_litellm"
}
],
"baseUrl": "<string>",
"spendTracking": true,
"hasSyncKey": true,
"lastSyncedAt": "2023-11-07T05:31:56Z",
"lastSyncError": "<string>",
"modelCount": 0,
"teamCount": 0,
"connectedMemberCount": 0
},
"oauthCallbackUrl": "<string>",
"credentials": [
{
"id": "<string>",
"credentialSetId": "<string>",
"subject": "<string>",
"orgMembershipId": "<string>",
"memberName": "<string>",
"memberEmail": "<string>",
"kind": "api_key",
"status": "active",
"expiresAt": "2023-11-07T05:31:56Z"
}
]
},
"sync": {
"modelCount": 0,
"groupCount": 0,
"teamCount": 0,
"members": {
"matched": 0,
"rejected": 0,
"unavailable": 0,
"removed": 0
},
"warnings": [
"<string>"
],
"issued": {
"people": 0,
"keys": 0,
"notInLiteLlm": 0,
"noKeyToMirror": 0,
"noModels": 0,
"errors": 0,
"removed": 0
}
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
bearerAuthdenApiKey
Session token passed as Authorization: Bearer <session-token> for user-authenticated Den routes.
Path Parameters
Den TypeID with 'ipr_' prefix and a 26-character base32 suffix.
Required string length:
30Was this page helpful?