모델 생성
curl --request POST \
--url https://api.example.com/v1/preview/models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_model": "<string>",
"name": "<string>",
"project": "<string>",
"entity": "my-team",
"return_existing": false
}
'import requests
url = "https://api.example.com/v1/preview/models"
payload = {
"base_model": "<string>",
"name": "<string>",
"project": "<string>",
"entity": "my-team",
"return_existing": False
}
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({
base_model: '<string>',
name: '<string>',
project: '<string>',
entity: 'my-team',
return_existing: false
})
};
fetch('https://api.example.com/v1/preview/models', 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.example.com/v1/preview/models",
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([
'base_model' => '<string>',
'name' => '<string>',
'project' => '<string>',
'entity' => 'my-team',
'return_existing' => false
]),
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.example.com/v1/preview/models"
payload := strings.NewReader("{\n \"base_model\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"entity\": \"my-team\",\n \"return_existing\": false\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.example.com/v1/preview/models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_model\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"entity\": \"my-team\",\n \"return_existing\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/preview/models")
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 \"base_model\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"entity\": \"my-team\",\n \"return_existing\": false\n}"
response = http.request(request)
puts response.read_body{
"base_model": "<string>",
"entity": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project": "<string>",
"run_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}새 모델을 생성합니다.
POST
/
v1
/
preview
/
models
모델 생성
curl --request POST \
--url https://api.example.com/v1/preview/models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_model": "<string>",
"name": "<string>",
"project": "<string>",
"entity": "my-team",
"return_existing": false
}
'import requests
url = "https://api.example.com/v1/preview/models"
payload = {
"base_model": "<string>",
"name": "<string>",
"project": "<string>",
"entity": "my-team",
"return_existing": False
}
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({
base_model: '<string>',
name: '<string>',
project: '<string>',
entity: 'my-team',
return_existing: false
})
};
fetch('https://api.example.com/v1/preview/models', 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.example.com/v1/preview/models",
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([
'base_model' => '<string>',
'name' => '<string>',
'project' => '<string>',
'entity' => 'my-team',
'return_existing' => false
]),
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.example.com/v1/preview/models"
payload := strings.NewReader("{\n \"base_model\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"entity\": \"my-team\",\n \"return_existing\": false\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.example.com/v1/preview/models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_model\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"entity\": \"my-team\",\n \"return_existing\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/preview/models")
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 \"base_model\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"entity\": \"my-team\",\n \"return_existing\": false\n}"
response = http.request(request)
puts response.read_body{
"base_model": "<string>",
"entity": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project": "<string>",
"run_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
본문
application/json
새 모델을 생성하기 위한 스키마입니다.
파인튜닝에 사용할 base model 식별자 또는 HuggingFace 모델 경로
예시:
"OpenPipe/Qwen3-14B-Instruct"
프로젝트 내에서 모델을 고유하게 식별하는 이름
예시:
"my-awesome-model"
모델이 저장될 W&B 프로젝트 이름
예시:
"my-awesome-project"
사용 중인 W&B API 키의 개발자 팀 또는 사용자 이름
예시:
"my-team"
true이면 새 모델을 생성하는 대신, 같은 이름의 모델이 이미 존재할 경우 해당 기존 모델을 반환합니다.
⌘I