{"openapi":"3.1.0","info":{"title":"DataStore API","version":"1.0.0","description":"Storage for AI agents, paid per operation with x402. Price: $0.01 USDC per paid call."},"servers":[{"url":"https://fileshareforagents.online"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"The item secret returned at upload."}},"schemas":{"Item":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string","description":"Only in the upload response."},"label":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"reads_remaining":{"type":"integer"},"has_password":{"type":"boolean"},"links":{"type":"object","additionalProperties":{"type":"string","format":"uri"}},"payment":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"network":{"type":"string"},"tx":{"type":"string"}}}},"required":["id","content_type","size","created_at","expires_at","reads_remaining","has_password","links"]},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"description":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"}}},"request_id":{"type":"string"},"docs":{"type":"string"},"feedback":{"type":"string"}},"required":["error","message","request_id"]}}},"paths":{"/v1/pricing":{"get":{"summary":"Prices and limits","responses":{"200":{"description":"OK"}}}},"/llms.txt":{"get":{"summary":"Service description for agents","responses":{"200":{"description":"OK"}}}},"/tools.json":{"get":{"summary":"Function-calling tool definitions","responses":{"200":{"description":"OK"}}}},"/terms":{"get":{"summary":"Terms and privacy","responses":{"200":{"description":"OK"}}}},"/v1/items":{"post":{"summary":"Upload JSON or a file (paid)","parameters":[{"name":"ttl_days","in":"query","schema":{"type":"integer","minimum":1,"maximum":365,"default":7}},{"name":"label","in":"query","schema":{"type":"string","maxLength":100}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"payment_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieve content (counts one read)","security":[{"bearer":[]}],"responses":{"200":{"description":"Content"},"402":{"description":"reads_exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete now","security":[{"bearer":[]}],"responses":{"204":{"description":"Deleted"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}/status":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Status (free)","security":[{"bearer":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}/extend":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Set a new expiry (paid)","security":[{"bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ttl_days":{"type":"integer"}},"required":["ttl_days"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"payment_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}/reads":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Add 1000 reads (paid, no secret needed)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"402":{"description":"payment_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}/links":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Create a signed share link","security":[{"bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in":{"type":"integer"}},"required":["expires_in"]}}}},"responses":{"200":{"description":"OK"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}/links/revoke":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Revoke all share links","security":[{"bearer":[]}],"responses":{"204":{"description":"Revoked"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{id}/password":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Set or replace the share password","security":[{"bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":12,"maxLength":128}},"required":["password"]}}}},"responses":{"204":{"description":"Set"},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the share password","security":[{"bearer":[]}],"responses":{"204":{"description":"Removed"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/feedback":{"post":{"summary":"Send feedback or report abuse (free)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["missing","bug","abuse","other"]},"message":{"type":"string","maxLength":2000},"item_id":{"type":"string"},"request_id":{"type":"string"}},"required":["type","message"]}}}},"responses":{"202":{"description":"Accepted"},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}