[{"data":1,"prerenderedAt":541},["ShallowReactive",2],{"docs:\u002Fdocs\u002Fapi\u002Faccount":3,"docs:nav":492},{"id":4,"title":5,"badge":6,"body":7,"description":483,"extension":484,"meta":485,"navigation":486,"order":120,"path":487,"section":488,"seo":489,"stem":490,"__hash__":491},"docs\u002Fdocs\u002Fapi\u002Faccount.md","Account",null,{"type":8,"value":9,"toc":478},"minimark",[10,15,19,55,65,124,174,241,249,253,260,307,313,362,374,378,381,465,474],[11,12,14],"h2",{"id":13},"get-account","GET \u002Faccount",[16,17,18],"p",{},"Returns usage counters for the credential signing the request.",[20,21,26],"pre",{"className":22,"code":23,"language":24,"meta":25,"style":25},"language-bash shiki shiki-themes github-dark-default github-dark-default","curl \"$TESSERA_API\u002Faccount?$AUTH\"\n","bash","",[27,28,29],"code",{"__ignoreMap":25},[30,31,34,38,42,46,49,52],"span",{"class":32,"line":33},"line",1,[30,35,37],{"class":36},"sAxfE","curl",[30,39,41],{"class":40},"skZ57"," \"",[30,43,45],{"class":44},"sb7RM","$TESSERA_API",[30,47,48],{"class":40},"\u002Faccount?",[30,50,51],{"class":44},"$AUTH",[30,53,54],{"class":40},"\"\n",[16,56,57,61,62],{},[58,59,60],"strong",{},"Response"," — ",[27,63,64],{},"200 OK",[20,66,70],{"className":67,"code":68,"language":69,"meta":25,"style":25},"language-json shiki shiki-themes github-dark-default github-dark-default","{\n  \"storageBytes\": 62914560,\n  \"readBytes\": 12582912,\n  \"writeBytes\": 67108864\n}\n","json",[27,71,72,77,94,107,118],{"__ignoreMap":25},[30,73,74],{"class":32,"line":33},[30,75,76],{"class":44},"{\n",[30,78,80,84,87,91],{"class":32,"line":79},2,[30,81,83],{"class":82},"sV7Mv","  \"storageBytes\"",[30,85,86],{"class":44},": ",[30,88,90],{"class":89},"sEQcL","62914560",[30,92,93],{"class":44},",\n",[30,95,97,100,102,105],{"class":32,"line":96},3,[30,98,99],{"class":82},"  \"readBytes\"",[30,101,86],{"class":44},[30,103,104],{"class":89},"12582912",[30,106,93],{"class":44},[30,108,110,113,115],{"class":32,"line":109},4,[30,111,112],{"class":82},"  \"writeBytes\"",[30,114,86],{"class":44},[30,116,117],{"class":89},"67108864\n",[30,119,121],{"class":32,"line":120},5,[30,122,123],{"class":44},"}\n",[125,126,127,140],"table",{},[128,129,130],"thead",{},[131,132,133,137],"tr",{},[134,135,136],"th",{},"Field",[134,138,139],{},"Description",[141,142,143,154,164],"tbody",{},[131,144,145,151],{},[146,147,148],"td",{},[27,149,150],{},"storageBytes",[146,152,153],{},"Currently stored bytes attributed to this credential.",[131,155,156,161],{},[146,157,158],{},[27,159,160],{},"readBytes",[146,162,163],{},"Cumulative bytes read.",[131,165,166,171],{},[146,167,168],{},[27,169,170],{},"writeBytes",[146,172,173],{},"Cumulative bytes written.",[125,175,176,189],{},[128,177,178],{},[131,179,180,183,186],{},[134,181,182],{},"Status",[134,184,185],{},"Body",[134,187,188],{},"Cause",[141,190,191,207,226],{},[131,192,193,198,204],{},[146,194,195],{},[27,196,197],{},"401",[146,199,200],{},[201,202,203],"em",{},"plain text",[146,205,206],{},"Signature or credential problem.",[131,208,209,214,219],{},[146,210,211],{},[27,212,213],{},"405",[146,215,216],{},[27,217,218],{},"method not allowed",[146,220,221,222,225],{},"Not a ",[27,223,224],{},"GET",".",[131,227,228,233,238],{},[146,229,230],{},[27,231,232],{},"503",[146,234,235],{},[27,236,237],{},"billing unavailable",[146,239,240],{},"The metering subsystem is not available on this deployment.",[242,243,246],"app-callout",{"title":244,"tone":245},"Metering is not fully wired up yet","warn",[16,247,248],{},"This endpoint may return zeros even after you have stored data. Byte-level metering is not yet\nrecorded on every code path, so treat these counters as indicative and not as a billing record.\nAuthoritative usage figures come from invoices. We would rather tell you this than let you build a\ndashboard on a counter that does not move.",[11,250,252],{"id":251},"storage-caps","Storage caps",[16,254,255,256,259],{},"When a credential has a storage cap and a write would exceed it, the write is refused with\n",[27,257,258],{},"402 Payment Required"," before anything is stored:",[20,261,263],{"className":67,"code":262,"language":69,"meta":25,"style":25},"{\n  \"error\": \"storage cap exceeded\",\n  \"capBytes\": 5497558138880,\n  \"incomingBytes\": 62914560\n}\n",[27,264,265,269,281,293,303],{"__ignoreMap":25},[30,266,267],{"class":32,"line":33},[30,268,76],{"class":44},[30,270,271,274,276,279],{"class":32,"line":79},[30,272,273],{"class":82},"  \"error\"",[30,275,86],{"class":44},[30,277,278],{"class":40},"\"storage cap exceeded\"",[30,280,93],{"class":44},[30,282,283,286,288,291],{"class":32,"line":96},[30,284,285],{"class":82},"  \"capBytes\"",[30,287,86],{"class":44},[30,289,290],{"class":89},"5497558138880",[30,292,93],{"class":44},[30,294,295,298,300],{"class":32,"line":109},[30,296,297],{"class":82},"  \"incomingBytes\"",[30,299,86],{"class":44},[30,301,302],{"class":89},"62914560\n",[30,304,305],{"class":32,"line":120},[30,306,123],{"class":44},[16,308,309,312],{},[27,310,311],{},"402"," can come from three endpoints, and each accounts differently:",[125,314,315,325],{},[128,316,317],{},[131,318,319,322],{},[134,320,321],{},"Endpoint",[134,323,324],{},"Charged at",[141,326,327,339,352],{},[131,328,329,334],{},[146,330,331],{},[27,332,333],{},"POST \u002Fprepare-write",[146,335,336],{},[27,337,338],{},"totalShards × 4 MiB",[131,340,341,346],{},[146,342,343],{},[27,344,345],{},"POST \u002Fslabs",[146,347,348,351],{},[27,349,350],{},"sectors × 4 MiB"," per slab",[131,353,354,359],{},[146,355,356],{},[27,357,358],{},"POST \u002Fobjects",[146,360,361],{},"4 KiB per object, for the metadata record",[16,363,364,365,368,369,225],{},"Note that accounting is in ",[58,366,367],{},"sectors",", not in logical bytes, and a sector is charged whole. A 100 KiB\nobject in its own slab is accounted at 15 sectors — 60 MiB. This is the strongest argument for\npacking many small objects into shared slabs; see\n",[370,371,373],"a",{"href":372},"\u002Fdocs\u002Fapi\u002Fslabs#packing-strategy","Packing strategy",[11,375,377],{"id":376},"handling-402-in-a-client","Handling 402 in a client",[16,379,380],{},"Treat it as a hard stop that needs an operator, not as a retryable error:",[20,382,386],{"className":383,"code":384,"language":385,"meta":25,"style":25},"language-ts shiki shiki-themes github-dark-default github-dark-default","if (res.status === 402) {\n  const { capBytes, incomingBytes } = await res.json()\n  \u002F\u002F Do not retry — the answer will not change until the cap or the usage does.\n  throw new QuotaExceeded({ capBytes, incomingBytes })\n}\n","ts",[27,387,388,406,441,447,461],{"__ignoreMap":25},[30,389,390,394,397,400,403],{"class":32,"line":33},[30,391,393],{"class":392},"srH4v","if",[30,395,396],{"class":44}," (res.status ",[30,398,399],{"class":392},"===",[30,401,402],{"class":89}," 402",[30,404,405],{"class":44},") {\n",[30,407,408,411,414,417,420,423,426,429,432,435,438],{"class":32,"line":79},[30,409,410],{"class":392},"  const",[30,412,413],{"class":44}," { ",[30,415,416],{"class":89},"capBytes",[30,418,419],{"class":44},", ",[30,421,422],{"class":89},"incomingBytes",[30,424,425],{"class":44}," } ",[30,427,428],{"class":392},"=",[30,430,431],{"class":392}," await",[30,433,434],{"class":44}," res.",[30,436,69],{"class":437},"sYGIp",[30,439,440],{"class":44},"()\n",[30,442,443],{"class":32,"line":96},[30,444,446],{"class":445},"sI3U9","  \u002F\u002F Do not retry — the answer will not change until the cap or the usage does.\n",[30,448,449,452,455,458],{"class":32,"line":109},[30,450,451],{"class":392},"  throw",[30,453,454],{"class":392}," new",[30,456,457],{"class":437}," QuotaExceeded",[30,459,460],{"class":44},"({ capBytes, incomingBytes })\n",[30,462,463],{"class":32,"line":120},[30,464,123],{"class":44},[16,466,467,468,470,471,473],{},"Retrying a ",[27,469,311],{}," on a schedule will simply produce a ",[27,472,311],{}," on a schedule. Surface it, alert on it, and\nraise the cap or delete something.",[475,476,477],"style",{},"html pre.shiki code .sAxfE, html code.shiki .sAxfE{--shiki-default:#FFA657;--shiki-dark:#FFA657}html pre.shiki code .skZ57, html code.shiki .skZ57{--shiki-default:#A5D6FF;--shiki-dark:#A5D6FF}html pre.shiki code .sb7RM, html code.shiki .sb7RM{--shiki-default:#E6EDF3;--shiki-dark:#E6EDF3}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sV7Mv, html code.shiki .sV7Mv{--shiki-default:#7EE787;--shiki-dark:#7EE787}html pre.shiki code .sEQcL, html code.shiki .sEQcL{--shiki-default:#79C0FF;--shiki-dark:#79C0FF}html pre.shiki code .srH4v, html code.shiki .srH4v{--shiki-default:#FF7B72;--shiki-dark:#FF7B72}html pre.shiki code .sYGIp, html code.shiki .sYGIp{--shiki-default:#D2A8FF;--shiki-dark:#D2A8FF}html pre.shiki code .sI3U9, html code.shiki .sI3U9{--shiki-default:#8B949E;--shiki-dark:#8B949E}",{"title":25,"searchDepth":96,"depth":96,"links":479},[480,481,482],{"id":13,"depth":79,"text":14},{"id":251,"depth":79,"text":252},{"id":376,"depth":79,"text":377},"GET \u002Faccount — stored, read, and written byte counters for your credential.","md",{},true,"\u002Fdocs\u002Fapi\u002Faccount","API reference",{"title":5,"description":483},"docs\u002Fapi\u002Faccount","HDh6An91LOnGO80rJSh-CwrtCTzhinE90fuVNaeayLY",[493,494,498,502,506,510,515,520,525,529,533,537],{"path":487,"title":5,"description":483,"section":488,"order":120,"badge":6},{"path":495,"title":496,"description":497,"section":488,"order":109,"badge":6},"\u002Fdocs\u002Fapi\u002Fobjects","Objects","Register, read, list, and delete objects — ordered lists of slab segments with encrypted keys and opaque metadata.",{"path":499,"title":500,"description":501,"section":488,"order":79,"badge":6},"\u002Fdocs\u002Fapi\u002Fplacement","Placement","POST \u002Fprepare-write — get the providers, contracts, and access tokens for writing a slab's shards.",{"path":503,"title":504,"description":505,"section":488,"order":33,"badge":6},"\u002Fdocs\u002Fapi\u002Fprovisioning","Credentials","Provision, verify, and revoke the ed25519 credential that is both your API identity and your account.",{"path":507,"title":508,"description":509,"section":488,"order":96,"badge":6},"\u002Fdocs\u002Fapi\u002Fslabs","Slabs","Register, read, list, unpin, and prune erasure-coded slabs — the layer that records which provider holds which shard.",{"path":511,"title":512,"description":513,"section":514,"order":79,"badge":6},"\u002Fdocs\u002Fauthentication","Authentication","Every request is signed with ed25519 over a blake2b hash of the method, host, path, expiry, and body. Here is the exact construction, with working code.","Guides",{"path":516,"title":517,"description":518,"section":519,"order":79,"badge":6},"\u002Fdocs\u002Fconcepts","Concepts & data model","Sectors, shards, slabs, objects, and accounts — what each one is, why the model has no filenames, and what that means for your integration.","Introduction",{"path":521,"title":522,"description":523,"section":524,"order":33,"badge":6},"\u002Fdocs\u002Ferrors","Errors","Status codes, the two different error body formats, and the one case where a failure arrives with a 200.","Reference",{"path":526,"title":527,"description":528,"section":519,"order":33,"badge":6},"\u002Fdocs","Overview","Tessera is an HTTP API for storing encrypted, erasure-coded objects across independent storage providers. This is the reference for it.",{"path":530,"title":531,"description":532,"section":524,"order":79,"badge":6},"\u002Fdocs\u002Flimits","Limits & quotas","Rate limits, storage caps, geometry constraints, and the size and encoding limits that apply to every request.",{"path":534,"title":535,"description":536,"section":514,"order":33,"badge":6},"\u002Fdocs\u002Fquickstart","Quickstart","Provision a credential, upload an object across 15 providers, and read it back. Fifteen minutes, one file of code.",{"path":538,"title":539,"description":540,"section":514,"order":96,"badge":6},"\u002Fdocs\u002Frecovery","Recovery without Tessera","How to retrieve your data if Tessera is unavailable, unwilling, or permanently gone — and what you need to keep on hand for that to work.",1786190914681]