curl --request POST \
--url http://dev-platform-api.trychainshift.ai/api/v1/platform/runs \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"models": [
"CHATGPT",
"GEMINI"
],
"location": "US-NEW_YORK",
"promptIDs": [
"cM0RPoxbNbJy0mS-MhsHOg"
],
"promptSetID": "IkVMHhjFWcBXcJ41-h9yBQ",
"region": "KR",
"repeatCount": 1
}
'import requests
url = "http://dev-platform-api.trychainshift.ai/api/v1/platform/runs"
payload = {
"models": ["CHATGPT", "GEMINI"],
"location": "US-NEW_YORK",
"promptIDs": ["cM0RPoxbNbJy0mS-MhsHOg"],
"promptSetID": "IkVMHhjFWcBXcJ41-h9yBQ",
"region": "KR",
"repeatCount": 1
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
models: ['CHATGPT', 'GEMINI'],
location: 'US-NEW_YORK',
promptIDs: ['cM0RPoxbNbJy0mS-MhsHOg'],
promptSetID: 'IkVMHhjFWcBXcJ41-h9yBQ',
region: 'KR',
repeatCount: 1
})
};
fetch('http://dev-platform-api.trychainshift.ai/api/v1/platform/runs', 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 => "http://dev-platform-api.trychainshift.ai/api/v1/platform/runs",
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([
'models' => [
'CHATGPT',
'GEMINI'
],
'location' => 'US-NEW_YORK',
'promptIDs' => [
'cM0RPoxbNbJy0mS-MhsHOg'
],
'promptSetID' => 'IkVMHhjFWcBXcJ41-h9yBQ',
'region' => 'KR',
'repeatCount' => 1
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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 := "http://dev-platform-api.trychainshift.ai/api/v1/platform/runs"
payload := strings.NewReader("{\n \"models\": [\n \"CHATGPT\",\n \"GEMINI\"\n ],\n \"location\": \"US-NEW_YORK\",\n \"promptIDs\": [\n \"cM0RPoxbNbJy0mS-MhsHOg\"\n ],\n \"promptSetID\": \"IkVMHhjFWcBXcJ41-h9yBQ\",\n \"region\": \"KR\",\n \"repeatCount\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
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("http://dev-platform-api.trychainshift.ai/api/v1/platform/runs")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"models\": [\n \"CHATGPT\",\n \"GEMINI\"\n ],\n \"location\": \"US-NEW_YORK\",\n \"promptIDs\": [\n \"cM0RPoxbNbJy0mS-MhsHOg\"\n ],\n \"promptSetID\": \"IkVMHhjFWcBXcJ41-h9yBQ\",\n \"region\": \"KR\",\n \"repeatCount\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://dev-platform-api.trychainshift.ai/api/v1/platform/runs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"models\": [\n \"CHATGPT\",\n \"GEMINI\"\n ],\n \"location\": \"US-NEW_YORK\",\n \"promptIDs\": [\n \"cM0RPoxbNbJy0mS-MhsHOg\"\n ],\n \"promptSetID\": \"IkVMHhjFWcBXcJ41-h9yBQ\",\n \"region\": \"KR\",\n \"repeatCount\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "S8cqDSjSot67bCK6YtmvHw"
}{
"code": "COMMON_VALIDATION",
"details": [
"limit: must be 100 or less"
],
"message": "Data validation failed"
}{
"code": "COMMON_UNAUTHORIZED",
"message": "Unauthenticated user"
}{
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits."
}{
"code": "MODEL_NOT_GRANTED",
"message": "This model is not granted to the organization. An agreement is required to use it"
}{
"code": "PROMPT_NOT_FOUND",
"message": "Prompt not found"
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please try again later."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}Submit a run
조직의 프롬프트를 지정한 모델로 실행합니다. 정기 모니터링이 아니라 요청한 시점에 한 번 수행됩니다. 요청이 성공하면 프롬프트 실행(Run)이 생성됩니다. 실행 대상은 promptIDs(개별 프롬프트) 또는 promptSetID(프롬프트 세트 전체) 중 하나만 지정할 수 있으며, 둘을 동시에 사용할 수 없습니다. 진행 상태는 응답으로 받은 id를 사용해 프롬프트 실행 상태 조회에서 확인합니다.
오류
| HTTP | 코드 | 설명 |
|---|---|---|
| 400 | COMMON_BINDING | • 요청 본문 JSON 파싱 실패 • promptIDs·promptSetID 형식 오류 (details 에 PLATFORM_INVALID_ID) |
| 400 | COMMON_VALIDATION | • models 누락·8개 초과·허용 목록 밖의 값 • promptIDs 500개 초과 • repeatCount 범위 위반(1~100) |
| 400 | RUN_PROMPT_TARGET_REQUIRED | promptIDs·promptSetID 중 정확히 하나를 지정하지 않음 |
| 400 | PROMPT_SET_EMPTY | 지정한 세트에 실행할 프롬프트가 없음 |
| 400 | MODEL_NOT_SUPPORTED | 플랫폼 API 가 지원하지 않는 model 값 |
| 400 | MODEL_DISCONTINUED | 서비스가 중단된 모델을 요청함 (현재 중단된 모델은 없음). 중단 모델은 GET /models 에도 나타나지 않음 |
| 400 | NO_AVAILABLE_PLATFORM | 요청한 모델이 현재 모두 수집 불가 |
| 400 | REGION_NOT_SUPPORTED | 지원하지 않는 지역 코드 |
| 400 | REGION_NOT_SUPPORTED_FOR_MODEL | 모델이 지원하지 않는 지역 |
| 400 | LOCATION_NOT_SUPPORTED | 지원하지 않는 위치 코드 (GET /locations 에 없는 값) |
| 400 | LOCATION_REGION_MISMATCH | 지정한 region 에 속하지 않는 위치 |
| 400 | LOCATION_NOT_SUPPORTED_FOR_MODEL | 요청한 모델 중 이 위치를 지원하지 않는 모델이 있음 |
| 400 | QUESTION_NOT_MARKETING_PLATFORM | 플랫폼 API 소속이 아닌 프롬프트 |
| 400 | RUN_TOO_MANY_TASKS | 총 실행 수(프롬프트 × 모델 × 반복)가 10,000 초과 |
| 401 | COMMON_UNAUTHORIZED | API 키 또는 액세스 토큰이 없거나 유효하지 않음 |
| 402 | INSUFFICIENT_CREDITS | 조직 크레딧 잔액이 이 요청의 단가보다 적음 |
| 403 | MODEL_NOT_GRANTED | 별도 계약이 필요한 모델(CLAUDE, PERPLEXITY, GROK, DEEPSEEK)을 권한 없이 요청함 (GET /models 에도 나타나지 않음) |
| 403 | REGION_NOT_GRANTED | 별도 계약이 필요한 지역을 권한 없이 요청함 (GET /regions 에도 나타나지 않음) |
| 404 | PROMPT_NOT_FOUND | 프롬프트가 없거나 타 조직 소유 |
| 404 | PROMPT_SET_NOT_FOUND | 세트가 없거나 타 조직 소유 |
| 404 | CAMPAIGN_NOT_FOUND | 프롬프트가 속한 캠페인을 찾을 수 없음 |
| 429 | PLATFORM_RATE_LIMIT_EXCEEDED | 요청 한도 초과. Retry-After 헤더의 초만큼 기다린 뒤 재시도 |
| 500 | — | 서버 내부 오류. code 없이 message 와 requestID 를 반환 |
curl --request POST \
--url http://dev-platform-api.trychainshift.ai/api/v1/platform/runs \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"models": [
"CHATGPT",
"GEMINI"
],
"location": "US-NEW_YORK",
"promptIDs": [
"cM0RPoxbNbJy0mS-MhsHOg"
],
"promptSetID": "IkVMHhjFWcBXcJ41-h9yBQ",
"region": "KR",
"repeatCount": 1
}
'import requests
url = "http://dev-platform-api.trychainshift.ai/api/v1/platform/runs"
payload = {
"models": ["CHATGPT", "GEMINI"],
"location": "US-NEW_YORK",
"promptIDs": ["cM0RPoxbNbJy0mS-MhsHOg"],
"promptSetID": "IkVMHhjFWcBXcJ41-h9yBQ",
"region": "KR",
"repeatCount": 1
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
models: ['CHATGPT', 'GEMINI'],
location: 'US-NEW_YORK',
promptIDs: ['cM0RPoxbNbJy0mS-MhsHOg'],
promptSetID: 'IkVMHhjFWcBXcJ41-h9yBQ',
region: 'KR',
repeatCount: 1
})
};
fetch('http://dev-platform-api.trychainshift.ai/api/v1/platform/runs', 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 => "http://dev-platform-api.trychainshift.ai/api/v1/platform/runs",
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([
'models' => [
'CHATGPT',
'GEMINI'
],
'location' => 'US-NEW_YORK',
'promptIDs' => [
'cM0RPoxbNbJy0mS-MhsHOg'
],
'promptSetID' => 'IkVMHhjFWcBXcJ41-h9yBQ',
'region' => 'KR',
'repeatCount' => 1
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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 := "http://dev-platform-api.trychainshift.ai/api/v1/platform/runs"
payload := strings.NewReader("{\n \"models\": [\n \"CHATGPT\",\n \"GEMINI\"\n ],\n \"location\": \"US-NEW_YORK\",\n \"promptIDs\": [\n \"cM0RPoxbNbJy0mS-MhsHOg\"\n ],\n \"promptSetID\": \"IkVMHhjFWcBXcJ41-h9yBQ\",\n \"region\": \"KR\",\n \"repeatCount\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
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("http://dev-platform-api.trychainshift.ai/api/v1/platform/runs")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"models\": [\n \"CHATGPT\",\n \"GEMINI\"\n ],\n \"location\": \"US-NEW_YORK\",\n \"promptIDs\": [\n \"cM0RPoxbNbJy0mS-MhsHOg\"\n ],\n \"promptSetID\": \"IkVMHhjFWcBXcJ41-h9yBQ\",\n \"region\": \"KR\",\n \"repeatCount\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://dev-platform-api.trychainshift.ai/api/v1/platform/runs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"models\": [\n \"CHATGPT\",\n \"GEMINI\"\n ],\n \"location\": \"US-NEW_YORK\",\n \"promptIDs\": [\n \"cM0RPoxbNbJy0mS-MhsHOg\"\n ],\n \"promptSetID\": \"IkVMHhjFWcBXcJ41-h9yBQ\",\n \"region\": \"KR\",\n \"repeatCount\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "S8cqDSjSot67bCK6YtmvHw"
}{
"code": "COMMON_VALIDATION",
"details": [
"limit: must be 100 or less"
],
"message": "Data validation failed"
}{
"code": "COMMON_UNAUTHORIZED",
"message": "Unauthenticated user"
}{
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits."
}{
"code": "MODEL_NOT_GRANTED",
"message": "This model is not granted to the organization. An agreement is required to use it"
}{
"code": "PROMPT_NOT_FOUND",
"message": "Prompt not found"
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please try again later."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}FAQ
Where do I get the results after submitting? Poll Get run status with the returnedrunID, and once it is FINISHED, query List answers with the runID filter.Body
Prompt run request
List of models to run. Only values retrievable from GET /models are allowed. Discontinued models are rejected with 400 MODEL_DISCONTINUED before validation, so they are not kept in the oneof list (none at present)
1 - 13 elementsCHATGPT, GOOGLE_OVERVIEW, GOOGLE_AI, PERPLEXITY, GEMINI, NAVER_AI_BRIEFING, NAVER_AI_TAB, CLAUDE, META_MUSE, BAIDU_AI_SEARCH, GROK, BAIDU_AI_TAB, DEEPSEEK ["CHATGPT", "GEMINI"]
Run location (city-level, below the country). If omitted, the run uses the region (country) level. Only codes retrievable from GET /locations are allowed, and if region is also specified, the location must belong to that region. If region is omitted, the run uses the location's region. Every requested model must support this location (check with GET /locations?model=).
"US-NEW_YORK"