curl --request POST \
--url https://api.openworklabs.com/v1/inference-providers/litellm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"baseUrl": "<string>",
"apiKey": "<string>",
"name": "LiteLLM",
"allMembers": true,
"memberIds": [
"<string>"
],
"teamIds": [
"<string>"
]
}
'import requests
url = "https://api.openworklabs.com/v1/inference-providers/litellm"
payload = {
"baseUrl": "<string>",
"apiKey": "<string>",
"name": "LiteLLM",
"allMembers": True,
"memberIds": ["<string>"],
"teamIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
baseUrl: '<string>',
apiKey: '<string>',
name: 'LiteLLM',
allMembers: true,
memberIds: ['<string>'],
teamIds: ['<string>']
})
};
fetch('https://api.openworklabs.com/v1/inference-providers/litellm', 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/litellm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'baseUrl' => '<string>',
'apiKey' => '<string>',
'name' => 'LiteLLM',
'allMembers' => true,
'memberIds' => [
'<string>'
],
'teamIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/inference-providers/litellm"
payload := strings.NewReader("{\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"name\": \"LiteLLM\",\n \"allMembers\": true,\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/litellm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"name\": \"LiteLLM\",\n \"allMembers\": true,\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference-providers/litellm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"name\": \"LiteLLM\",\n \"allMembers\": true,\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ]\n}"
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>"
}Create LiteLLM gateway provider
Connects the organization’s own LiteLLM proxy and syncs its models. 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 owner/admin and Gateway management; session callers must recently reauthenticate.
curl --request POST \
--url https://api.openworklabs.com/v1/inference-providers/litellm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"baseUrl": "<string>",
"apiKey": "<string>",
"name": "LiteLLM",
"allMembers": true,
"memberIds": [
"<string>"
],
"teamIds": [
"<string>"
]
}
'import requests
url = "https://api.openworklabs.com/v1/inference-providers/litellm"
payload = {
"baseUrl": "<string>",
"apiKey": "<string>",
"name": "LiteLLM",
"allMembers": True,
"memberIds": ["<string>"],
"teamIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
baseUrl: '<string>',
apiKey: '<string>',
name: 'LiteLLM',
allMembers: true,
memberIds: ['<string>'],
teamIds: ['<string>']
})
};
fetch('https://api.openworklabs.com/v1/inference-providers/litellm', 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/litellm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'baseUrl' => '<string>',
'apiKey' => '<string>',
'name' => 'LiteLLM',
'allMembers' => true,
'memberIds' => [
'<string>'
],
'teamIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/inference-providers/litellm"
payload := strings.NewReader("{\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"name\": \"LiteLLM\",\n \"allMembers\": true,\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/litellm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"name\": \"LiteLLM\",\n \"allMembers\": true,\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference-providers/litellm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"name\": \"LiteLLM\",\n \"allMembers\": true,\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ]\n}"
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
Session token passed as Authorization: Bearer <session-token> for user-authenticated Den routes.
Body
LiteLLM proxy URL, with or without /v1.
1 - 2048org: 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.
org, member, issued Organization key (org mode) or admin key (member and issued modes). Write-only.
1 - 40961 - 255issued 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).
per_team, mirror issued + mirror: for someone with no key to copy, create per-team keys, or report them and create nothing.
per_team, error 500Den TypeID with 'om_' prefix and a 26-character base32 suffix.
29500Den TypeID with 'tem_' prefix and a 26-character base32 suffix.
30Was this page helpful?