Create or rotate a provider
curl --request PUT \
--url https://distillation.training.wandb.ai/v1/providers/{provider} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "https://api.openai.com/v1",
"api_key": "sk-example"
}
'import requests
url = "https://distillation.training.wandb.ai/v1/providers/{provider}"
payload = {
"base_url": "https://api.openai.com/v1",
"api_key": "sk-example"
}
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({base_url: 'https://api.openai.com/v1', api_key: 'sk-example'})
};
fetch('https://distillation.training.wandb.ai/v1/providers/{provider}', 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://distillation.training.wandb.ai/v1/providers/{provider}",
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([
'base_url' => 'https://api.openai.com/v1',
'api_key' => 'sk-example'
]),
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://distillation.training.wandb.ai/v1/providers/{provider}"
payload := strings.NewReader("{\n \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-example\"\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://distillation.training.wandb.ai/v1/providers/{provider}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://distillation.training.wandb.ai/v1/providers/{provider}")
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 \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-example\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"entity": "<string>",
"base_url": "<string>",
"credential_mode": "stored",
"masked_key": "<string>",
"local_only": true,
"revision": 123,
"deployments": [
{
"proxy_backend": "<string>",
"status": "pending",
"applied_revision": 123,
"external_ref": "<string>",
"last_error": "<string>"
}
],
"models": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"predefined": true,
"enabled": true,
"input_usd_per_mtok": 123,
"output_usd_per_mtok": 123
}
]
}{
"name": "<string>",
"entity": "<string>",
"base_url": "<string>",
"credential_mode": "stored",
"masked_key": "<string>",
"local_only": true,
"revision": 123,
"deployments": [
{
"proxy_backend": "<string>",
"status": "pending",
"applied_revision": 123,
"external_ref": "<string>",
"last_error": "<string>"
}
],
"models": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"predefined": true,
"enabled": true,
"input_usd_per_mtok": 123,
"output_usd_per_mtok": 123
}
]
}{
"error": {
"message": "Task 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}Create or rotate a provider
For recognized providers, sends a minimal test request using the first catalog model before storing the encrypted credential. Then publishes remote provider material unless local_only is true. Returns 202 while publication is pending.
PUT
/
providers
/
{provider}
Create or rotate a provider
curl --request PUT \
--url https://distillation.training.wandb.ai/v1/providers/{provider} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "https://api.openai.com/v1",
"api_key": "sk-example"
}
'import requests
url = "https://distillation.training.wandb.ai/v1/providers/{provider}"
payload = {
"base_url": "https://api.openai.com/v1",
"api_key": "sk-example"
}
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({base_url: 'https://api.openai.com/v1', api_key: 'sk-example'})
};
fetch('https://distillation.training.wandb.ai/v1/providers/{provider}', 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://distillation.training.wandb.ai/v1/providers/{provider}",
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([
'base_url' => 'https://api.openai.com/v1',
'api_key' => 'sk-example'
]),
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://distillation.training.wandb.ai/v1/providers/{provider}"
payload := strings.NewReader("{\n \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-example\"\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://distillation.training.wandb.ai/v1/providers/{provider}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://distillation.training.wandb.ai/v1/providers/{provider}")
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 \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-example\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"entity": "<string>",
"base_url": "<string>",
"credential_mode": "stored",
"masked_key": "<string>",
"local_only": true,
"revision": 123,
"deployments": [
{
"proxy_backend": "<string>",
"status": "pending",
"applied_revision": 123,
"external_ref": "<string>",
"last_error": "<string>"
}
],
"models": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"predefined": true,
"enabled": true,
"input_usd_per_mtok": 123,
"output_usd_per_mtok": 123
}
]
}{
"name": "<string>",
"entity": "<string>",
"base_url": "<string>",
"credential_mode": "stored",
"masked_key": "<string>",
"local_only": true,
"revision": 123,
"deployments": [
{
"proxy_backend": "<string>",
"status": "pending",
"applied_revision": 123,
"external_ref": "<string>",
"last_error": "<string>"
}
],
"models": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"predefined": true,
"enabled": true,
"input_usd_per_mtok": 123,
"output_usd_per_mtok": 123
}
]
}{
"error": {
"message": "Task 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}Authorizations
A personal or service-account W&B API key.
Headers
Accessible personal or team entity. Omit to use the API key's default entity.
Path Parameters
Pattern:
^[a-z0-9][a-z0-9_-]{0,63}$Body
application/json
Response
Provider is already applied.
Available options:
stored, passthrough Show child attributes
Show child attributes
Show child attributes
Show child attributes
Last modified on August 25, 2026
Was this page helpful?
⌘I