{"openapi":"3.1.0","info":{"title":"Tenzro Labs Platform API","version":"1.0.0","description":"Browse the curated catalogue; manage credits, billing, keys, plans and rentals; place and pay orders; run Datasets, Fieldwork, Voices and Forecasts. Chat, embeddings, images, speech and the model list keep the OpenAI-compatible /v1 paths."},"servers":[{"url":"https://api.tenzro.xyz"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A Tenzro Labs API key (tzl_…)."},"ingestKey":{"type":"http","scheme":"bearer","description":"A Fieldwork ingest key (tzi_…): bound to one project and the origins listed on it, able only to run the participant flow. Safe in a browser. Create it with POST /fieldwork/projects/{id}/ingest-keys."},"serviceAssertion":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Tenzro Labs service's ES256 assertion: header kid = the RFC 7638 thumbprint of a key in the service's published JWKS; iss = sub = the service; aud = this endpoint; exp at most 60 s after iat; jti used once."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"scope":{"type":"string","description":"On a 403: the permission the key lacks."}}}}}}},"paths":{"/models":{"get":{"tags":["Catalogue"],"summary":"List models","description":"Every model in the catalogue with its pricing in Tenzro Labs credits (1 credit = 0.001 TNZO) and the machines that serve it. Charging starts when a payment rail is configured; until then usage is recorded at list price and charged nothing.\n\nNo key needed.","operationId":"getModels","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"qwen3.5-4b","name":"Qwen 3.5 4B","family":"Qwen","description":"Small, fast language model for chat, extraction and tool calls.","modality":"text","context_length":131072,"pricing":{"input_credits_per_mtok":0,"output_credits_per_mtok":0,"credits_per_request":0},"available":true,"machines":["tenzro-partner-cluster"]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models/{id}":{"get":{"tags":["Catalogue"],"summary":"Get a model","description":"One model, plus the current route order: the machines a request would go to, best first.\n\nNo key needed.","operationId":"getModelsById","x-tenzro-scope":"public","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"qwen3.5-4b","name":"Qwen 3.5 4B","family":"Qwen","description":"Small, fast language model for chat, extraction and tool calls.","modality":"text","context_length":131072,"pricing":{"input_credits_per_mtok":0,"output_credits_per_mtok":0,"credits_per_request":0},"available":true,"machines":["tenzro-partner-cluster"],"routes":[{"machine_id":"tenzro-partner-cluster","health":"online","region":"Europe","score":120}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/machines":{"get":{"tags":["Catalogue"],"summary":"List machines","description":"The machines Tenzro Labs runs, with hardware, live health, and what each offers. rent and subscribe are null where a machine offers neither.\n\nNo key needed.","operationId":"getMachines","x-tenzro-scope":"public","security":[],"parameters":[{"name":"service","in":"query","required":false,"description":"Only machines offering this.","schema":{"type":"string","enum":["serverless","rent","subscribe"]}},{"name":"region","in":"query","required":false,"description":"Exact region name, e.g. Europe.","schema":{"type":"string"}},{"name":"gpu","in":"query","required":false,"description":"true for GPU machines, false for CPU-only.","schema":{"type":"boolean"}},{"name":"operator","in":"query","required":false,"description":"Operator id.","schema":{"type":"string"}},{"name":"model","in":"query","required":false,"description":"Only machines set up to serve this model id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"tenzro-partner-cluster","name":"Tenzro Partner Cluster","region":"Europe","operator":{"id":"tenzro-partners","name":"Tenzro Partners"},"health":"online","hardware":{"gpus":[{"model":"NVIDIA DGX Spark (GB10)","count":1,"vram_gb":128},{"model":"NVIDIA RTX 5070 Ti","count":1,"vram_gb":16}],"cpu_cores":40,"memory_gb":160,"storage_gb":4000},"services":{"serverless":{"models":["qwen3.8-27b","qwen3.5-4b","timesfm-2.5-200m","qwen3-embedding-0.6b","flux2-klein-4b"],"serving_now":["qwen3.8-27b","qwen3.5-4b","timesfm-2.5-200m","qwen3-embedding-0.6b"]},"rent":null,"subscribe":null},"network":{"status":"active","reachability":"reachable"}}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/machines/{id}":{"get":{"tags":["Catalogue"],"summary":"Get a machine","description":"No key needed.","operationId":"getMachinesById","x-tenzro-scope":"public","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"tenzro-partner-cluster","name":"Tenzro Partner Cluster","region":"Europe","operator":{"id":"tenzro-partners","name":"Tenzro Partners"},"health":"online","hardware":{"gpus":[{"model":"NVIDIA DGX Spark (GB10)","count":1,"vram_gb":128},{"model":"NVIDIA RTX 5070 Ti","count":1,"vram_gb":16}],"cpu_cores":40,"memory_gb":160,"storage_gb":4000},"services":{"serverless":{"models":["qwen3.8-27b","qwen3.5-4b","timesfm-2.5-200m","qwen3-embedding-0.6b","flux2-klein-4b"],"serving_now":["qwen3.8-27b","qwen3.5-4b","timesfm-2.5-200m","qwen3-embedding-0.6b"]},"rent":null,"subscribe":null},"network":{"status":"active","reachability":"reachable"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/operators":{"get":{"tags":["Catalogue"],"summary":"List operators","description":"Who runs the machines, and which machines they run: operators on the Tenzro Network that partner with Tenzro Labs.\n\nNo key needed.","operationId":"getOperators","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"tenzro-partners","name":"Tenzro Partners","description":"Operators on the Tenzro Network that partner with Tenzro Labs: they rent it capacity or serve its traffic on demand, and it serves its curated models from their machines.","website":"https://tenzro.xyz","featured":true,"certifications":[],"machines":[{"id":"tenzro-partner-cluster","name":"Tenzro Partner Cluster","health":"online"}]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/operators/{id}":{"get":{"tags":["Catalogue"],"summary":"Get an operator","description":"No key needed.","operationId":"getOperatorsById","x-tenzro-scope":"public","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"tenzro-partners","name":"Tenzro Partners","website":"https://tenzro.xyz","featured":true,"certifications":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/route":{"get":{"tags":["Catalogue"],"summary":"Preview routing","description":"Which machines an unscoped request for a model would be sent to right now, in order.\n\nNo key needed.","operationId":"getRoute","x-tenzro-scope":"public","security":[],"parameters":[{"name":"model","in":"query","required":true,"description":"Model id.","schema":{"type":"string"}},{"name":"region","in":"query","required":false,"description":"Prefer machines in this region when otherwise equal.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"model":"qwen3.5-4b","routes":[{"machine_id":"tenzro-partner-cluster","health":"online","region":"Europe","score":120}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/packages":{"get":{"tags":["Catalogue"],"summary":"List credit packages and offers","description":"No key needed.","operationId":"getPackages","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-methods":{"get":{"tags":["Catalogue"],"summary":"List payment methods","description":"Whether card and stablecoin payments are set up, and which chains and tokens are accepted. available is false for a method that is not set up.\n\nNo key needed.","operationId":"getPaymentMethods","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"card":{"available":false,"processor":"stripe"},"stablecoin":{"available":false,"processor":"bridge","options":[]}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quotes":{"post":{"tags":["Catalogue"],"summary":"Price an order","description":"What an order would cost, without creating it. Accepts the same body as Create an order. amount_usd is the fiat price; details.credits is what it grants. Credit orders are refused until Tenzro Labs sets the credit price, as shown.\n\nNo key needed.","operationId":"postQuotes","x-tenzro-scope":"public","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"title":"Credits","type":"object","required":["type","amount_usd"],"properties":{"type":{"const":"credits"},"amount_usd":{"type":"integer","minimum":5,"maximum":5000,"description":"The fiat price to pay, in whole US dollars. The credits it buys are set by Tenzro Labs; until that price is set, credit orders are refused."},"machine_id":{"type":"string","description":"Pin the credit to one machine. Omit for credit usable anywhere."},"gift":{"type":"boolean","description":"Issue a redeemable ticket code instead of crediting this account."}}},{"title":"Package","type":"object","required":["type","package_id"],"properties":{"type":{"const":"package"},"package_id":{"type":"string"},"gift":{"type":"boolean"}}},{"title":"Rental","type":"object","required":["type","machine_id","cpu_cores","memory_gb","hours"],"properties":{"type":{"const":"rental"},"machine_id":{"type":"string"},"gpu":{"type":"integer","minimum":0},"cpu_cores":{"type":"integer","minimum":1},"memory_gb":{"type":"integer","minimum":1},"storage_gb":{"type":"integer","minimum":0},"hours":{"type":"integer","minimum":1}}},{"title":"Subscription","type":"object","required":["type","machine_id","plan_id"],"properties":{"type":{"const":"subscription"},"machine_id":{"type":"string"},"plan_id":{"type":"string"},"renew_subscription_id":{"type":"string","description":"Renew an existing stablecoin plan for another 30 days."}}}]},"example":{"type":"credits","amount_usd":25}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"error":{"code":"invalid_request","message":"Credit top-ups open when a payment rail is configured; until then usage is recorded at list price and charged nothing."}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"tags":["Account"],"summary":"Get the account and key","description":"The account the key belongs to, and the key's own permissions and scope.\n\nNeeds a key with the `read` permission.","operationId":"getMe","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"email":"dev@example.com","created_at":"2026-09-01T00:00:00.000Z","key":{"id":"key_Zb81Qm0sP4aT","name":"ci","prefix":"tzl_3kQ9aZ1x","permissions":["inference","read"],"scope":null,"subscription_id":null,"rental_id":null,"created_at":"2026-09-26T08:00:00.000Z","last_used_at":null,"revoked_at":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits":{"get":{"tags":["Credits"],"summary":"Get the credit balance","description":"Total balance and its split between credit usable anywhere (machine_id null) and credit pinned to machines.\n\nNeeds a key with the `read` permission.","operationId":"getCredits","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"total_credits":25000,"by_scope":[{"machine_id":null,"credits":25000}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/activity":{"get":{"tags":["Credits"],"summary":"List credit activity","description":"Credit added, plan credit granted, and usage charged, newest first.\n\nNeeds a key with the `read` permission.","operationId":"getCreditsActivity","x-tenzro-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"description":"1–500, default 50.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"812","type":"usage","credits":0,"machine_id":"tenzro-partner-cluster","at":"2026-09-26T08:01:12.000Z"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/redeem":{"post":{"tags":["Credits"],"summary":"Redeem a ticket","description":"Needs a key with the `manage` permission.","operationId":"postCreditsRedeem","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","example":"TZ-7K2M-9QXA-4BVN-P0RD"}}},"example":{"code":"TZ-7K2M-9QXA-4BVN-P0RD"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"redeemed":true,"credits":25000,"machine_id":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets":{"get":{"tags":["Credits"],"summary":"List tickets you bought","description":"Gift tickets and credit tickets this account bought, including codes not yet redeemed.\n\nNeeds a key with the `read` permission.","operationId":"getTickets","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"code":"TZ-7K2M-9QXA-4BVN-P0RD","credits":25000,"machine_id":null,"redeemed":false,"redeemed_by_you":false}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders":{"post":{"tags":["Orders"],"summary":"Create an order","description":"Creates an unpaid order for credits, a package, a rental, or a plan. Pay it with Pay an order, or send a person to pay_url. Nothing is charged until payment completes.\n\nNeeds a key with the `manage` permission.","operationId":"postOrders","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"title":"Credits","type":"object","required":["type","amount_usd"],"properties":{"type":{"const":"credits"},"amount_usd":{"type":"integer","minimum":5,"maximum":5000,"description":"The fiat price to pay, in whole US dollars. The credits it buys are set by Tenzro Labs; until that price is set, credit orders are refused."},"machine_id":{"type":"string","description":"Pin the credit to one machine. Omit for credit usable anywhere."},"gift":{"type":"boolean","description":"Issue a redeemable ticket code instead of crediting this account."}}},{"title":"Package","type":"object","required":["type","package_id"],"properties":{"type":{"const":"package"},"package_id":{"type":"string"},"gift":{"type":"boolean"}}},{"title":"Rental","type":"object","required":["type","machine_id","cpu_cores","memory_gb","hours"],"properties":{"type":{"const":"rental"},"machine_id":{"type":"string"},"gpu":{"type":"integer","minimum":0},"cpu_cores":{"type":"integer","minimum":1},"memory_gb":{"type":"integer","minimum":1},"storage_gb":{"type":"integer","minimum":0},"hours":{"type":"integer","minimum":1}}},{"title":"Subscription","type":"object","required":["type","machine_id","plan_id"],"properties":{"type":{"const":"subscription"},"machine_id":{"type":"string"},"plan_id":{"type":"string"},"renew_subscription_id":{"type":"string","description":"Renew an existing stablecoin plan for another 30 days."}}}]},"example":{"type":"credits","amount_usd":25}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"ord_4hYt2K9qLmN0pXr8","type":"credits","title":"Credit top-up · any machine","amount_usd":25,"currency":"usd","status":"pending","machine_id":null,"payment":{"method":null},"pay_url":"https://platform.tenzro.xyz/checkout/ord_4hYt2K9qLmN0pXr8","created_at":"2026-09-26T08:00:00.000Z","paid_at":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Orders"],"summary":"List orders","description":"Needs a key with the `read` permission.","operationId":"getOrders","x-tenzro-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"description":"1–200, default 50.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"ord_4hYt2K9qLmN0pXr8","type":"credits","title":"Credit top-up · any machine","amount_usd":25,"currency":"usd","status":"pending","machine_id":null,"payment":{"method":null},"pay_url":"https://platform.tenzro.xyz/checkout/ord_4hYt2K9qLmN0pXr8","created_at":"2026-09-26T08:00:00.000Z","paid_at":null}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/pay":{"post":{"tags":["Orders"],"summary":"Pay an order","description":"card returns a Stripe Checkout URL for a person to open. stablecoin returns a deposit address, token, chain and exact amount; the order is fulfilled when the deposit is received.\n\nNeeds a key with the `manage` permission.","operationId":"postOrdersByIdPay","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"enum":["card","stablecoin"]},"chain":{"type":"string","description":"Stablecoin only. See List payment methods."},"token":{"type":"string","description":"Stablecoin only, e.g. usdc."}}},"example":{"method":"stablecoin","chain":"base","token":"usdc"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"ord_4hYt2K9qLmN0pXr8","type":"credits","title":"Credit top-up · any machine","amount_usd":25,"currency":"usd","status":"pending","machine_id":null,"payment":{"method":"stablecoin","deposit":{"chain":"base","token":"usdc","amount":"25.00","address":"0x9f…c21","memo":null}},"pay_url":"https://platform.tenzro.xyz/checkout/ord_4hYt2K9qLmN0pXr8","created_at":"2026-09-26T08:00:00.000Z","paid_at":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}":{"get":{"tags":["Orders"],"summary":"Get an order","description":"Current status. For a paid credit order, includes the ticket: its code, the credits it grants, and whether you redeemed it. Poll this after paying.\n\nNeeds a key with the `read` permission.","operationId":"getOrdersById","x-tenzro-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"ord_4hYt2K9qLmN0pXr8","type":"credits","title":"Credit top-up · any machine","amount_usd":25,"currency":"usd","status":"paid","machine_id":null,"payment":{"method":null},"pay_url":"https://platform.tenzro.xyz/checkout/ord_4hYt2K9qLmN0pXr8","created_at":"2026-09-26T08:00:00.000Z","paid_at":"2026-09-26T08:03:00.000Z","ticket":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys":{"get":{"tags":["API keys"],"summary":"List API keys","description":"Needs a key with the `read` permission.","operationId":"getKeys","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"key_Zb81Qm0sP4aT","name":"ci","prefix":"tzl_3kQ9aZ1x","permissions":["inference","read"],"scope":null,"subscription_id":null,"rental_id":null,"created_at":"2026-09-26T08:00:00.000Z","last_used_at":null,"revoked_at":null}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["API keys"],"summary":"Create an API key","description":"The secret is returned once. A key can only grant permissions it holds. Scope with machine_id, subscription_id or rental_id; otherwise the key reaches every machine.\n\nNeeds a key with the `manage` permission.","operationId":"postKeys","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"permissions":{"type":"array","items":{"enum":["inference","read","manage","datasets:read","datasets:write","fieldwork:read","fieldwork:write","voices:speak","voices:batch","voices:train","voices:admin","wallets:read","wallets:write"]},"default":["inference"]},"machine_id":{"type":"string"},"subscription_id":{"type":"string"},"rental_id":{"type":"string"}}},"example":{"name":"ci","permissions":["inference","read"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"key_Zb81Qm0sP4aT","name":"ci","prefix":"tzl_3kQ9aZ1x","permissions":["inference","read"],"scope":null,"subscription_id":null,"rental_id":null,"created_at":"2026-09-26T08:00:00.000Z","last_used_at":null,"revoked_at":null,"secret":"tzl_3kQ9aZ1x…"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys/{id}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key","description":"Needs a key with the `manage` permission.","operationId":"deleteKeysById","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"key_Zb81Qm0sP4aT","revoked":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions":{"get":{"tags":["Plans & rentals"],"summary":"List plans","description":"No machine offers plans on testnet, so this list is empty.\n\nNeeds a key with the `read` permission.","operationId":"getSubscriptions","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/cancel":{"post":{"tags":["Plans & rentals"],"summary":"Cancel at period end","description":"Card plans only. The plan stays active until current_period_end.\n\nNeeds a key with the `manage` permission.","operationId":"postSubscriptionsByIdCancel","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"subs_Qp0r…","status":"active","auto_renews":false,"cancel_at_period_end":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/resume":{"post":{"tags":["Plans & rentals"],"summary":"Resume auto-renewal","description":"Needs a key with the `manage` permission.","operationId":"postSubscriptionsByIdResume","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"subs_Qp0r…","status":"active","auto_renews":true,"cancel_at_period_end":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rentals":{"get":{"tags":["Plans & rentals"],"summary":"List rentals","description":"No machine offers rentals on testnet, so this list is empty.\n\nNeeds a key with the `read` permission.","operationId":"getRentals","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/identity":{"get":{"tags":["Identity & agents"],"summary":"Get your Tenzro identity","description":"Your did:tenzro:human identity and wallet, rooted in your passkeys. manage_url is where passkeys and devices are managed.\n\nNeeds a key with the `read` permission.","operationId":"getIdentity","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"state":"ready","did":"did:tenzro:human:e0b27720-3043-84d5-9b66-49eba92b1a8d","wallet_address":"0xd8aa2ca0a3b56be2b58d6c883c7b3ed31d749428","error":null,"passkeys":2,"can_send":true,"manage_url":"https://accounts.tenzro.xyz/wallet?return_to=…"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents":{"get":{"tags":["Identity & agents"],"summary":"List agents","description":"Each agent's status and the limits its owner approved. An outstanding approval is collected first, so a list read after the owner approves shows the result.\n\nNeeds a key with the `read` permission.","operationId":"getAgents","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"agt_Zp3kQ9x1RmW4sT","name":"research-bot","status":"active","approval":null,"capabilities":["inference"],"limits":{"max_transaction_tnzo":null,"max_daily_tnzo":null,"daily_limit_credits":20000,"total_limit_credits":500000,"expires_in_days":90},"proposed":null,"did":"did:tenzro:machine:e0b27720-3043-84d5-9b66-49eba92b1a8d:7c1d…","wallet_address":"0x4b1f…","serving":{"nodes":3,"operators":2},"error":null,"created_at":"2026-09-26T09:05:00.000Z","approved_at":"2026-09-26T09:12:00.000Z","activated_at":"2026-09-26T09:12:00.000Z","expires_at":"2026-12-25T09:12:00.000Z","revoked_at":null}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Identity & agents"],"summary":"Create an agent","description":"Proposes an agent under your identity and returns approve_url. The account owner opens it, may adjust the settings, and approves with their passkey on the account site; a passkey cannot be pressed from code, so relay the link to a person. The agent becomes active once the approval is collected: reading the agent collects it. The settings the owner approved are the ones that apply. Refused with no_serving_nodes while the network has none.\n\nNeeds a key with the `manage` permission.","operationId":"postAgents","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"1 to 64 lowercase letters, digits, dots, dashes or underscores."},"capabilities":{"type":"array","items":{"enum":["inference","payments"]},"default":["inference"]},"max_transaction_tnzo":{"type":"string","description":"Network cap on any one payment the agent makes, in TNZO (e.g. \"1.5\")."},"max_daily_tnzo":{"type":"string","description":"Network cap on what the agent pays per day, in TNZO."},"daily_limit_credits":{"type":"number","description":"Tenzro Labs credits this agent may spend per UTC day."},"total_limit_credits":{"type":"number","description":"Tenzro Labs credits this agent may spend in total."},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650,"description":"The delegation ends after this many days."}}},"example":{"name":"research-bot","capabilities":["inference"],"daily_limit_credits":20000,"total_limit_credits":500000,"expires_in_days":90}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"approve_url":"https://accounts.tenzro.xyz/agents/approve/apr_3xQk…","agent":{"id":"agt_Zp3kQ9x1RmW4sT","name":"research-bot","status":"awaiting_approval","approval":{"kind":"create","state":"pending","approve_url":"https://accounts.tenzro.xyz/agents/approve/apr_3xQk…"},"capabilities":["inference"],"limits":null,"proposed":{"agent_name":"research-bot","capabilities":["inference"],"max_transaction_tnzo":"","max_daily_tnzo":"","daily_limit_credits":20000,"total_limit_credits":500000,"expires_in_days":90},"did":null,"wallet_address":null,"serving":{"nodes":3,"operators":2},"error":null,"created_at":"2026-09-26T09:05:00.000Z","approved_at":null,"activated_at":null,"expires_at":null,"revoked_at":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}":{"get":{"tags":["Identity & agents"],"summary":"Get an agent","description":"Includes what it has spent today and in total. Collects an outstanding approval first.\n\nNeeds a key with the `read` permission.","operationId":"getAgentsById","x-tenzro-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"agt_Zp3kQ9x1RmW4sT","name":"research-bot","status":"active","approval":null,"capabilities":["inference"],"limits":{"max_transaction_tnzo":null,"max_daily_tnzo":null,"daily_limit_credits":20000,"total_limit_credits":500000,"expires_in_days":90},"proposed":null,"did":"did:tenzro:machine:e0b27720-3043-84d5-9b66-49eba92b1a8d:7c1d…","wallet_address":"0x4b1f…","serving":{"nodes":3,"operators":2},"error":null,"created_at":"2026-09-26T09:05:00.000Z","approved_at":"2026-09-26T09:12:00.000Z","activated_at":"2026-09-26T09:12:00.000Z","expires_at":"2026-12-25T09:12:00.000Z","revoked_at":null,"spend":{"today_credits":0,"total_credits":0}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/settings":{"post":{"tags":["Identity & agents"],"summary":"Change an agent's limits","description":"Proposes new settings for an active agent, starting from the ones its owner approved last; fields you leave out stay as they are. Nothing changes until the owner approves at approve_url with their passkey. The agent's name cannot be changed.\n\nNeeds a key with the `manage` permission.","operationId":"postAgentsByIdSettings","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capabilities":{"type":"array","items":{"enum":["inference","payments"]},"default":["inference"]},"max_transaction_tnzo":{"type":"string","description":"Network cap on any one payment the agent makes, in TNZO (e.g. \"1.5\")."},"max_daily_tnzo":{"type":"string","description":"Network cap on what the agent pays per day, in TNZO."},"daily_limit_credits":{"type":"number","description":"Tenzro Labs credits this agent may spend per UTC day."},"total_limit_credits":{"type":"number","description":"Tenzro Labs credits this agent may spend in total."},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650,"description":"The delegation ends after this many days."}}},"example":{"daily_limit_credits":50000}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"approve_url":"https://accounts.tenzro.xyz/agents/approve/apr_3xQk…","agent":{"id":"agt_Zp3kQ9x1RmW4sT","name":"research-bot","status":"active","approval":{"kind":"update","state":"pending","approve_url":"https://accounts.tenzro.xyz/agents/approve/apr_3xQk…"},"capabilities":["inference"],"limits":{"max_transaction_tnzo":null,"max_daily_tnzo":null,"daily_limit_credits":20000,"total_limit_credits":500000,"expires_in_days":90},"proposed":null,"did":"did:tenzro:machine:e0b27720-3043-84d5-9b66-49eba92b1a8d:7c1d…","wallet_address":"0x4b1f…","serving":{"nodes":3,"operators":2},"error":null,"created_at":"2026-09-26T09:05:00.000Z","approved_at":"2026-09-26T09:12:00.000Z","activated_at":"2026-09-26T09:12:00.000Z","expires_at":"2026-12-25T09:12:00.000Z","revoked_at":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/keys":{"post":{"tags":["Identity & agents"],"summary":"Create an API key for an agent","description":"An inference key that identifies this agent. Its usage counts against the limits its owner approved. Active agents only. The secret is returned once.\n\nNeeds a key with the `manage` permission.","operationId":"postAgentsByIdKeys","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"machine_id":{"type":"string","description":"Pin the key to one machine."},"permissions":{"type":"array","items":{"enum":["inference","read","datasets:read","datasets:write","fieldwork:read","fieldwork:write","voices:speak","voices:batch","voices:train","voices:admin","wallets:read","wallets:write"]},"default":["inference"],"description":"What the agent's key may do: inference and any service scopes. Never manage."}}},"example":{"name":"research-bot prod","permissions":["inference","datasets:read"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"key_Zb81Qm0sP4aT","name":"ci","prefix":"tzl_3kQ9aZ1x","permissions":["inference"],"scope":null,"subscription_id":null,"rental_id":null,"created_at":"2026-09-26T08:00:00.000Z","last_used_at":null,"revoked_at":null,"agent_id":"agt_Zp3kQ9x1RmW4sT","secret":"tzl_…"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/revoke":{"post":{"tags":["Identity & agents"],"summary":"Revoke an agent","description":"Proposes revoking the agent. Once the owner approves at approve_url with their passkey, its identity is revoked on the network and every Platform API key it holds stops working.\n\nNeeds a key with the `manage` permission.","operationId":"postAgentsByIdRevoke","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"approve_url":"https://accounts.tenzro.xyz/agents/approve/apr_3xQk…","agent":{"id":"agt_Zp3kQ9x1RmW4sT","name":"research-bot","status":"active","approval":{"kind":"revoke","state":"pending","approve_url":"https://accounts.tenzro.xyz/agents/approve/apr_3xQk…"},"capabilities":["inference"],"limits":{"max_transaction_tnzo":null,"max_daily_tnzo":null,"daily_limit_credits":20000,"total_limit_credits":500000,"expires_in_days":90},"proposed":null,"did":"did:tenzro:machine:e0b27720-3043-84d5-9b66-49eba92b1a8d:7c1d…","wallet_address":"0x4b1f…","serving":{"nodes":3,"operators":2},"error":null,"created_at":"2026-09-26T09:05:00.000Z","approved_at":"2026-09-26T09:12:00.000Z","activated_at":"2026-09-26T09:12:00.000Z","expires_at":"2026-12-25T09:12:00.000Z","revoked_at":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/prices":{"get":{"tags":["Billing"],"summary":"Price table","description":"Every service and model price in credits, with monthly allowances per plan and the one-time trial.\n\nNo key needed.","operationId":"getBillingPrices","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"unit":"credits","services":[{"service":"voices.speak","group":"Voices","name":"Speech","unit":"1k_chars","unit_label":"1,000 characters","credits_per_unit":15,"allowances":{"free":10,"builder":500,"scale":5000,"trial":50}}],"models":[{"model":"qwen3.5-4b","service":"text","input_credits_per_mtok":50,"output_credits_per_mtok":300,"credits_per_request":0}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/tiers":{"get":{"tags":["Billing"],"summary":"Usage tiers","description":"Credits bought in total raise an account's tier, which raises its requests per minute per key and its monthly spend limit.\n\nNo key needed.","operationId":"getBillingTiers","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"tier":1,"name":"Tier 1","purchased_credits":5000,"rpm":50,"monthly_limit_credits":100000}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing":{"get":{"tags":["Billing"],"summary":"Balance, tier and limits","description":"Credits as the main figure, with TNZO and the USD equivalent at the purchase rate; usage tier; this month's spend against its limit; automatic top-ups.\n\nNeeds a key with the `read` permission.","operationId":"getBilling","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"balance":{"credits":12500,"tnzo":12.5,"usd":12.5},"usage_tier":{"tier":1,"name":"Tier 1","rpm":50,"monthly_limit_credits":100000,"purchased_credits":25000,"next":{"tier":2,"name":"Tier 2","purchased_credits":40000,"rpm":1000,"monthly_limit_credits":500000}},"month":{"spent_credits":2310.5,"limit_credits":100000,"own_limit_credits":null,"alert_points":[50,80,100]},"auto_reload":{"enabled":true,"threshold_credits":2000,"amount_usd":25,"card":"visa ending 4242","last_error":null},"invoicing":null,"charging":{"open":true,"reason":null,"starts_at":null},"credits_per_usd":1000}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Usage and cost","description":"Usage grouped by day, service, model, key or agent, with list and charged credits.\n\nNeeds a key with the `read` permission.","operationId":"getBillingUsage","x-tenzro-scope":"read","parameters":[{"name":"group_by","in":"query","required":false,"description":"day, service, model, key or agent (default day).","schema":{"type":"string","enum":["day","service","model","key","agent"]}},{"name":"from","in":"query","required":false,"description":"First day, YYYY-MM-DD (UTC). Default: the first of this month.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Last day, YYYY-MM-DD (UTC), inclusive. Default: today.","schema":{"type":"string"}},{"name":"month","in":"query","required":false,"description":"A whole month, YYYY-MM, instead of from/to.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01T00:00:00.000Z","to":"2026-10-12T00:00:00.000Z","group_by":"service","data":[{"key":"text","label":"Text","calls":1204,"list_credits":812.4,"credits":812.4}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/usage.csv":{"get":{"tags":["Billing"],"summary":"Usage export (CSV)","description":"Every usage record in the range as CSV, or one grouping when group_by is set. Optional key and service filters.\n\nNeeds a key with the `read` permission.","operationId":"getBillingUsageCsv","x-tenzro-scope":"read","parameters":[{"name":"group_by","in":"query","required":false,"description":"Export one grouping instead of every record.","schema":{"type":"string","enum":["day","service","model","key","agent"]}},{"name":"from","in":"query","required":false,"description":"First day, YYYY-MM-DD (UTC). Default: the first of this month.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Last day, YYYY-MM-DD (UTC), inclusive. Default: today.","schema":{"type":"string"}},{"name":"month","in":"query","required":false,"description":"A whole month, YYYY-MM, instead of from/to.","schema":{"type":"string"}},{"name":"key","in":"query","required":false,"description":"Only this key's usage.","schema":{"type":"string"}},{"name":"service","in":"query","required":false,"description":"Only this service.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":"time_utc,service,model,unit,quantity,key_id,agent_id,from_allowance,from_trial,list_credits,credits,ref"}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/limits":{"get":{"tags":["Billing"],"summary":"Spend limits","description":"This month's spend and limit, and each key's monthly limit.\n\nNeeds a key with the `read` permission.","operationId":"getBillingLimits","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"month":{"spent_credits":2310.5,"limit_credits":100000,"own_limit_credits":null,"alert_points":[50,80,100]},"usage_tier":{"tier":1,"name":"Tier 1","rpm":50,"monthly_limit_credits":100000,"purchased_credits":25000,"next":{"tier":2,"name":"Tier 2","purchased_credits":40000,"rpm":1000,"monthly_limit_credits":500000}},"keys":[{"key_id":"key_...","name":"Production","monthly_limit_credits":20000}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Billing"],"summary":"Set the account's spend limit","description":"monthly_limit_credits (null for the tier's limit; never above it), alert_points (percentages), alert_email. Priced calls stop at the limit.\n\nNeeds a key with the `manage` permission.","operationId":"postBillingLimits","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthly_limit_credits":{"type":["number","null"]},"alert_points":{"type":"array","items":{"type":"integer"}},"alert_email":{"type":"boolean"}}},"example":{"monthly_limit_credits":50000,"alert_points":[50,80,100]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"month":{"spent_credits":2310.5,"limit_credits":100000,"own_limit_credits":null,"alert_points":[50,80,100]},"usage_tier":{"tier":1,"name":"Tier 1","rpm":50,"monthly_limit_credits":100000,"purchased_credits":25000,"next":{"tier":2,"name":"Tier 2","purchased_credits":40000,"rpm":1000,"monthly_limit_credits":500000}},"keys":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/keys/{id}/limit":{"post":{"tags":["Billing"],"summary":"Set a key's monthly limit","description":"monthly_limit_credits for one key, or null to remove it. The key's priced calls stop at its limit.\n\nNeeds a key with the `manage` permission.","operationId":"postBillingKeysByIdLimit","x-tenzro-scope":"manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthly_limit_credits":{"type":["number","null"]}}},"example":{"monthly_limit_credits":20000}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"month":{"spent_credits":2310.5,"limit_credits":100000,"own_limit_credits":null,"alert_points":[50,80,100]},"usage_tier":{"tier":1,"name":"Tier 1","rpm":50,"monthly_limit_credits":100000,"purchased_credits":25000,"next":{"tier":2,"name":"Tier 2","purchased_credits":40000,"rpm":1000,"monthly_limit_credits":500000}},"keys":[{"key_id":"key_...","name":"Production","monthly_limit_credits":20000}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/auto-reload":{"get":{"tags":["Billing"],"summary":"Automatic top-ups","description":"Needs a key with the `read` permission.","operationId":"getBillingAutoReload","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"enabled":true,"threshold_credits":2000,"amount_usd":25,"card":"visa ending 4242","last_error":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Billing"],"summary":"Set automatic top-ups","description":"enabled, threshold_credits (top up when the balance falls below it) and amount_usd. The card is saved by a person on the Billing page.\n\nNeeds a key with the `manage` permission.","operationId":"postBillingAutoReload","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold_credits":{"type":"number"},"amount_usd":{"type":"integer"}}},"example":{"enabled":true,"threshold_credits":2000,"amount_usd":25}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"enabled":true,"threshold_credits":2000,"amount_usd":25,"card":"visa ending 4242","last_error":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/alerts":{"get":{"tags":["Billing"],"summary":"Billing alerts","description":"Spend passing its alert points, limits reached, low balance, automatic top-ups paid or failed.\n\nNeeds a key with the `read` permission.","operationId":"getBillingAlerts","x-tenzro-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"description":"At most this many (default 50, max 200).","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"12","kind":"org_spend","target":null,"period":"2026-10","point":80,"message":"This month's spend passed 80% of its 100,000 credits limit.","seen":false,"created_at":"2026-10-11T09:12:00.000Z"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/receipts":{"get":{"tags":["Billing"],"summary":"Receipts","description":"One receipt per paid purchase: top-ups, automatic top-ups and plan payments.\n\nNeeds a key with the `read` permission.","operationId":"getBillingReceipts","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"id":"ord_...","kind":"credits","title":"Credit top-up · any machine","status":"paid","paid_at":"2026-10-11T09:00:00.000Z","amount":{"value":25,"currency":"USD","text":"$25.00"},"credits":25000,"paid_with":"Card","auto_reload":false}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/receipts/{id}":{"get":{"tags":["Billing"],"summary":"One receipt","description":"Needs a key with the `read` permission.","operationId":"getBillingReceiptsById","x-tenzro-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"ord_...","kind":"credits","title":"Credit top-up · any machine","status":"paid","paid_at":"2026-10-11T09:00:00.000Z","amount":{"value":25,"currency":"USD","text":"$25.00"},"credits":25000,"paid_with":"Card","auto_reload":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/statements":{"get":{"tags":["Billing"],"summary":"Statement months","description":"Needs a key with the `read` permission.","operationId":"getBillingStatements","x-tenzro-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":[{"month":"2026-10"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/statements/{month}":{"get":{"tags":["Billing"],"summary":"Monthly statement","description":"Opening balance, credits bought and granted, usage by service, closing balance and the month's payments. Add ?format=csv for CSV.\n\nNeeds a key with the `read` permission.","operationId":"getBillingStatementsByMonth","x-tenzro-scope":"read","parameters":[{"name":"month","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"csv for a CSV document.","schema":{"type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"month":"2026-10","opening_credits":0,"added":{"purchased_credits":25000,"plan_credits":0},"used_credits":2310.5,"usage_by_service":[{"service":"text","name":"Text","calls":1204,"list_credits":812.4,"credits":812.4}],"other_usage_credits":0,"closing_credits":22689.5,"payments":[],"payments_total_usd":25}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/invoicing":{"post":{"tags":["Billing"],"summary":"Request invoiced billing","description":"For larger customers: asks Tenzro Labs to bill monthly by invoice. A person reviews and approves it.\n\nNeeds a key with the `manage` permission.","operationId":"postBillingInvoicing","x-tenzro-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}},"example":{"note":"About 5M credits a month from November."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"invoicing":"requested"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/project":{"get":{"tags":["Fieldwork ingest"],"summary":"The project: name, data type, prompts, capture format and limits, questions, consent text, endpoint list","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"getIngestProject","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/challenge":{"get":{"tags":["Fieldwork ingest"],"summary":"A page check to solve before starting a participant (SHA-256 proof of work)","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"getIngestChallenge","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/participants":{"post":{"tags":["Fieldwork ingest"],"summary":"Start a participant: country, region, dob, answers, challenge, nonce. Returns the participant token","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"postIngestParticipants","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"description":"A random id the page keeps (16-64 characters of A-Z a-z 0-9 _ -); limits count it per device","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/participant":{"get":{"tags":["Fieldwork ingest"],"summary":"The participant's state, consent and prompts","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"getIngestParticipant","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"parameters":[{"name":"X-Participant-Token","in":"header","required":true,"description":"The participant token returned when the participant was started","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/participant/consent":{"post":{"tags":["Fieldwork ingest"],"summary":"Record consent to the project's current text: {given: {scope: true}}","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"postIngestParticipantConsent","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"parameters":[{"name":"X-Participant-Token","in":"header","required":true,"description":"The participant token returned when the participant was started","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/items":{"post":{"tags":["Fieldwork ingest"],"summary":"Send one take (the body is a 16-bit mono WAV, 12 MB at most)","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"postIngestItems","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"parameters":[{"name":"prompt","in":"query","required":true,"description":"The prompt id the take answers","schema":{"type":"string"}},{"name":"X-Participant-Token","in":"header","required":true,"description":"The participant token returned when the participant was started","schema":{"type":"string"}},{"name":"X-Content-Sha256","in":"header","required":true,"description":"Hex SHA-256 of the body","schema":{"type":"string"}},{"name":"X-Fieldwork-Meta","in":"header","required":false,"description":"base64url JSON: {capture, answers}","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Fieldwork ingest"],"summary":"The participant's takes and their review status","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"getIngestItems","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"parameters":[{"name":"X-Participant-Token","in":"header","required":true,"description":"The participant token returned when the participant was started","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/participant/withdraw":{"post":{"tags":["Fieldwork ingest"],"summary":"Withdraw the participant and delete their recordings","description":"Needs the project's ingest key (`tzi_…`), sent from one of the origins listed on it. Not a Platform key.","operationId":"postIngestParticipantWithdraw","x-tenzro-scope":"ingest","security":[{"ingestKey":[]}],"parameters":[{"name":"X-Participant-Token","in":"header","required":true,"description":"The participant token returned when the participant was started","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forecasts":{"post":{"tags":["Forecasts"],"summary":"Forecast a time series","description":"Needs a key with the `inference` permission.","operationId":"postForecasts","x-tenzro-scope":"inference","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","history","horizon"],"properties":{"model":{"type":"string","examples":["timesfm-2.5-200m"]},"history":{"type":"array","items":{"type":"number"},"minItems":2},"horizon":{"type":"integer","minimum":1},"quantiles":{"type":"array","items":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1}},"frequency_seconds":{"type":"integer","minimum":1},"machine":{"type":"string","description":"Where to run the model. Default: tenzro-partner-cluster."}}}}}},"responses":{"200":{"description":"The forecast","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"forecast"},"model":{"type":"string"},"history_used":{"type":"integer"},"point":{"type":"array","items":{"type":"number"}},"quantile_levels":{"type":"array","items":{"type":"number"}},"quantiles":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"generation_time_ms":{"type":["integer","null"]}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets":{"get":{"tags":["Datasets"],"summary":"List datasets with item counts","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasets","x-tenzro-scope":"datasets:read","parameters":[{"name":"source","in":"query","required":false,"description":"fieldwork, voices or upload","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"audio, image, video or text","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Datasets"],"summary":"Create a dataset","description":"Needs a key with the `datasets:write` permission.","operationId":"postDatasets","x-tenzro-scope":"datasets:write","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}":{"get":{"tags":["Datasets"],"summary":"Get a dataset with counts and bytes","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsById","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Datasets"],"summary":"Delete a dataset, its files and its version exports","description":"Needs a key with the `datasets:write` permission.","operationId":"deleteDatasetsById","x-tenzro-scope":"datasets:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/items":{"get":{"tags":["Datasets"],"summary":"List items","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsByIdItems","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"pending, accepted, rejected or withdrawn","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Items to skip","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Datasets"],"summary":"Record an item for an object already stored under the dataset","description":"Needs a key with the `datasets:write` permission.","operationId":"postDatasetsByIdItems","x-tenzro-scope":"datasets:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/items/upload":{"post":{"tags":["Datasets"],"summary":"Upload a file as a new item (the body is the file; Content-Type and Content-Length required)","description":"Needs a key with the `datasets:write` permission.","operationId":"postDatasetsByIdItemsUpload","x-tenzro-scope":"datasets:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filename","in":"query","required":false,"description":"File name to keep","schema":{"type":"string"}},{"name":"duration_ms","in":"query","required":false,"description":"Audio or video length","schema":{"type":"string"}},{"name":"meta","in":"query","required":false,"description":"JSON object stored with the item","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/items/{itemId}":{"get":{"tags":["Datasets"],"summary":"Get an item","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsByIdItemsByItemId","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Datasets"],"summary":"Accept, reject or reopen an item","description":"Needs a key with the `datasets:write` permission.","operationId":"patchDatasetsByIdItemsByItemId","x-tenzro-scope":"datasets:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/items/{itemId}/download":{"get":{"tags":["Datasets"],"summary":"Download the item's file (byte ranges supported)","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsByIdItemsByItemIdDownload","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inline","in":"query","required":false,"description":"1 to play in place instead of downloading","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/versions":{"get":{"tags":["Datasets"],"summary":"List versions","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsByIdVersions","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Datasets"],"summary":"Freeze the current items as the next version","description":"Needs a key with the `datasets:write` permission.","operationId":"postDatasetsByIdVersions","x-tenzro-scope":"datasets:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/versions/{version}":{"get":{"tags":["Datasets"],"summary":"Get a version","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsByIdVersionsByVersion","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets/{id}/versions/{version}/export":{"get":{"tags":["Datasets"],"summary":"Download a version's manifest (JSONL) or Croissant metadata","description":"Needs a key with the `datasets:read` permission.","operationId":"getDatasetsByIdVersionsByVersionExport","x-tenzro-scope":"datasets:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"query","required":true,"description":"manifest or croissant","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/models":{"get":{"tags":["Voices"],"summary":"Speech models, what is serving now, and prices","description":"No key needed.","operationId":"getVoicesModels","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/status":{"get":{"tags":["Voices"],"summary":"Which parts of Voices are serving now","description":"No key needed.","operationId":"getVoicesStatus","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/detect":{"post":{"tags":["Voices"],"summary":"Check whether audio was made by Voices (multipart or raw audio, 25 MB)","description":"No key needed.","operationId":"postVoicesDetect","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/speech":{"post":{"tags":["Voices"],"summary":"Text to speech (WAV, streamed by default)","description":"Needs a key with the `voices:speak` permission.","operationId":"postVoicesSpeech","x-tenzro-scope":"voices:speak","responses":{"200":{"description":"OK","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/voices":{"get":{"tags":["Voices"],"summary":"Voices this key may use","description":"Needs a key with the `voices:speak` permission.","operationId":"getVoicesVoices","x-tenzro-scope":"voices:speak","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Voices"],"summary":"Add a voice with the speaker's consent","description":"Needs a key with the `voices:admin` permission.","operationId":"postVoicesVoices","x-tenzro-scope":"voices:admin","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/voices/{id}":{"get":{"tags":["Voices"],"summary":"Get a voice","description":"Needs a key with the `voices:speak` permission.","operationId":"getVoicesVoicesById","x-tenzro-scope":"voices:speak","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Voices"],"summary":"Delete a voice","description":"Needs a key with the `voices:admin` permission.","operationId":"deleteVoicesVoicesById","x-tenzro-scope":"voices:admin","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/voices/{id}/publish":{"post":{"tags":["Voices"],"summary":"Publish a voice as a stock voice (Tenzro Labs only)","description":"Needs a key with the `voices:admin` permission.","operationId":"postVoicesVoicesByIdPublish","x-tenzro-scope":"voices:admin","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/consent-challenges":{"post":{"tags":["Voices"],"summary":"Get the consent statement the speaker reads for cloning","description":"Needs a key with the `voices:admin` permission.","operationId":"postVoicesConsentChallenges","x-tenzro-scope":"voices:admin","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/outputs/{id}":{"get":{"tags":["Voices"],"summary":"A clip's signed provenance manifest and log entry","description":"Needs a key with the `voices:speak` permission.","operationId":"getVoicesOutputsById","x-tenzro-scope":"voices:speak","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/outputs/{id}/audio":{"get":{"tags":["Voices"],"summary":"A clip's audio (byte ranges supported)","description":"Needs a key with the `voices:speak` permission.","operationId":"getVoicesOutputsByIdAudio","x-tenzro-scope":"voices:speak","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/batches/estimate":{"post":{"tags":["Voices"],"summary":"Estimate a batch: clips, audio and credits","description":"Needs a key with the `voices:batch` permission.","operationId":"postVoicesBatchesEstimate","x-tenzro-scope":"voices:batch","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/batches":{"get":{"tags":["Voices"],"summary":"List batches","description":"Needs a key with the `voices:batch` permission.","operationId":"getVoicesBatches","x-tenzro-scope":"voices:batch","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Voices"],"summary":"Start a batch into a Dataset","description":"Needs a key with the `voices:batch` permission.","operationId":"postVoicesBatches","x-tenzro-scope":"voices:batch","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/batches/{id}":{"get":{"tags":["Voices"],"summary":"Get a batch","description":"Needs a key with the `voices:batch` permission.","operationId":"getVoicesBatchesById","x-tenzro-scope":"voices:batch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/batches/{id}/parts":{"get":{"tags":["Voices"],"summary":"A batch's clips","description":"Needs a key with the `voices:batch` permission.","operationId":"getVoicesBatchesByIdParts","x-tenzro-scope":"voices:batch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/batches/{id}/cancel":{"post":{"tags":["Voices"],"summary":"Cancel a batch","description":"Needs a key with the `voices:batch` permission.","operationId":"postVoicesBatchesByIdCancel","x-tenzro-scope":"voices:batch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/batches/{id}/resume":{"post":{"tags":["Voices"],"summary":"Resume a batch","description":"Needs a key with the `voices:batch` permission.","operationId":"postVoicesBatchesByIdResume","x-tenzro-scope":"voices:batch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom/estimate":{"post":{"tags":["Voices"],"summary":"Estimate custom voice training","description":"Needs a key with the `voices:train` permission.","operationId":"postVoicesCustomEstimate","x-tenzro-scope":"voices:train","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom":{"get":{"tags":["Voices"],"summary":"List custom voices","description":"Needs a key with the `voices:train` permission.","operationId":"getVoicesCustom","x-tenzro-scope":"voices:train","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Voices"],"summary":"Train a custom voice on a consented Dataset","description":"Needs a key with the `voices:train` permission.","operationId":"postVoicesCustom","x-tenzro-scope":"voices:train","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom/{id}":{"get":{"tags":["Voices"],"summary":"Get a custom voice and its training job","description":"Needs a key with the `voices:train` permission.","operationId":"getVoicesCustomById","x-tenzro-scope":"voices:train","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Voices"],"summary":"Delete a custom voice","description":"Needs a key with the `voices:train` permission.","operationId":"deleteVoicesCustomById","x-tenzro-scope":"voices:train","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom/{id}/cancel":{"post":{"tags":["Voices"],"summary":"Cancel training","description":"Needs a key with the `voices:train` permission.","operationId":"postVoicesCustomByIdCancel","x-tenzro-scope":"voices:train","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom/{id}/resume":{"post":{"tags":["Voices"],"summary":"Resume training","description":"Needs a key with the `voices:train` permission.","operationId":"postVoicesCustomByIdResume","x-tenzro-scope":"voices:train","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom/{id}/share":{"post":{"tags":["Voices"],"summary":"Share a custom voice with another organisation","description":"Needs a key with the `voices:admin` permission.","operationId":"postVoicesCustomByIdShare","x-tenzro-scope":"voices:admin","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/custom/{id}/export":{"post":{"tags":["Voices"],"summary":"Export a custom voice where its base licence allows","description":"Needs a key with the `voices:admin` permission.","operationId":"postVoicesCustomByIdExport","x-tenzro-scope":"voices:admin","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/policy":{"get":{"tags":["Fieldwork"],"summary":"The rules every project is held to, the reason codes, and the acceptable use policy","description":"No key needed.","operationId":"getFieldworkPolicy","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/preview":{"post":{"tags":["Fieldwork"],"summary":"Check settings without saving: errors, warnings and the participant notice they produce","description":"No key needed.","operationId":"postFieldworkPreview","x-tenzro-scope":"public","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects":{"get":{"tags":["Fieldwork"],"summary":"List projects","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjects","x-tenzro-scope":"fieldwork:read","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Fieldwork"],"summary":"Create a draft project (settings as in the console)","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjects","x-tenzro-scope":"fieldwork:write","responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}":{"get":{"tags":["Fieldwork"],"summary":"Get a project","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsById","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Fieldwork"],"summary":"Change settings. A live project takes only settings that pass every check; consent changes start a new consent version","description":"Needs a key with the `fieldwork:write` permission.","operationId":"patchFieldworkProjectsById","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Fieldwork"],"summary":"Delete a project that was never published","description":"Needs a key with the `fieldwork:write` permission.","operationId":"deleteFieldworkProjectsById","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/publish":{"post":{"tags":["Fieldwork"],"summary":"Publishing is done by the account holder in the console, where they accept the acceptable use policy","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjectsByIdPublish","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/pause":{"post":{"tags":["Fieldwork"],"summary":"Stop taking recordings for now","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjectsByIdPause","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/resume":{"post":{"tags":["Fieldwork"],"summary":"Take recordings again","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjectsByIdResume","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/close":{"post":{"tags":["Fieldwork"],"summary":"Close for good","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjectsByIdClose","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/stats":{"get":{"tags":["Fieldwork"],"summary":"Items by status and participants","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdStats","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/coverage":{"get":{"tags":["Fieldwork"],"summary":"Accepted items against each quota","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdCoverage","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/items":{"get":{"tags":["Fieldwork"],"summary":"Items, newest first; ?status=pending|accepted|rejected|disputed|auto_rejected|withdrawn&limit=&before=","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdItems","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/queue":{"get":{"tags":["Fieldwork"],"summary":"The next items for this key to review (items it already voted on are left out; gold items are mixed in)","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdQueue","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/items/{id}/review":{"post":{"tags":["Fieldwork"],"summary":"Vote on an item: {decision: accept|reject, reason (required to reject), note}","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkItemsByIdReview","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/items/{id}/gold":{"post":{"tags":["Fieldwork"],"summary":"Make a decided item a gold item with its known answer ({expect: accept|reject|null})","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkItemsByIdGold","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/items/{id}/audio":{"get":{"tags":["Fieldwork"],"summary":"The item's audio as WAV (byte ranges supported); ?copy=train for the 16 kHz copy","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkItemsByIdAudio","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/export":{"post":{"tags":["Fieldwork"],"summary":"Cut a dataset version of the accepted items: {dest_country, mechanism}; leaving the EU/EEA needs a transfer mechanism","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjectsByIdExport","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/exports":{"get":{"tags":["Fieldwork"],"summary":"Export log: who, when, where, under which mechanism","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdExports","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/withdrawals":{"get":{"tags":["Fieldwork"],"summary":"Withdrawn items to delete from your copies within 30 days and exclude from future training","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdWithdrawals","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/ingest-keys":{"get":{"tags":["Fieldwork"],"summary":"Ingest keys for this project (browser-safe keys for the project's own page; secrets are never listed)","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdIngestKeys","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Fieldwork"],"summary":"Create an ingest key {name, allowed_origins}: bound to this project and those origins, can only send recordings through /ingest. The secret is shown once","description":"Needs a key with the `fieldwork:write` permission.","operationId":"postFieldworkProjectsByIdIngestKeys","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/ingest-keys/{keyId}":{"patch":{"tags":["Fieldwork"],"summary":"Change the origins a key works from: {allowed_origins}","description":"Needs a key with the `fieldwork:write` permission.","operationId":"patchFieldworkProjectsByIdIngestKeysByKeyId","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Fieldwork"],"summary":"Revoke an ingest key; it stops on its next request","description":"Needs a key with the `fieldwork:write` permission.","operationId":"deleteFieldworkProjectsByIdIngestKeysByKeyId","x-tenzro-scope":"fieldwork:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/payouts":{"get":{"tags":["Fieldwork"],"summary":"Participant rewards (coming soon)","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdPayouts","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fieldwork/projects/{id}/reviewers":{"get":{"tags":["Fieldwork"],"summary":"Votes and gold agreement per reviewer","description":"Needs a key with the `fieldwork:read` permission.","operationId":"getFieldworkProjectsByIdReviewers","x-tenzro-scope":"fieldwork:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys/introspect":{"post":{"tags":["Keys"],"summary":"Introspect a key (services only)","description":"For Tenzro Labs services that accept Platform keys (Wallets). The caller proves itself with an ES256 assertion signed by a key in its published JWKS; only services listed by the Platform may ask. The answer names only the scopes under the caller's prefix. An unknown, revoked or malformed key, an agent that is no longer active, or a key with none of the caller's scopes is `{ \"active\": false }`.","operationId":"postKeysIntrospect","x-tenzro-scope":"service","security":[{"serviceAssertion":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}},"example":{"token":"tzl_…"}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean"},"sub":{"type":"string","description":"The Tenzro Labs account."},"key_id":{"type":"string"},"scope":{"type":"string","description":"Space-separated, only the caller's scopes."},"agent_id":{"type":["string","null"],"description":"Set when the key was issued to an agent."}}},"example":{"active":true,"sub":"acct_…","key_id":"key_…","scope":"wallets:read wallets:write","agent_id":null}}}},"401":{"description":"The assertion failed","content":{"application/json":{"example":{"error":"invalid_client","error_description":"The client assertion did not verify."}}}},"429":{"description":"Too many requests from this service; see Retry-After"}}}}}}