Connect the caller's LiteLLM key
curl --request PUT \
--url https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"credentialSetId": "<string>"
}
'import requests
url = "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key"
payload = {
"apiKey": "<string>",
"credentialSetId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', credentialSetId: '<string>'})
};
fetch('https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key', 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/member-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'credentialSetId' => '<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/{inferenceProviderId}/litellm/member-key"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"credentialSetId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"credentialSetId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"credentialSetId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"modelGroupId": "<string>",
"modelGroupName": "<string>",
"modelIds": [
"<string>"
]
}{
"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
Connect the caller's LiteLLM key
Stores the caller’s own LiteLLM key for a per-user LiteLLM provider after checking it with the LiteLLM proxy, and grants the shared model group whose models match what that key can reach. Requires a user session and an admin grant that lets the caller connect a key. Replacing the key re-matches the group. The key is write-only. Disconnect with DELETE /v1/inference-providers//oauth.
PUT
/
v1
/
inference-providers
/
{inferenceProviderId}
/
litellm
/
member-key
Connect the caller's LiteLLM key
curl --request PUT \
--url https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"credentialSetId": "<string>"
}
'import requests
url = "https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key"
payload = {
"apiKey": "<string>",
"credentialSetId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', credentialSetId: '<string>'})
};
fetch('https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key', 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/member-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'credentialSetId' => '<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/{inferenceProviderId}/litellm/member-key"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"credentialSetId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"credentialSetId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference-providers/{inferenceProviderId}/litellm/member-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"credentialSetId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"modelGroupId": "<string>",
"modelGroupName": "<string>",
"modelIds": [
"<string>"
]
}{
"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:
30Body
application/json
Was this page helpful?