[{"data":1,"prerenderedAt":539},["ShallowReactive",2],{"docs:\u002Fdocs\u002Fapi\u002Faccount":3,"docs:nav":491},{"id":4,"title":5,"badge":6,"body":7,"description":25,"extension":483,"meta":484,"navigation":485,"order":120,"path":486,"section":487,"seo":488,"stem":489,"__hash__":490},"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 30 sectors — 120 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},"md",{},true,"\u002Fdocs\u002Fapi\u002Faccount","API reference",{"title":5,"description":25},"docs\u002Fapi\u002Faccount","ohOTnz9w35OZrq4Xuvv4xw-hnfNVC5ZKxmfeM7Kvkx8",[492,496,501,502,505,508,511,514,517,521,525,528,531,536],{"path":493,"title":494,"description":25,"section":495,"order":79,"badge":6},"\u002Fdocs\u002Faccounts","Accounts & billing","Guides",{"path":497,"title":498,"description":499,"section":500,"order":33,"badge":6},"\u002Fdocs\u002Fapi-quickstart","API quickstart","Create a billing account over HTTP, then register a storage key with the SDK.","API",{"path":486,"title":5,"description":25,"section":487,"order":120,"badge":6},{"path":503,"title":504,"description":25,"section":487,"order":109,"badge":6},"\u002Fdocs\u002Fapi\u002Fobjects","Objects",{"path":506,"title":507,"description":25,"section":487,"order":79,"badge":6},"\u002Fdocs\u002Fapi\u002Fplacement","Placement",{"path":509,"title":510,"description":25,"section":487,"order":33,"badge":6},"\u002Fdocs\u002Fapi\u002Fprovisioning","Credentials",{"path":512,"title":513,"description":25,"section":487,"order":96,"badge":6},"\u002Fdocs\u002Fapi\u002Fslabs","Slabs",{"path":515,"title":516,"description":25,"section":495,"order":96,"badge":6},"\u002Fdocs\u002Fauthentication","Authentication",{"path":518,"title":519,"description":25,"section":520,"order":79,"badge":6},"\u002Fdocs\u002Fconcepts","Concepts & data model","Introduction",{"path":522,"title":523,"description":25,"section":524,"order":33,"badge":6},"\u002Fdocs\u002Ferrors","Errors","Reference",{"path":526,"title":527,"description":25,"section":500,"order":33,"badge":6},"\u002Fdocs","Overview",{"path":529,"title":530,"description":25,"section":524,"order":79,"badge":6},"\u002Fdocs\u002Flimits","Limits & quotas",{"path":532,"title":533,"description":534,"section":535,"order":33,"badge":6},"\u002Fdocs\u002Fquickstart","CLI quickstart","Install the CLI, create an account, store one file, and read it back.","CLI",{"path":537,"title":538,"description":25,"section":495,"order":109,"badge":6},"\u002Fdocs\u002Frecovery","Recovery without Tessera",1794060205149]