Upload file
Account-owned private file storage and retention.
此链接保留对应的中文文档路径。目前技术参考内容为英文;功能可用性以 DarkSeek 的实际部署和验证状态为准。
/v1/filesAvailability#
This page preserves the corresponding public documentation URL. The endpoint is not enabled for public use yet. A request example describes the intended interface, not a claim of deployed support. Consult the capability matrix and your access configuration before integration.
Multipart request#
Send one binary file and purpose=user_data. Optional expires_after[anchor]=created_at and expires_after[seconds] specify retention. The local storage engine accepts one hour to thirty days, with seven days as its default. Effective public upload limits are not certified.
curl "$DARKSEEK_BASE_URL/v1/files" \
-H "Authorization: Bearer $DARKSEEK_API_KEY" \
-F "file=@document.txt" \
-F "purpose=user_data"Storage is not model ingestion#
A stored file does not automatically become model context, a vector index, training data or vision input. Storage admission is distinct from inference admission. Unknown purposes must be rejected rather than treated as supported.
Lifecycle#
Private object bytes, durable reservations, streaming HTTP and a dedicated scheduled cleanup consumer are implemented with local SDK, D1/R2 and fault tests. New uploads require recent successful cleanup health; pending failed deletion or a stale backlog pauses admission. Public uploads remain disabled: the cleanup Worker is not activated, the private production bucket is not bound, and actual plan/resource/cost limits still require certification. Capacity is released only after physical deletion succeeds.
Admission and retries#
The configured deployment limit covers the complete multipart request, not only file bytes. A request without Content-Length reserves that entire ceiling before reading, then shrinks stored capacity to the actual file size after checked EOF. Daily admitted bytes are conservative technical limits, not a charge. An interrupted create can have an uncertain outcome; list owned files before retrying. Idempotent creation is not currently promised.