실행을 시작하고, 진행 상황을 따라가고, 결과를 읽습니다. 이 페이지의 모든 엔드포인트는 member 키와 admin 키로 사용할 수 있습니다. 수명 주기와 한도는 실행을 참고하세요.
실행 시작
/v1/runsprompt나 저장된 workflow의 이름 중 하나를 보냅니다.promptstringworkflow를 지정하지 않으면 필수입니다. 워크플로와 함께 보내면 저장된 프롬프트를 대체합니다. 최대 128 KiB.inputany JSONworkflowstringmodelstringdefault_model입니다.filesarray{"file": "<id or name>", "path": "..."} 또는 {"path": "...", "content": "..."}입니다. 파일을 참고하세요.connectionsobjectallowed_methods나 allowed_tools를 선택적으로 덧붙인 {"ref": "<saved name>"} 또는 인라인 정의입니다. 연결을 참고하세요.descriptionstringinput_schemaobjectinput이 따라야 하는 JSON Schema. 일치하지 않으면 경로와 이유(예: input.city: required)와 함께 400이 반환됩니다. 워크플로와 함께 쓰면 저장된 스키마를 대체합니다. 입력과 출력 설명하기를 참고하세요.output_schemaobjectfailed로 끝납니다. 워크플로와 함께 쓰면 저장된 스키마를 대체합니다. 입력과 출력 설명하기를 참고하세요.timeout_secondsintegershellbooleantrue.webboolean | objecttrue이거나, 제한하려면 { "allow": [domains], "search": false }입니다. 기본값은 꺼짐입니다. 웹 액세스를 참고하세요.zero_data_retentionbooleanfalse입니다.max_cost_microsintegerGET /v1/me의 default_max_cost_micros입니다. 호스팅 서비스에서는 전체 타임아웃에 해당하는 컴퓨팅 요금을 감당할 수 있어야 합니다. 예산을 참고하세요.callbackobject{"url": "...", "secret": "..."}. 콜백을 참고하세요.Idempotency-Keystring200으로 반환합니다.curl $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7d0f3c1e-6a52-4b8e-9f21-0c4d5e6a7b89" \
-d '{
"workflow": "investigate-payment",
"input": { "payment_id": "pay_123" },
"max_cost_micros": 500000
}'응답은 새 실행 객체가 담긴 202 Accepted입니다. 검증에 실패한 요청은 400을 반환하고 아무것도 만들지 않습니다. 호스팅 서비스에서 402는 사용 가능한 크레딧이 예산에 못 미친다는 뜻입니다.
실행 객체
idstringrun_4abb0f420c6623a12d2889610eb67284 같은 실행 ID.statusstringreserving, queued, starting, running, succeeded, failed, cancelled, timed_out, interrupted 중 하나.outputstringerrorstringcreated_attimestampstarted_attimestampfinished_attimestampmax_cost_microsintegercost_microsintegerbilling_pending이 false가 될 때까지는 잠정 값입니다. 0이면 생략됩니다.billing_pendingbooleanschedule_idstringzero_data_retentionbooleantrue.surcharge_percentintegersurcharge_microsintegercost_micros 중 데이터 무보존 추가 요금으로 더해진 부분. 0이면 생략됩니다.output_availablebooleanoutput_expires_attimestamp{
"id": "run_4abb0f420c6623a12d2889610eb67284",
"status": "succeeded",
"output": "The card issuer declined pay_123 for insufficient funds. The processor had no incidents. Ask the customer to retry or use another card.",
"created_at": "2026-10-03T09:14:05.118Z",
"started_at": "2026-10-03T09:14:05.402Z",
"finished_at": "2026-10-03T09:14:41.877Z",
"max_cost_micros": 500000,
"cost_micros": 14390,
"billing_pending": false
}실행 목록
/v1/runslimitintegercursorstringnext_cursor.statusstringschedulestring{
"items": [
{ "id": "run_91c0…", "status": "failed", "error": "Worker failed; inspect run events. External actions may have completed.", "created_at": "2026-10-03T08:51:12.004Z", "max_cost_micros": 500000, "cost_micros": 61200, "billing_pending": false },
{ "id": "run_3fd2…", "status": "failed", "error": "Credit reservation failed", "created_at": "2026-10-02T17:20:44.390Z", "max_cost_micros": 500000, "billing_pending": false }
],
"next_cursor": "eyJvIjoib3JnXzVlMmIi…"
}limit이나 cursor가 없으면 조건에 맞는 가장 최근 실행 100개의 일반 배열이 반환됩니다. 페이지네이션을 참고하세요.
실행 조회
/v1/runs/{id}이벤트 스트리밍
/v1/runs/{id}/eventsdone을 보내고 연결을 닫습니다.Last-Event-IDinteger: connected
id: 88412
event: status
data: {"id":88412,"type":"status","data":{"status":"running"},"created_at":"2026-10-03T09:14:05.431Z"}
id: 88415
event: worker_started
data: {"id":88415,"type":"worker_started","data":{"runtime":"pi","mode":"pi","shell":false},"created_at":"2026-10-03T09:14:07.906Z"}
id: 88419
event: tool_start
data: {"id":88419,"type":"tool_start","data":{"tool":"http_0","id":"call_1","arguments":{"method":"GET","path":"/payments/pay_123"}},"created_at":"2026-10-03T09:14:10.215Z"}
id: 88431
event: result
data: {"id":88431,"type":"result","data":{"output":"The card issuer declined pay_123 for insufficient funds."},"created_at":"2026-10-03T09:14:41.702Z"}
event: done
data: {"id":"run_4abb0f420c6623a12d2889610eb67284","status":"succeeded", …}각 메시지의 data는 id, type, data, created_at을 가진 이벤트 객체입니다. 단, done은 실행 객체를 담습니다. 콜론으로 시작하는 줄은 주석이며, 하트비트 주석이 15초마다 전송됩니다. 이벤트 유형은 이벤트 유형에 정리되어 있습니다. 연결을 끊어도 실행은 취소되지 않습니다.
curl -N $EPHEMERAL_URL/v1/runs/run_4abb0f420c6623a12d2889610eb67284/events \
-H "Authorization: Bearer $EPHEMERAL_API_KEY"실행 취소
/v1/runs/{id}/cancelreserving, queued, starting, running 상태의 실행을 취소하고 실행 객체를 반환합니다. 이미 끝난 실행은 변경 없이 그대로 반환됩니다.실행 정의 조회
/v1/runs/{id}/definition{
"request": {
"prompt": "Find out why this payment failed. Follow the playbook.",
"model": "anthropic/claude-haiku-5.5",
"files": [{ "file": "file_9c41d2a07be35f1e8a6c0d4b9e2f7a13", "path": "playbook.md" }],
"connections": {
"payments": { "ref": "payments-api", "allowed_methods": ["GET"] },
"crm": { "type": "http", "url": "https://api.example.com", "allowed_methods": ["GET"] }
},
"timeout_seconds": 120,
"shell": false,
"max_cost_micros": 500000,
"input": { "payment_id": "pay_123" }
},
"requires_credentials": ["crm"]
}request는 확정된 정의입니다. 파일 이름은 실제로 사용된 ID로 바뀌고, 워크플로에 저장된 필드가 채워집니다. 워크플로 이름과 콜백은 포함되지 않습니다. 저장된 연결은 참조와 허용 목록만 남습니다. 인라인 연결은 자격 증명과 URL 안의 비밀 값이 제거됩니다.
requires_credentials는 자격 증명이나 원래 URL을 복원해야 하는 인라인 연결을 나열합니다. 다시 실행하려면 이를 채워 넣고, 새 max_cost_micros를 정한 뒤 요청을 POST /v1/runs로 보내세요. 저장된 연결 참조는 그 시점에 다시 해석되며, 참조한 파일이나 연결이 삭제되었다면 요청이 실패합니다.
데이터 무보존 실행
zero_data_retention 실행은 출력을 한 번만 반환합니다. 실행이 끝난 뒤 첫 번째 GET /v1/runs/{id}는 output을 포함해 반환하고 삭제하며, 이후 읽기에서는 출력이 빠지고 output_available: false가 보고됩니다. 실행에 콜백이 있으면 콜백이 출력을 전달하고, 그때까지는 GET을 해도 출력이 남아 있습니다. 전달되지 않은 출력은 늦어도 1시간 뒤에 삭제됩니다.
이벤트 스트림은 실행 중과 종료 후 몇 분 동안 동작합니다. GET /v1/runs/{id}/definition은 410을 반환하고, 실행 목록에는 출력이 포함되지 않습니다. 호스팅 서비스에서는 cost_micros에 추가 요금이 포함되며 예산이 이를 감당해야 합니다.