조직에 파일을 업로드하고 관리합니다. 이 페이지의 모든 엔드포인트는 member 키와 admin 키로 사용할 수 있습니다. 실행이 파일을 마운트하는 방식은 파일을 참고하세요.
파일 객체
idstringfile_9c41d2a07be35f1e8a6c0d4b9e2f7a13 같은 파일 ID.namestringguides/refunds.md처럼 파일 이름으로 사용하는 상대 경로.sizeintegercontent_typestringcreated_attimestampsourcestringupload, 또는 실행이 저장한 파일이면 output.run_idstringrun_pathstringkeepbooleanexpires_attimestamp | null파일 업로드
/v1/filesmultipart/form-data로 보냅니다.filefile필수namestringexpires_in_daysintegerkeepbooleantrue로 설정합니다.curl $EPHEMERAL_URL/v1/files \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-F file=@refunds.md \
-F name=guides/refunds.md응답은 파일 객체가 담긴 201 Created입니다. 이미 있는 이름으로 다시 업로드하면 새 ID를 가진 새 파일이 추가되고, 이전 업로드는 그대로 유지됩니다.
{
"id": "file_9c41d2a07be35f1e8a6c0d4b9e2f7a13",
"name": "guides/refunds.md",
"size": 18234,
"content_type": "text/plain; charset=utf-8",
"created_at": "2026-10-03T08:02:17.553Z"
}파일 목록
/v1/filescursor가 없으면 최신 파일 limit개의 목록을 반환합니다. cursor를 주면 items와 next_cursor가 있는 한 페이지를 반환합니다. 다음 페이지는 같은 필터로 next_cursor를 cursor에 넘겨 받으며, 비어 있을 때까지 계속합니다.run_idstringsourcestringupload 또는 output.prefixstringruns/run_abc/.limitintegercursorstringnext_cursor.파일 다운로드
/v1/files/{id}curl $EPHEMERAL_URL/v1/files/file_9c41d2a07be35f1e8a6c0d4b9e2f7a13 \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" -o refunds.md파일 변경
/v1/files/{id}namestringexpires_in_daysintegerexpires_attimestampkeepbooleanuse_policyboolean응답은 파일 객체입니다. 이전 이름으로 파일을 참조하던 워크플로는 더 이상 파일을 찾지 못하지만, ID로 참조하는 경우에는 계속 동작합니다.
파일 삭제
/v1/files/{id}204 No Content를 반환합니다. ID를 받습니다.해당 파일을 참조하는 대기 중인 실행은 시작할 때 실패하고, 이후에 그 파일을 이름으로 지정하는 실행은 생성 시점에 400으로 실패합니다. 같은 이름의 이전 업로드가 있으면 이름으로 한 참조는 그 파일로 해석됩니다.
저장 공간과 보존
/v1/storageusageobjectfiles, file_bytes, state_entries, state_bytes, stores, total_bytes.policyobjectoutput_file_days, upload_file_days, state_days. 각각 일수이며, 제한이 없으면 null입니다.limitsobjectbillingobjectstorage_micros_per_gb_month, state_write_micros, owed_micros, owed_since, delete_after(미납금이 있을 때), unbilled_writes, unbilled_storage_micros, charged_last_30_days_micros, writes_refused./v1/storage/policynull입니다. 보내지 않은 필드는 현재 값을 유지합니다. 이미 저장된 항목과 이후 항목에 모두 적용되며, 기간이 지난 항목은 몇 분 안에 삭제됩니다. 파일 자체의 만료나 keep 설정, 항목의 ttl_seconds가 우선합니다.curl -X PUT $EPHEMERAL_URL/v1/storage/policy \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"output_file_days": 30, "upload_file_days": null, "state_days": 90}'호스팅 서비스에서는 GET /v1/me도 storage_micros_per_gb_month와 state_write_micros를 반환하며, 미납금이 있으면 storage_owed_micros도 반환합니다. 미납금이 $0.01 이상인 동안 파일, 실행 출력, 상태 저장은 402로 거부됩니다. 저장 비용을 참고하세요.
상태
실행이 공유하는 키-값 스토어입니다. 개념은 상태를 참고하세요. 스토어 이름은 영문자, 숫자, 점, 대시, 밑줄로 구성하고, 키는 최대 512바이트의 텍스트이며 경로에서는 URL 인코딩하고, 값은 최대 1 MiB의 JSON이면 무엇이든 됩니다.
/v1/state{"items": [{ "store", "entries", "bytes", "updated_at" }]}./v1/state/{store}prefix, cursor, limit. 반환: {"store", "items": [{ "store", "key", "version", "size", "created_at", "updated_at", "expires_at" }], "has_more", "next_cursor"}./v1/state/{store}{"deleted_entries": 12}를 반환합니다./v1/state/{store}/entries/{key}value와 version을 포함한 항목을 반환합니다./v1/state/{store}/entries/{key}valueany JSON필수ttl_secondsintegerif_versioninteger0은 항목이 없을 때만 쓴다는 뜻입니다. 일치하지 않으면 409를 반환합니다./v1/state/{store}/entries/{key}?if_version=을 지정하면 그 버전일 때만 삭제합니다./v1/state/{store}/entry?key=key 쿼리 매개변수로 전달합니다. GET, PUT, DELETE는 같은 본문을 받고 같은 응답을 돌려줍니다. URL처럼 슬래시를 포함하거나 슬래시가 연속되는 키에 사용하세요.호스팅 서비스에서는 쓰기 1,000회당 $0.01이 청구되며, 읽기는 무료입니다.