공급자 생성 또는 인증 정보 교체
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"
}
}공급자 생성 또는 교체
인식된 공급자의 경우, 암호화된 자격 증명을 저장하기 전에 카탈로그의 첫 번째 모델을 사용하여 최소한의 테스트 요청을 보냅니다. 그런 다음 local_only가 true가 아니면 원격 공급자 자료를 게시합니다. 게시가 대기 중인 동안 202를 반환합니다.
PUT
/
providers
/
{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"
}
}인증
W&B API 키.
헤더
액세스 가능한 개인 또는 팀 entity. 인증된 사용자의 기본 entity를 사용하려면 생략하세요.
경로 매개변수
Pattern:
^[a-z0-9][a-z0-9_-]{0,63}$본문
application/json
마지막 수정일 2026년 9월 30일
이 페이지가 도움이 되었나요?