curl --request PUT \
--url https://forge.coreweave.com/api/distillation/v1/providers/{provider} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "https://inference.example.com/v1",
"api_key": "sk-example",
"validation_model": "your-deployed-model-id"
}
'import requests
url = "https://forge.coreweave.com/api/distillation/v1/providers/{provider}"
payload = {
"base_url": "https://inference.example.com/v1",
"api_key": "sk-example",
"validation_model": "your-deployed-model-id"
}
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://inference.example.com/v1',
api_key: 'sk-example',
validation_model: 'your-deployed-model-id'
})
};
fetch('https://forge.coreweave.com/api/distillation/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://forge.coreweave.com/api/distillation/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://inference.example.com/v1',
'api_key' => 'sk-example',
'validation_model' => 'your-deployed-model-id'
]),
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://forge.coreweave.com/api/distillation/v1/providers/{provider}"
payload := strings.NewReader("{\n \"base_url\": \"https://inference.example.com/v1\",\n \"api_key\": \"sk-example\",\n \"validation_model\": \"your-deployed-model-id\"\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://forge.coreweave.com/api/distillation/v1/providers/{provider}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://inference.example.com/v1\",\n \"api_key\": \"sk-example\",\n \"validation_model\": \"your-deployed-model-id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://forge.coreweave.com/api/distillation/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://inference.example.com/v1\",\n \"api_key\": \"sk-example\",\n \"validation_model\": \"your-deployed-model-id\"\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,
"check": {
"status": "unchecked",
"message": "<string>",
"model_ref": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"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,
"check": {
"status": "unchecked",
"message": "<string>",
"model_ref": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"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": "Project 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}공급자 생성 또는 교체
공급자 자격 증명을 생성하거나 교체합니다. validation_model을 지정하면 변경 사항을 저장하기 전에 설정된 백엔드가 해당 모델에 대한 최소한의 요청을 완료해야 합니다. 테스트를 건너뛰려면 validation_model을 생략하세요. local_only가 true가 아니면 원격 공급자 자료를 게시하며, 게시가 반영될 때까지 최대 10초 동안 기다립니다. 적용이 완료되면 200을 반환하고, 그렇지 않으면 202를 반환합니다. 이때 deployments[]에는 pending 또는 applying 상태가 보고되거나, last_error와 함께 failed 상태가 보고됩니다.
curl --request PUT \
--url https://forge.coreweave.com/api/distillation/v1/providers/{provider} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "https://inference.example.com/v1",
"api_key": "sk-example",
"validation_model": "your-deployed-model-id"
}
'import requests
url = "https://forge.coreweave.com/api/distillation/v1/providers/{provider}"
payload = {
"base_url": "https://inference.example.com/v1",
"api_key": "sk-example",
"validation_model": "your-deployed-model-id"
}
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://inference.example.com/v1',
api_key: 'sk-example',
validation_model: 'your-deployed-model-id'
})
};
fetch('https://forge.coreweave.com/api/distillation/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://forge.coreweave.com/api/distillation/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://inference.example.com/v1',
'api_key' => 'sk-example',
'validation_model' => 'your-deployed-model-id'
]),
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://forge.coreweave.com/api/distillation/v1/providers/{provider}"
payload := strings.NewReader("{\n \"base_url\": \"https://inference.example.com/v1\",\n \"api_key\": \"sk-example\",\n \"validation_model\": \"your-deployed-model-id\"\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://forge.coreweave.com/api/distillation/v1/providers/{provider}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://inference.example.com/v1\",\n \"api_key\": \"sk-example\",\n \"validation_model\": \"your-deployed-model-id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://forge.coreweave.com/api/distillation/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://inference.example.com/v1\",\n \"api_key\": \"sk-example\",\n \"validation_model\": \"your-deployed-model-id\"\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,
"check": {
"status": "unchecked",
"message": "<string>",
"model_ref": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"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,
"check": {
"status": "unchecked",
"message": "<string>",
"model_ref": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"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": "Project 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}인증
wandb API 키 또는 wandb JWT. 브라우저 세션은 Model Distillation 웹 앱 백엔드에서 교환하며, 작업 권한은 내부에서만 사용됩니다.
헤더
액세스 가능한 개인 또는 팀 entity. 인증된 사용자의 기본 entity를 사용하려면 생략하세요.
경로 매개변수
^[a-z0-9][a-z0-9_-]{0,63}$쿼리 매개변수
이 공급자 설정을 저장하지 않고 검증합니다.
true, false 본문
OpenAI 호환 공급자의 기본 URL. HTTPS를 사용해야 하며, 스킴을 지정하지 않으면 기본적으로 HTTPS를 사용합니다.
업스트림에 Authorization: Bearer <api_key>로 전송되는 공급자 API 키입니다. 앞뒤 공백은 제거되며, 나머지 값은 공백 없이 출력 가능한 ASCII 문자로만 구성되어야 합니다.
1^[\x21-\x7e]+$모델을 지정하면 자격 증명을 저장하기 전에 해당 모델에 대한 최소한의 요청이 성공해야 합니다. 검증을 건너뛰려면 생략하세요.
1 - 500응답
공급자가 이미 적용되었습니다.
이 페이지가 도움이 되었나요?