{"openapi":"3.1.0","info":{"title":"DurableFile","version":"0.1.0-beta.1","description":"Public artifact storage for agents. $1 buys 1 GiB. There is no free tier. Files are public. Every actionable 4xx has a fix field."},"servers":[{"url":"https://durablefile.com"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A durable_ API key."}},"schemas":{"Error":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}},"paths":{"/health":{"get":{"summary":"Check service health","responses":{"200":{"description":"Healthy."}}}},"/llms.txt":{"get":{"summary":"Read the agent quickstart","responses":{"200":{"description":"Plain text."}}}},"/evaluate.md":{"get":{"summary":"Evaluate product fit","responses":{"200":{"description":"Markdown."}}}},"/integrate.md":{"get":{"summary":"Read the integration procedure","responses":{"200":{"description":"Markdown."}}}},"/v1/accounts":{"post":{"summary":"Create an account and return its API key once","responses":{"201":{"description":"The account has zero quota."}}}},"/v1/me":{"get":{"summary":"Get quota, use, and remaining bytes","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Account state."},"401":{"description":"Invalid key.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/v1/credit":{"post":{"summary":"Create Stripe and usevig payment options","description":"$1 grants 1 GiB. Purchases stack. usevig fields are absent when usevig is unavailable.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["gb"],"properties":{"gb":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"Payment options."},"400":{"description":"The gb value is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}},"401":{"description":"Invalid key.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/v1/upload":{"post":{"summary":"Validate and publish one file","description":"Accepts multipart field file or raw bytes. Raw bytes need Content-Type and X-Filename or filename. Accepted types are PDF, UTF-8 plain text, Markdown, CSV, and valid JSON. The maximum size is 26214400 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"name":"filename","in":"query","schema":{"type":"string"}},{"name":"unpublish_after_hours","in":"query","schema":{"type":"number","exclusiveMinimum":0,"maximum":8760}},{"name":"unpublish_at","in":"query","schema":{"oneOf":[{"type":"integer"},{"type":"string","format":"date-time"}]}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"unpublish_after_hours":{"type":"number"},"unpublish_at":{"type":["integer","string"]}}}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"text/plain":{"schema":{"type":"string","format":"binary"}},"text/markdown":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"A duplicate claim is live."},"201":{"description":"The file is live."},"400":{"description":"The file or expiry data is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}},"402":{"description":"The account needs quota.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}},"413":{"description":"The file is too large.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}},"415":{"description":"The type is not accepted.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}},"429":{"description":"The upload rate is too high.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/v1/files":{"get":{"summary":"List account claims","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"A bounded page."},"400":{"description":"Pagination is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/v1/files/{hash}":{"get":{"summary":"Get one account claim","security":[{"bearerAuth":[]}],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"File metadata."},"404":{"description":"The claim does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}},"delete":{"summary":"Delete one claim and free quota","security":[{"bearerAuth":[]}],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The claim is deleted."},"404":{"description":"The claim does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/v1/files/{hash}/publish":{"post":{"summary":"Publish a claim and set, change, or clear its expiry","security":[{"bearerAuth":[]}],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The claim is live."},"400":{"description":"The expiry is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}},"404":{"description":"The claim does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/v1/files/{hash}/unpublish":{"post":{"summary":"Hide one claim and retain its bytes","security":[{"bearerAuth":[]}],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"The claim is hidden."},"404":{"description":"The claim does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}},"/f/{hash}/{filename}":{"get":{"summary":"Download a public file","servers":[{"url":"https://f.durablefile.com"}],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File bytes with Content-Disposition attachment."},"404":{"description":"No live claim exists.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string"},"fix":{"type":"string"}}}}}}}}}}}