{"openapi":"3.1.0","info":{"title":"Static API","version":"dev"},"paths":{"/api/auth/nonce":{"get":{"summary":"Get a one-time nonce for a Sign-In with Ethereum message","tags":["auth"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/verify":{"post":{"summary":"Sign in with a signed SIWE message (EOA, EIP-1271 or EIP-6492 wallets)","tags":["auth"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":20,"maxLength":4000},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}},"required":["message","signature"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/logout":{"post":{"summary":"End this session","tags":["auth"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/sessions":{"get":{"summary":"Your signed-in sessions (no IP or device is stored)","tags":["auth"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/sessions/{id}":{"delete":{"summary":"End one session","tags":["auth"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/logout-all":{"post":{"summary":"End every session of this account","tags":["auth"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/wallets/link":{"post":{"summary":"Link another wallet to this account (sign a SIWE message with it)","tags":["auth"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":20,"maxLength":4000},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}},"required":["message","signature"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/wallets/{address}":{"delete":{"summary":"Unlink a wallet (not the last one)","tags":["auth"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/me":{"get":{"summary":"The signed-in account, its wallets, orgs and deposit details","tags":["account"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename your personal account (shown only to you and orgs you join)","tags":["account"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/me/balance":{"get":{"summary":"Available, held (open calls) and withdrawing balance","tags":["account"],"security":[{"apiKey":[]},{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/me/ledger":{"get":{"summary":"Ledger entries, newest first","tags":["account"],"parameters":[{"name":"before","in":"query","required":false,"schema":{}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/me/usage":{"get":{"summary":"Spend and tokens per day and model","tags":["account"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":365}}],"security":[{"apiKey":[]},{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/me/activity":{"get":{"summary":"Recent calls with their receipt leaves (no prompts or replies are ever stored)","tags":["account"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/keys":{"get":{"summary":"List API keys","tags":["keys"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an API key (the full key is shown once)","tags":["keys"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"default":"Untitled key","type":"string","maxLength":60},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["inference","jobs","usage:read"]}},"models":{"maxItems":100,"type":"array","items":{"type":"string"}},"cap_usd":{"type":["string","number","null"]},"expires_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":3650},{"type":"null"}]},"rate_limit_rpm":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/keys/{id}":{"patch":{"summary":"Rename a key or change its cap, model allow-list or rate limit","tags":["keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":60},"models":{"maxItems":100,"type":"array","items":{"type":"string"}},"cap_usd":{"type":["string","number","null"]},"rate_limit_rpm":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Revoke a key (takes effect immediately)","tags":["keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/models":{"get":{"summary":"Models with prices, list prices and live availability","tags":["inference"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/completions":{"post":{"summary":"OpenAI-compatible chat completions (streaming or not). Identity fields are stripped before any host sees the request.","tags":["inference"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","minLength":1},"messages":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{}},"required":["role","content"],"additionalProperties":{}}},"stream":{"type":"boolean"},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_completion_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"tools":{"maxItems":128,"type":"array","items":{}},"tool_choice":{},"stop":{"anyOf":[{"type":"string"},{"maxItems":4,"type":"array","items":{"type":"string"}}]}},"required":["model","messages"],"additionalProperties":{}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/messages":{"post":{"summary":"Anthropic Messages-compatible endpoint (text, images, tools; streaming or not)","tags":["inference"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","minLength":1},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{}},"required":["role","content"]}},"system":{},"stream":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number"},"stop_sequences":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{}},"required":["name","input_schema"]}},"tool_choice":{}},"required":["model","max_tokens","messages"],"additionalProperties":{}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/embeddings":{"post":{"summary":"OpenAI-compatible embeddings","tags":["inference"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"minItems":1,"maxItems":2048,"type":"array","items":{"type":"string"}}]}},"required":["model","input"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/outgoing":{"post":{"summary":"Show exactly what would be sent to the model host for this request (nothing is sent, nothing is charged)","tags":["transparency"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","minLength":1},"messages":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{}},"required":["role","content"],"additionalProperties":{}}},"stream":{"type":"boolean"},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_completion_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"tools":{"maxItems":128,"type":"array","items":{}},"tool_choice":{},"stop":{"anyOf":[{"type":"string"},{"maxItems":4,"type":"array","items":{"type":"string"}}]}},"required":["model","messages"],"additionalProperties":{}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/trial/challenge":{"get":{"summary":"Get a small proof-of-work puzzle; solving it starts a free trial","tags":["trial"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/trial/start":{"post":{"summary":"Redeem a solved puzzle for a trial cookie","tags":["trial"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"nonce":{"type":"string","maxLength":32}},"required":["id","nonce"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/trial/status":{"get":{"summary":"Free prompts left today, and how much of today's shared free budget is used","tags":["trial"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status":{"get":{"summary":"Public status: each model's hosts and circuit state, chain sync, last anchored epoch","tags":["status"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/withdrawals":{"post":{"summary":"Withdraw stablecoins to one of your linked wallets","tags":["billing"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"amount_usd":{"type":["string","number"]},"chain_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"token":{"type":"string"},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["amount_usd","chain_id","token"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Your withdrawals; ready ones include the signed voucher and ready-to-send calldata","tags":["billing"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/generations":{"post":{"summary":"Start an image, video or audio job (priced per unit, held up front, charged only on success)","tags":["media"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":4000},"seconds":{"type":"integer","minimum":1,"maximum":30},"n":{"type":"integer","minimum":1,"maximum":4},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["model","prompt"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/jobs/{id}":{"get":{"summary":"Job status","tags":["media"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/jobs/{id}/events":{"get":{"summary":"Job progress as server-sent events until it finishes","tags":["media"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/jobs/{id}/content":{"get":{"summary":"Download the result. Single use: the file is deleted once delivered.","tags":["media"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/epochs":{"get":{"summary":"Closed epochs: receipts root and count, anchor transaction, rewards root and total (public)","tags":["verify"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/receipts/{callId}":{"get":{"summary":"A call's receipt, its leaf and (once its epoch is built) the Merkle proof to the anchored root","tags":["verify"],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"apiKey":[]},{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rewards":{"get":{"summary":"Staking rewards for your wallets: amounts, proofs and ready-to-send claim calldata","tags":["rewards"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/orgs":{"post":{"summary":"Create an organization (you become its owner)","tags":["orgs"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Organizations you belong to","tags":["orgs"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/orgs/{id}/members":{"get":{"summary":"Members and roles","tags":["orgs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a member by wallet address","tags":["orgs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"role":{"type":"string","enum":["owner","admin","developer","billing","viewer"]}},"required":["address","role"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/orgs/{id}/members/{memberId}":{"patch":{"summary":"Change a member's role","tags":["orgs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","enum":["owner","admin","developer","billing","viewer"]}},"required":["role"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove a member (or leave)","tags":["orgs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/overview":{"get":{"summary":"Ledger health, platform totals, review queues, dead jobs","tags":["admin"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/models/{id}":{"patch":{"summary":"Enable/disable a model, change its routes or trial flag","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"free":{"type":"boolean"},"routes":{"minItems":1,"type":"array","items":{"type":"string","pattern":"^[a-z0-9]+:.+"}}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/models/{id}/prices":{"post":{"summary":"Publish a new price version (old calls keep the version they were billed at)","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input_per_1m_usd":{"type":["string","number"]},"output_per_1m_usd":{"type":["string","number"]},"unit_usd":{"type":["string","number"]},"list_input_per_1m_usd":{"type":["string","number","null"]},"list_output_per_1m_usd":{"type":["string","number","null"]},"list_unit_usd":{"type":["string","number","null"]},"list_source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/deposits":{"get":{"summary":"Deposits by status (default: waiting for review)","tags":["admin"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"review","type":"string","enum":["review","credited","orphaned","rejected"]}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/deposits/{id}/approve":{"post":{"summary":"Credit a deposit under review, at the USD value you set","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"usd":{"type":["string","number"]}},"required":["usd"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/deposits/{id}/reject":{"post":{"summary":"Reject a deposit under review (return the tokens off-platform)","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/inflows":{"get":{"summary":"Transfers we could not match to an account","tags":["admin"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/inflows/{id}/assign":{"post":{"summary":"Credit an unmatched transfer to an account","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"usd":{"type":["string","number"]}},"required":["account_id","usd"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/accounts/{id}/freeze":{"post":{"summary":"Freeze or unfreeze an account","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"frozen":{"type":"boolean"},"reason":{"type":"string","maxLength":300}},"required":["frozen","reason"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/promo":{"post":{"summary":"Grant promotional credit","tags":["admin"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"usd":{"type":["string","number"]},"reason":{"type":"string","minLength":3,"maxLength":300},"idempotency_key":{"type":"string","maxLength":100}},"required":["account_id","usd","reason","idempotency_key"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/flags/{key}":{"put":{"summary":"Set a feature flag","tags":["admin"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{}},"required":["value"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/queue/dead":{"get":{"summary":"Dead-lettered jobs","tags":["admin"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/queue/{id}/retry":{"post":{"summary":"Retry a dead job","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/audit":{"get":{"summary":"Audit log, newest first","tags":["admin"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/redeem":{"post":{"summary":"Redeem a promo code into the balance (once per account)","tags":["billing"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":4,"maxLength":64}},"required":["code"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/codes":{"get":{"summary":"Promo codes (hashes and hints only)","tags":["admin"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Mint a promo code (the code is returned once)","tags":["admin"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"usd":{"type":["string","number"]},"max_uses":{"default":1,"type":"integer","minimum":1,"maximum":100000},"expires_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":3650},{"type":"null"}]},"note":{"type":"string","maxLength":200}},"required":["usd"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/codes/{id}/disable":{"post":{"summary":"Disable a promo code","tags":["admin"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sealed/attestation":{"get":{"summary":"The enclave's attestation: encrypt to its public key after verifying it yourself (the SDK does)","tags":["sealed"],"parameters":[{"name":"model","in":"query","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sealed/chat/completions":{"post":{"summary":"Chat with an encrypted request; the reply comes back encrypted to your ephemeral key","tags":["sealed"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string"},"sealed":{"type":"object","properties":{"epk":{"type":"string","maxLength":4000000,"pattern":"^[A-Za-z0-9+/=]+$"},"iv":{"type":"string","maxLength":4000000,"pattern":"^[A-Za-z0-9+/=]+$"},"ct":{"type":"string","maxLength":4000000,"pattern":"^[A-Za-z0-9+/=]+$"}},"required":["epk","iv","ct"]},"max_tokens":{"default":1024,"type":"integer","exclusiveMinimum":0,"maximum":32000}},"required":["model","sealed"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks":{"get":{"summary":"Webhook endpoints, and the secret that signs per-job webhook_url callbacks","tags":["webhooks"],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add an endpoint (https, public address). Its signing secret is shown once.","tags":["webhooks"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["job.succeeded","job.failed","deposit.credited","withdrawal.ready","withdrawal.executed"]}}},"required":["url","events"]}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/{id}":{"delete":{"summary":"Remove an endpoint","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"session":[]}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/site":{"get":{"summary":"Public site settings (the CA shown in the hero)","tags":["status"],"security":[],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"},"session":{"type":"apiKey","in":"cookie","name":"static_session"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}},"required":["message","type","code"]}}}}}}