브라우저 플레이그라운드에서 잡 하나를 실행합니다, 보통 잡과 같이 과금되고 source_kind는 playground입니다
POST /v1/organizations/{org_id}/workspaces/{workspace_id}/playground/runs
| 방식 | 허용 | 조건 |
|---|
API 키 (Authorization: Bearer xci_live_…) | 불가 | 콘솔 세션 전용, 키로 부르면 403 console_only |
| 콘솔 세션 쿠키 | 가능 | 조직 역할 owner, admin, developer, 같은 출처의 Origin 헤더 필요 |
- 콘솔 세션 전용입니다, 잡은 보통 잡과 같은 승인, 요율, 정산, 로그 경로를 탑니다
| 이름 | 위치 | 타입 | 필수 | 설명 |
|---|
org_id | 경로 | string | 필수 | 조직 ID, 형식 ^org_[A-Za-z0-9]+$ |
workspace_id | 경로 | string | 필수 | 워크스페이스 ID, 형식 ^wrk_[A-Za-z0-9]+$ |
| 필드 | 타입 | 필수 | 설명 |
|---|
script | string | 필수 | 실행할 스크립트, 1자 이상, 65536자 이하 |
xcode | string | | 환경 목록의 Xcode 버전 중 하나 |
runner | macos-m4 | | macos-m4, 기본 "macos-m4" |
timeout_minutes | integer | | 제한 시간(분), 기본 30, 최소 1, 최대 360, 기본 30 |
env | object | | 환경 변수 |
artifacts | array<string> | | 결과물 글로브, 최대 50개 |
| 필드 | 타입 | 항상 | 설명 |
|---|
id | string | 항상 | ID, 형식 ^job_[A-Za-z0-9]+$ |
organization_id | string | | 조직 ID |
workspace_id | string | 항상 | 워크스페이스 ID |
api_key_id | string | | 제출에 쓴 키, 콘솔에서 제출했으면 null, null 가능 |
status | queued | preparing | running | succeeded | failed | cancelled | credit_exhausted | platform_error | timed_out | 항상 | 잡 상태 |
queued_reason | tier_concurrency_limit | capacity | | 대기 이유, 동시 실행 한도면 tierconcurrencylimit, null 가능 |
end_reason | string | | succeeded, failed, cancelled, creditexhausted, platformerror, timed_out 중 하나, 끝나기 전엔 null, null 가능 |
error | object 또는 null | | 끝낸 오류(코드, 메시지), 없으면 null, null 가능 |
exit_code | integer | | 스크립트 종료 코드, null 가능 |
created_at | timestamp | 항상 | 만든 시각 |
started_at | timestamp 또는 null | | 과금 시작 시각(VM 준비 뒤), null 가능 |
ended_at | timestamp 또는 null | | 끝난 시각, null 가능 |
run_seconds | integer | | 실행 초, null 가능 |
billed_minutes | integer | | 과금 분, ceil(run_seconds / 60)이고 0초면 0분, null 가능 |
rate_micro_usd_per_min | integer | | 잡 시작 때 고정된 분당 요율(µUSD, 부가세 포함) |
rate_usd_per_min | string | | 같은 요율의 USD 문자열, 형식 ^-?[0-9]+\.[0-9]{6}$ |
amount_micro_usd | integer | | 이 잡의 금액(µUSD), 최소 0 |
amount_usd | string | | 같은 금액의 USD 문자열, 형식 ^-?[0-9]+\.[0-9]{6}$ |
credit_low | object | | 잡이 끝났을 때 잔액이 낮으면 잔액과 충전 링크, 아니면 null, null 가능 |
credit_low.balance_micro_usd | integer | | 금액(µUSD 정수), 최소 0 |
credit_low.balance_usd | string | | 같은 금액의 USD 문자열(소수 6자리), 형식 ^-?[0-9]+\.[0-9]{6}$ |
credit_low.topup_url | string | | 충전 링크 |
log_url | string | | 로그 URL |
repository | string | | 제출 때 적은 owner/name, null 가능 |
source_kind | string | | 제출 경로 |
{
"id": "job_2Qm7Xp9Lk4",
"organization_id": "org_7Kq2m9ZtP3",
"workspace_id": "wrk_3fK9Qm2Zp8",
"api_key_id": "key_8Pz4Nk1Rt6",
"status": "succeeded",
"queued_reason": null,
"end_reason": "succeeded",
"error": null,
"exit_code": 0,
"created_at": "2026-10-12T03:11:05Z",
"started_at": "2026-10-12T03:12:40Z",
"ended_at": "2026-10-12T03:14:45Z",
"run_seconds": 125,
"billed_minutes": 3,
"rate_micro_usd_per_min": 39600,
"rate_usd_per_min": "0.039600",
"amount_micro_usd": 118800,
"amount_usd": "0.118800",
"credit_low": null,
"log_url": "https://xenoci.com/api/runner/v1/jobs/job_2Qm7Xp9Lk4/logs",
"repository": "acme/ios-app",
"source_kind": "cli"
}
| HTTP | 코드 | 다시 시도 | 뜻 |
|---|
| 400 | invalid_request | 아니오 | 본문이나 쿼리가 검증에 실패했습니다, error.details.fields에 문제 필드가 있습니다 |
| 401 | session_required | 아니오 | 콘솔 엔드포인트를 유효한 콘솔 세션 쿠키 없이 불렀습니다 |
| 402 | insufficient_credit | 아니오 | 사용 가능 잔액이 현재 요율의 1분어치보다 적습니다, 본문에 잔액과 topup_url이 있습니다 |
| 402 | tier_monthly_limit | 아니오 | 조직이 티어 월 사용 한도에 닿았습니다, 다음 달 1일 00:00 UTC 또는 티어 상향 때 풀립니다 |
| 402 | workspace_spend_limit | 아니오 | 워크스페이스 월 지출 한도에 닿았습니다, 소유자나 관리자가 올릴 수 있습니다 |
| 403 | console_only | 아니오 | 콘솔 세션 전용 엔드포인트입니다, API 키로는 결제, 키, 멤버 관리를 할 수 없습니다 |
| 403 | insufficient_permission | 아니오 | 역할이나 키 권한(run/read)이 이 요청을 허용하지 않습니다 |
| 403 | workspace_archived | 아니오 | 보관된 워크스페이스입니다, 키는 폐기되었고 새 잡은 거절됩니다 |
| 404 | not_found | 아니오 | 자원이 없거나 이 호출자에게 보이지 않습니다 |
| 429 | rate_limited | 가능 | 이 키 또는 조직의 요청이 너무 많습니다, retryafters만큼 기다리세요 |
| 429 | tier_concurrency_limit | 가능 | 실행 중인 잡이 티어 동시 실행 한도에 닿았고 조직 대기열도 가득 찼습니다, retryafters 뒤에 다시 보내세요 |
| 500 | internal_error | 가능 | 예상하지 못한 오류입니다, 다시 시도하고 반복되면 request_id와 함께 알려 주세요 |
| 503 | capacity_unavailable | 가능 | 설정된 맥 풀 용량이 없습니다, 잡을 받지 않았습니다 |
오류 봉투 모양과 전체 코드 표는 오류 코드에 있습니다
curl -X POST "https://xenoci.com/api/runner/v1/organizations/org_7Kq2m9ZtP3/workspaces/wrk_3fK9Qm2Zp8/playground/runs" \
--cookie "xci_console=$SESSION" \
-H "Origin: https://xenoci.com" \
-H "Content-Type: application/json" \
-d '{"script":"xcodebuild -version","timeout_minutes":10}'