리전 목록 조회
curl --request GET \
--url https://platform-api.trychainshift.ai/api/v1/platform/regions \
--header 'API-Key: <api-key>'import requests
url = "https://platform-api.trychainshift.ai/api/v1/platform/regions"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://platform-api.trychainshift.ai/api/v1/platform/regions', 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://platform-api.trychainshift.ai/api/v1/platform/regions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform-api.trychainshift.ai/api/v1/platform/regions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform-api.trychainshift.ai/api/v1/platform/regions")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.trychainshift.ai/api/v1/platform/regions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"regions": [
{
"code": "KR",
"name": "South Korea"
}
]
}{
"code": "MODEL_NOT_SUPPORTED",
"message": "플랫폼 API에서 지원하지 않는 모델입니다"
}{
"code": "COMMON_UNAUTHORIZED",
"message": "인증되지 않은 사용자입니다"
}{
"code": "INSUFFICIENT_CREDITS",
"message": "크레딧이 부족합니다."
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}시작
지원 지역 목록
프롬프트 실행 요청(submitRun)의 region 값으로 사용할 수 있는 지원 리전 목록을 조회합니다. model 을 지정하면 해당 모델이 지원하는 리전만, 생략하면 전체 리전을 반환합니다.
오류
| HTTP | 코드 | 설명 |
|---|---|---|
| 400 | MODEL_NOT_SUPPORTED | 플랫폼 API 가 지원하지 않는 model 값 |
| 401 | COMMON_UNAUTHORIZED | API 키 또는 액세스 토큰이 없거나 유효하지 않음 |
| 402 | INSUFFICIENT_CREDITS | 조직 크레딧 잔액이 이 요청의 단가보다 적음 |
| 429 | PLATFORM_RATE_LIMIT_EXCEEDED | 요청 한도 초과. Retry-After 헤더의 초만큼 기다린 뒤 재시도 |
| 500 | — | 서버 내부 오류. code 없이 message 와 requestID 를 반환 |
GET
/
v1
/
platform
/
regions
리전 목록 조회
curl --request GET \
--url https://platform-api.trychainshift.ai/api/v1/platform/regions \
--header 'API-Key: <api-key>'import requests
url = "https://platform-api.trychainshift.ai/api/v1/platform/regions"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://platform-api.trychainshift.ai/api/v1/platform/regions', 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://platform-api.trychainshift.ai/api/v1/platform/regions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform-api.trychainshift.ai/api/v1/platform/regions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform-api.trychainshift.ai/api/v1/platform/regions")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.trychainshift.ai/api/v1/platform/regions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"regions": [
{
"code": "KR",
"name": "South Korea"
}
]
}{
"code": "MODEL_NOT_SUPPORTED",
"message": "플랫폼 API에서 지원하지 않는 모델입니다"
}{
"code": "COMMON_UNAUTHORIZED",
"message": "인증되지 않은 사용자입니다"
}{
"code": "INSUFFICIENT_CREDITS",
"message": "크레딧이 부족합니다."
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}