{"openapi":"3.1.0","info":{"title":"Agentic Data Platform 🍓","version":"1.0.0","description":"senga, a data platform whose customer is an agent, sells predefined pipelines over your own sources: meeting memory (Google Drive), company map from the wiki (Confluence), retro magazine archive (HTTP files), and over public data weather threshold flags from Open-Meteo, each built, tested on sample data and delivered as a Docker image with MCP tools you run on your own infrastructure with your own values. platform.pipelines lists each one's steps and MCP tools. Any other task over your own documents in Google Drive, Confluence or behind an HTTP file listing is quotable too: senga designs a fact schema for it and assembles a documents pipeline of the same known steps (platform.documents). For anything else over public sources or APIs you hold a key for, describe it in plain language and senga designs, writes, builds and tests a custom MCP server for it. Plans that need none of your secrets can also be hosted as a preview. Quoting is free, payment is x402, and nothing is charged until the image passes its test."},"servers":[{"url":"https://senga.ngrok.app"}],"x-scenarios":{"failing_build":{"purpose":"A deterministic order whose built image fails its test, to check that a failed build settles nothing. No model, router or geocoding is involved.","quote":{"method":"POST","url":"https://senga.ngrok.app/v1/quotes","body":{"intent":"Published failing build: build an image that fails its test, to check that nothing is charged.","hints":{"scenario":"failing_build"}}},"quoted":"answers quoted at once with scenario failing_build, the regular price and a weather plan whose mcp_tools include unserved_tool, a tool the runtime does not serve","order":"pay it like any quote: POST /v1/orders {quote_id} → 402, resend with PAYMENT-SIGNATURE → 202 with order_id, access_token and status_url","expect":{"phases":["accepted","building","testing","failed"],"status":"failed","error_code":"test_failed","test_report":"passed false; the healthz check fails because the image refuses to start with a tool it does not serve","settlement":"payment.settlement stays null: settle is never called and the facilitator moves no money","authorization":"the signed authorization is never settled and lapses at its validBefore","artifact":"artifact_url answers 409 not_ready; there is no image to download","replay":"replaying the same PAYMENT-SIGNATURE answers 200 with the same failed order, never a charge"}},"topup_required":{"purpose":"A deterministic underpriced order: the quoted price covers one generation attempt, the first attempt fails its test on purpose, so the order pauses for a top-up. No model, router or geocoding is involved; it works whatever GENERATION_ATTEMPTS_INCLUDED is.","quote":{"method":"POST","url":"https://senga.ngrok.app/v1/quotes","body":{"intent":"Published underpriced order: a generated server whose first attempt fails its test, to check the mid-order price increase.","hints":{"scenario":"topup_required"}}},"quoted":"answers quoted at once with scenario topup_required, the custom server price and a spec with the single tool scenario_status","order":"pay it like any quote: POST /v1/orders {quote_id} → 402, resend with PAYMENT-SIGNATURE → 202 with order_id, access_token and status_url","expect":{"phases":["accepted","building","testing","topup_required"],"status":"topup_required","topup":"the status answer carries topup: extra_usd, total_usd, new_delivery_seconds, reason, expires_at, pay and cancel","pay":"POST topup.pay.url (or the MCP tool pay_topup) → 402 for topup.total_usd; resend with a fresh PAYMENT-SIGNATURE → 202; the second attempt passes its test, settles the new total once and the order is delivered","cancel":"or POST topup.cancel.url (MCP cancel_order) → the order fails with cancelled; nothing is charged","expiry":"an unanswered offer expires at topup.expires_at and the order fails with topup_declined; nothing is charged"}}},"components":{"securitySchemes":{"accessTokenQuery":{"type":"apiKey","in":"query","name":"access_token","description":"access_token returned with the 202 of POST /v1/orders; the returned URLs already carry it"},"accessTokenHeader":{"type":"apiKey","in":"header","name":"X-Access-Token","description":"the same access_token as a header"},"bearer":{"type":"http","scheme":"bearer","description":"the same access_token as Authorization: Bearer"},"extractKey":{"type":"http","scheme":"bearer","description":"the order's extract key (ek_…) baked into the delivered image's plan.json; only the image calls POST /v1/extract, a buyer never sends a key"},"registryBasic":{"type":"http","scheme":"basic","description":"docker login: user = order_id, password = the order's access_token"}},"schemas":{"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Order":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"],"additionalProperties":false},"Quote":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"needs_input"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["number","enum","string"]},"options":{"type":"array","items":{"type":"string"}},"default":{"type":"string"}},"required":["id","text","type"],"additionalProperties":false}},"answer":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{},"description":"POST this with your values in answers to continue the same quote"}},"required":["quote_id","expires_at","expired","routing","model_usage","status","questions","answer"],"additionalProperties":{}},{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"quoted"},"plan":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"the plan the image runs (null for a generated server, see spec)"},"config_schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"env the buyer sets at docker run; secret entries are writeOnly"},"sample_config":{"type":"string","description":"the config_schema as env lines with placeholders"},"mcp_tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"external_dependencies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"validation_gate":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"asset":{"type":"string","const":"USDC"},"network":{"type":"string"},"networks":{"minItems":1,"type":"array","items":{"type":"string"}},"scheme":{"type":"string","const":"exact"}},"required":["amount_usd","asset","network","networks","scheme"],"additionalProperties":{}},"per_run_cost_estimate_usd":{"type":"string"},"run_cost_estimate":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"delivery":{"type":"object","properties":{"promised_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"work_kind":{"type":"string"}},"required":["promised_seconds","work_kind"],"additionalProperties":false},"extraction":{"description":"senga's extraction spending cap for an image without the buyer's ANTHROPIC_API_KEY; not part of price, never charged","type":"object","properties":{"budget_usd":{"type":"string"},"ingest_usd":{"description":"estimated cost of one full ingest of the stated data_items through senga's fallback","type":"string"},"ingests_covered":{"description":"how many full ingests budget_usd covers by that estimate; 0 means the fallback alone does not finish the first ingest, bring your own ANTHROPIC_API_KEY","type":"integer","minimum":0,"maximum":9007199254740991},"charged_to_buyer":{"type":"boolean","const":false},"note":{"type":"string"}},"required":["budget_usd","charged_to_buyer","note"],"additionalProperties":false},"source_setup":{"description":"document pipelines only: where the source is set and which of its values are known","type":"object","properties":{"set_at":{"type":"string","const":"docker run"},"note":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","null"]},"description":"each non-secret source setting with the value stated in the intent, hints or answers, or null when it is still open"},"at_docker_run":{"type":"array","items":{"type":"string"},"description":"the source's credentials and account settings, never asked in a quote; set them only at docker run"},"optional_questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["number","enum","string"]},"options":{"type":"array","items":{"type":"string"}},"default":{"type":"string"}},"required":["id","text","type"],"additionalProperties":false},"description":"open source settings; answering is optional and never blocks the order"},"answer":{"description":"POST this with any of the source values (also to correct one already in values): sample_config is filled, price, plan steps and expiry stay","type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{}}},"required":["set_at","note","values","at_docker_run","optional_questions"],"additionalProperties":{}},"extracts":{"description":"what the predefined pipeline extracts, and nothing else","type":"string"},"not_extracted":{"description":"facts the buyer asked for that the predefined pipeline does not extract and none of its MCP tools answers","type":"array","items":{"type":"string"}},"order":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{},"description":"POST this to /v1/orders to buy the quote with x402"}},"required":["quote_id","expires_at","expired","routing","model_usage","status","plan","config_schema","sample_config","mcp_tools","external_dependencies","validation_gate","price","per_run_cost_estimate_usd","run_cost_estimate","delivery","order"],"additionalProperties":{}},{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"unsupported"},"reason":{"type":["string","null"]},"capabilities":{"type":"string","description":"the agent card listing what the platform can build"},"proposal":{"description":"a planned pipeline the runtime cannot build yet","type":"object","properties":{"plan":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"the plan the image runs (null for a generated server, see spec)"},"config_schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"env the buyer sets at docker run; secret entries are writeOnly"},"sample_config":{"type":"string","description":"the config_schema as env lines with placeholders"},"mcp_tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"external_dependencies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"validation_gate":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"asset":{"type":"string","const":"USDC"},"network":{"type":"string"},"networks":{"minItems":1,"type":"array","items":{"type":"string"}},"scheme":{"type":"string","const":"exact"}},"required":["amount_usd","asset","network","networks","scheme"],"additionalProperties":{}},"per_run_cost_estimate_usd":{"type":"string"},"run_cost_estimate":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"delivery":{"type":"object","properties":{"promised_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"work_kind":{"type":"string"}},"required":["promised_seconds","work_kind"],"additionalProperties":false},"orderable":{"type":"boolean","const":false},"runtime_missing":{"type":"array","items":{"type":"string"}}},"required":["plan","config_schema","sample_config","mcp_tools","external_dependencies","validation_gate","price","per_run_cost_estimate_usd","run_cost_estimate","delivery","orderable","runtime_missing"],"additionalProperties":{}}},"required":["quote_id","expires_at","expired","routing","model_usage","status","reason","capabilities"],"additionalProperties":{}}]},"Artifact":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string"},"digest":{"type":["string","null"]},"image":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"manifest.image with download_url"},"runner_image":{"anyOf":[{"type":"object","properties":{"from_archive":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"from_registry":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["from_archive","from_registry"],"additionalProperties":false},{"type":"null"}],"description":"the RunSpec image block; secret: it carries the access_token (registry_auth.password, archive headers), so pass it to the runner without logging it"},"manifest":{"anyOf":[{"type":"object","properties":{"image":{"type":"object","properties":{"ref":{"type":"string"},"digest":{"type":"string"},"platform":{"type":"string","const":"linux/amd64"},"file":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"archive_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"registry":{"default":null,"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"repository":{"type":"string"},"digest":{"type":"string"},"pinned":{"type":"string"},"username":{"type":"string"},"password_env":{"type":"string"},"login":{"type":"string"}},"required":["host","repository","digest","pinned","username","password_env","login"],"additionalProperties":false},{"type":"null"}]}},"required":["ref","digest","platform","file","bytes","registry"],"additionalProperties":false},"command":{"type":"array","items":{"type":"string"}},"run":{"type":"string"},"run_with":{"description":"image reference to start; equals image.ref and the last word of run; docker pull it only when image.registry is set, otherwise docker load image.tar first","type":"string"},"ports":{"type":"object","properties":{"http":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["http"],"additionalProperties":false},"healthz":{"type":"string"},"mcp":{"type":"object","properties":{"path":{"type":"string"},"transport":{"type":"string"}},"required":["path","transport"],"additionalProperties":false},"env":{"type":"array","items":{"type":"object","properties":{"env":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"required":{"type":"boolean"},"example":{"type":"string"},"description":{"type":"string"},"default":{"type":"string"},"secret":{"type":"boolean"},"alternatives":{"type":"array","items":{"type":"string"}}},"required":["env","required","example","description","secret"],"additionalProperties":false}},"required_env":{"type":"array","items":{"type":"string"}},"sample_config":{"type":"string"},"mounts":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"}},"domain_tools":{"type":"array","items":{"type":"string"}},"dependencies":{"type":"array","items":{"type":"string"}},"test_report":{"type":"string"}},"required":["image","command","run","ports","healthz","mcp","env","sample_config","mounts","tools","dependencies","test_report"],"additionalProperties":false},{"type":"null"}]},"test_report":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"image_digest":{"type":"string"},"fixture":{"anyOf":[{"type":"object","properties":{"source_id":{"type":"string"},"observations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["source_id","observations"],"additionalProperties":false},{"type":"null"}]},"checks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"passed":{"type":"boolean"},"detail":{"type":"string"}},"required":["name","passed","detail"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed"]},"started_at":{"type":"string"},"finished_at":{"type":["string","null"]},"source_ids":{"type":"array","items":{"type":"string"}},"processed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items stored by this run; processed, skipped and quarantined add up to the listed items"},"inserted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quarantined":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"new":{"description":"Items of a source the platform had not stored before","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed":{"description":"Items whose content differs from the newest stored revision of their source","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"description":"Items whose revision or content the platform already stored","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"array","items":{"type":"string"}},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"title":{"description":"Source name: page title or file name","type":["string","null"]},"revision":{"type":["string","null"]},"step":{"type":"string"},"branch":{"type":["string","null"]},"reason":{"type":"string"},"outcome":{"type":"string","enum":["inserted","skipped","quarantined"]},"change":{"description":"Against the newest stored revision of the source: a new source, changed content or the same content","type":"string","enum":["new","changed","unchanged"]},"extract":{"description":"Fact extraction of the item in this run","type":"object","properties":{"outcome":{"type":"string","enum":["extracted","failed","not_started","skipped"]},"reason":{"type":"string","description":"What the validation gate kept and rejected, or why extraction failed"}},"required":["outcome","reason"],"additionalProperties":false},"notes":{"description":"What the item's facts caused across sources, e.g. an open ownership conflict","type":"array","items":{"type":"string"}},"branches":{"description":"Branch each plan step took for the item in this run, by step id, from the branches the plan promises for that step; branch is the one of step","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["item","revision","step","branch","reason","outcome"],"additionalProperties":false}},"progress":{"description":"Only while the run is running: the step in progress and how many of its items are done out of total","type":"object","properties":{"step":{"type":"string"},"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["step","done","total"],"additionalProperties":false},"extract_path":{"type":"string","enum":["anthropic","senga","fake","unavailable"],"description":"How the image extracts facts: anthropic directly with the buyer's own ANTHROPIC_API_KEY, otherwise always senga's extraction API with the order key; fake only in senga's build test (EXTRACT_FAKE=1), a deterministic extractor without a model or HTTP; unavailable only for a plan without senga access"},"extract_note":{"description":"What the extract path means when it is not a real extraction, e.g. the build-time test extractor","type":"string"},"llm_usage":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_creation_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"calls":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","calls"],"additionalProperties":false,"description":"Model calls of one run and their tokens per model; cache tokens are part of the input"}},"extract_schema":{"description":"Generated fact schema the run extracted to (order:<order_id>)","type":"string"},"extract_records":{"description":"Records of the generated schema the gate kept in this run","type":"integer","minimum":0,"maximum":9007199254740991},"extract_dropped":{"description":"Records the gate dropped in this run, by reason code","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}}},"required":["run_id","state","started_at","finished_at","source_ids","processed","inserted","skipped","quarantined","errors","items"],"additionalProperties":false}},"samples":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"duration_ms":{"type":"number"}},"required":["passed","image_digest","fixture","checks","runs","samples","duration_ms"],"additionalProperties":false},{"type":"null"}]},"load":{"description":"download image.tar, docker load and run; reads the access_token from $SENGA_ACCESS_TOKEN","type":["string","null"]},"pull":{"description":"docker login, pull and run (registry only); reads the access_token from $SENGA_ACCESS_TOKEN","type":["string","null"]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to build this order (code agent attempts of a generated server); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","digest","image","runner_image","manifest","test_report","load","pull","build_model_usage"],"additionalProperties":false},"Recovery":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"challenge_id":{"type":"string"},"order_id":{"type":"string"},"message":{"type":"string","description":"sign this with EIP-191 personal_sign"},"expires_at":{"type":"string"},"sign":{"type":"string"},"redeem":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{}}},"required":["challenge_id","order_id","message","expires_at","sign","redeem"],"additionalProperties":false},{"type":"object","properties":{"order_id":{"type":"string"},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"previous_access_token":{"type":"string","const":"revoked"}},"required":["order_id","access_token","status_url","artifact_url","previous_access_token"],"additionalProperties":false}]},"PaymentRequired":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"x402Version":{"type":"number","const":2},"error":{"type":"string"},"resource":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}},"accepts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"number"}},"required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"additionalProperties":{}}},"extensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"code":{"type":"string","enum":["payment_required","invalid_payment"]},"hint":{"type":"string"}},"required":["x402Version","resource","accepts","code","hint"],"additionalProperties":{},"description":"x402 v2 PaymentRequired (the same as the base64 PAYMENT-REQUIRED header) with code and hint; an order waiting in payment_required also carries its order fields"},"JsonRpcError":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"-32700 parse error: the body is not JSON; -32600 invalid request: not a JSON-RPC 2.0 request, or a batch (send one request per call); -32601 method not found; -32602 invalid params; on /a2a a refused quote carries data {code, status} with the platform error code; -32603 internal error; on /a2a data {code, status} carries the platform error code; -32001 task not found (/a2a GetTask with an unknown quote_id); -32000 method not allowed: GET or DELETE on a stateless MCP server (HTTP 405)"},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id","error"],"additionalProperties":false},"ExtractRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string","minLength":1},"schema":{"anyOf":[{"type":"string","enum":["uc2.meeting_facts","uc3.company_map"]},{"type":"string","pattern":"^order:[\\s\\S]{1,}$","description":"The generated fact schema frozen in that order's plan (documents fallback); senga loads it from its own order"}]},"document":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"title":{"type":"string"},"meeting_date":{"type":["string","null"]},"language":{"type":["string","null"]}},"required":["content_sha256","title","meeting_date","language"]},"segments":{"minItems":1,"maxItems":400,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":["string","null"]},"text":{"type":"string","minLength":1}},"required":["index","speaker","text"]}}},"required":["order_id","schema","document","segments"]},"ExtractBatchRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string","minLength":1},"schema":{"anyOf":[{"type":"string","enum":["uc2.meeting_facts","uc3.company_map"]},{"type":"string","pattern":"^order:[\\s\\S]{1,}$","description":"The generated fact schema frozen in that order's plan (documents fallback); senga loads it from its own order"}]},"documents":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"document":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"title":{"type":"string"},"meeting_date":{"type":["string","null"]},"language":{"type":["string","null"]}},"required":["content_sha256","title","meeting_date","language"]},"segments":{"minItems":1,"maxItems":400,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":["string","null"]},"text":{"type":"string","minLength":1}},"required":["index","speaker","text"]}}},"required":["document","segments"],"description":"One document of a batch: its identity and its numbered segments"}}},"required":["order_id","schema","documents"],"description":"Several documents extracted in one model call: at most 12 documents and 400 segments in all; every record comes back under the document whose segment it cites"},"ExtractAnswer":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","segment"],"additionalProperties":{},"description":"One extracted record: its type within the schema, the segment it cites and the schema's fields of that type"}},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false},"decisions":{"type":"array","items":{"type":"object","properties":{"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"decision":{"type":"string","minLength":1},"keywords":{"type":"array","items":{"type":"string","minLength":1}}},"required":["segment","decision","keywords"],"additionalProperties":false}},"action_items":{"type":"array","items":{"type":"object","properties":{"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"owner":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"action":{"type":"string","minLength":1},"due_date":{"type":["string","null"]},"keywords":{"type":"array","items":{"type":"string","minLength":1}}},"required":["segment","owner","action","due_date","keywords"],"additionalProperties":false}},"discussed":{"type":"array","items":{"type":"object","properties":{"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"keywords":{"type":"array","items":{"type":"string","minLength":1}}},"required":["segment","keywords"],"additionalProperties":false,"description":"A segment that raises something not agreed (a proposal, option, open question or rejected idea), with keywords so a question in either language finds it"}}},"required":["records","usage","budget"],"additionalProperties":false,"description":"a registered schema; uc2.meeting_facts also returns decisions and action_items"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["type","segment","fields"],"additionalProperties":false}},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false}},"required":["records","usage","budget"],"additionalProperties":false,"description":"order:<order_id>, the generated schema frozen in that order"},{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","segment"],"additionalProperties":{},"description":"One extracted record: its type within the schema, the segment it cites and the schema's fields of that type"}}},"required":["content_sha256","records"],"additionalProperties":false}},"unplaced":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"records the model cited by a segment number that no document of the batch sent; dropped"},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false}},"required":["documents","unplaced","usage","budget"],"additionalProperties":false,"description":"a batch {documents: [...]} of a registered schema: the records of every document"},{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["type","segment","fields"],"additionalProperties":false}}},"required":["content_sha256","records"],"additionalProperties":false}},"unplaced":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"records the model cited by a segment number that no document of the batch sent; dropped"},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false}},"required":["documents","unplaced","usage","budget"],"additionalProperties":false,"description":"a batch {documents: [...]} of order:<order_id>: the generated schema's records of every document"}]},"GeneratedSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"record_types":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"description":{"type":"string","minLength":1,"maxLength":300},"fields":{"minItems":1,"maxItems":8,"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"description":{"type":"string","minLength":1,"maxLength":300},"required":{"type":"boolean"},"type":{"type":"string","const":"text"}},"required":["name","description","required","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"description":{"type":"string","minLength":1,"maxLength":300},"required":{"type":"boolean"},"type":{"type":"string","const":"number"}},"required":["name","description","required","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"description":{"type":"string","minLength":1,"maxLength":300},"required":{"type":"boolean"},"type":{"type":"string","const":"date"}},"required":["name","description","required","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"description":{"type":"string","minLength":1,"maxLength":300},"required":{"type":"boolean"},"type":{"type":"string","const":"boolean"}},"required":["name","description","required","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"description":{"type":"string","minLength":1,"maxLength":300},"required":{"type":"boolean"},"type":{"type":"string","const":"enum"},"values":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["name","description","required","type","values"],"additionalProperties":false}]}},"key":{"description":"Required fields that name the one thing several records describe over time (a contract number, a customer, a ticket); the current state of each thing merges its records, the latest overriding earlier values","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"as_of":{"description":"A date field that orders the records of one thing; without it the document date orders them","type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["name","description","fields"],"additionalProperties":false}}},"required":["record_types"],"additionalProperties":false,"description":"Fact schema generated for one documents order: at most 4 record types, at most 8 fields each, field types text, number, date, enum, boolean (enum with at most 12 values); every extracted record cites the one segment that states it. Frozen into the quote and the order."},"Credentials_google-drive":{"type":"object","properties":{"DRIVE_FOLDER_ID":{"type":"string","description":"Folder to read: transcripts (Google Docs, .txt, .vtt) and audio-only recordings directly in it.","examples":["<ID of the Google Drive folder with the meeting transcripts>"]},"GOOGLE_SA_JSON":{"type":"string","description":"Google Cloud service account key (JSON) the folder is shared with as Viewer; used only for the Drive API (drive.readonly).","examples":["<service account JSON with read access to the folder>"],"writeOnly":true}},"required":["DRIVE_FOLDER_ID","GOOGLE_SA_JSON"],"description":"Environment the buyer injects into the image at docker run for source google-drive (pipeline meetings); never sent to the platform"},"Credentials_confluence":{"type":"object","properties":{"CONFLUENCE_BASE_URL":{"type":"string","description":"Base URL of the Confluence Cloud site (https://your-site.atlassian.net, with or without /wiki) or of its API gateway (https://api.atlassian.com/ex/confluence/<cloud id>); /wiki is added when missing.","examples":["<base URL of the Confluence Cloud site, e.g. https://your-site.atlassian.net/wiki>"]},"CONFLUENCE_SPACE_KEY":{"type":"string","description":"Space whose pages and attachments are read.","examples":["<key of the Confluence space, e.g. ENG>"]},"CONFLUENCE_EMAIL":{"type":"string","description":"Atlassian account used with the API token (basic auth).","examples":["<e-mail of the Atlassian account that owns the API token>"]},"CONFLUENCE_API_TOKEN":{"type":"string","description":"API token of that account; read access to the space's pages and attachments is enough.","examples":["<Atlassian API token with read access to the space>"],"writeOnly":true}},"required":["CONFLUENCE_BASE_URL","CONFLUENCE_SPACE_KEY","CONFLUENCE_EMAIL","CONFLUENCE_API_TOKEN"],"description":"Environment the buyer injects into the image at docker run for source confluence (pipeline wiki); never sent to the platform"},"Credentials_http-files":{"type":"object","properties":{"SOURCE_URL":{"type":"string","description":"HTTP(S) file listing of the archive ({ items: [{ id, revision, sha256, mime_type, download_url }] }); downloads honour ETag / If-None-Match.","examples":["<http(s):// URL of the archive's file listing>"]}},"required":["SOURCE_URL"],"description":"Environment the buyer injects into the image at docker run for source http-files (pipeline http_archive); never sent to the platform"}}},"paths":{"/.well-known/agent-card.json":{"get":{"summary":"Capabilities, prices and how to buy","responses":{"200":{"description":"agent card"},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/.well-known/ard.json":{"get":{"summary":"Agentic Resource Discovery manifest pointing at the agent card","responses":{"200":{"description":"ARD manifest"},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/.well-known/x402":{"get":{"summary":"x402 merchant manifest","responses":{"200":{"description":"network, payTo, max_per_call_usd"},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/quotes":{"post":{"summary":"Free. Describe what you need; returns needs_input (questions), quoted (plan + price) or unsupported. An unsupported quote for a planned pipeline the runtime cannot build yet carries proposal (plan, config_schema, mcp_tools, price) with orderable false","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"intent":{"type":"string","minLength":1,"maxLength":4000},"hints":{"description":"optional hints such as source, storage or schedule; {\"scenario\": \"failing_build\"} or {\"scenario\": \"topup_required\"} quotes a published scenario at once (agent card scenarios)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"quote_id":{"type":"string"},"answers":{"description":"answers by question id; optional data_items, interval_seconds and run_count refine run_cost_estimate and are never asked; sent alone with quote_id they recalculate the estimate of a final quote without changing its price, plan or expiry","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}}},"examples":{"failing_build":{"summary":"the published failing build","value":{"intent":"Published failing build: build an image that fails its test, to check that nothing is charged.","hints":{"scenario":"failing_build"}}},"topup_required":{"summary":"the published underpriced order that pauses for a top-up","value":{"intent":"Published underpriced order: a generated server whose first attempt fails its test, to check the mid-order price increase.","hints":{"scenario":"topup_required"}}}}}}},"responses":{"200":{"description":"quote: needs_input (questions), quoted (plan, price, order) or unsupported (reason, optional proposal)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"needs_input"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["number","enum","string"]},"options":{"type":"array","items":{"type":"string"}},"default":{"type":"string"}},"required":["id","text","type"],"additionalProperties":false}},"answer":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{},"description":"POST this with your values in answers to continue the same quote"}},"required":["quote_id","expires_at","expired","routing","model_usage","status","questions","answer"],"additionalProperties":{}},{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"quoted"},"plan":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"the plan the image runs (null for a generated server, see spec)"},"config_schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"env the buyer sets at docker run; secret entries are writeOnly"},"sample_config":{"type":"string","description":"the config_schema as env lines with placeholders"},"mcp_tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"external_dependencies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"validation_gate":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"asset":{"type":"string","const":"USDC"},"network":{"type":"string"},"networks":{"minItems":1,"type":"array","items":{"type":"string"}},"scheme":{"type":"string","const":"exact"}},"required":["amount_usd","asset","network","networks","scheme"],"additionalProperties":{}},"per_run_cost_estimate_usd":{"type":"string"},"run_cost_estimate":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"delivery":{"type":"object","properties":{"promised_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"work_kind":{"type":"string"}},"required":["promised_seconds","work_kind"],"additionalProperties":false},"extraction":{"description":"senga's extraction spending cap for an image without the buyer's ANTHROPIC_API_KEY; not part of price, never charged","type":"object","properties":{"budget_usd":{"type":"string"},"ingest_usd":{"description":"estimated cost of one full ingest of the stated data_items through senga's fallback","type":"string"},"ingests_covered":{"description":"how many full ingests budget_usd covers by that estimate; 0 means the fallback alone does not finish the first ingest, bring your own ANTHROPIC_API_KEY","type":"integer","minimum":0,"maximum":9007199254740991},"charged_to_buyer":{"type":"boolean","const":false},"note":{"type":"string"}},"required":["budget_usd","charged_to_buyer","note"],"additionalProperties":false},"source_setup":{"description":"document pipelines only: where the source is set and which of its values are known","type":"object","properties":{"set_at":{"type":"string","const":"docker run"},"note":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","null"]},"description":"each non-secret source setting with the value stated in the intent, hints or answers, or null when it is still open"},"at_docker_run":{"type":"array","items":{"type":"string"},"description":"the source's credentials and account settings, never asked in a quote; set them only at docker run"},"optional_questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["number","enum","string"]},"options":{"type":"array","items":{"type":"string"}},"default":{"type":"string"}},"required":["id","text","type"],"additionalProperties":false},"description":"open source settings; answering is optional and never blocks the order"},"answer":{"description":"POST this with any of the source values (also to correct one already in values): sample_config is filled, price, plan steps and expiry stay","type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{}}},"required":["set_at","note","values","at_docker_run","optional_questions"],"additionalProperties":{}},"extracts":{"description":"what the predefined pipeline extracts, and nothing else","type":"string"},"not_extracted":{"description":"facts the buyer asked for that the predefined pipeline does not extract and none of its MCP tools answers","type":"array","items":{"type":"string"}},"order":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{},"description":"POST this to /v1/orders to buy the quote with x402"}},"required":["quote_id","expires_at","expired","routing","model_usage","status","plan","config_schema","sample_config","mcp_tools","external_dependencies","validation_gate","price","per_run_cost_estimate_usd","run_cost_estimate","delivery","order"],"additionalProperties":{}},{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"unsupported"},"reason":{"type":["string","null"]},"capabilities":{"type":"string","description":"the agent card listing what the platform can build"},"proposal":{"description":"a planned pipeline the runtime cannot build yet","type":"object","properties":{"plan":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"the plan the image runs (null for a generated server, see spec)"},"config_schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"env the buyer sets at docker run; secret entries are writeOnly"},"sample_config":{"type":"string","description":"the config_schema as env lines with placeholders"},"mcp_tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"external_dependencies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"validation_gate":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"asset":{"type":"string","const":"USDC"},"network":{"type":"string"},"networks":{"minItems":1,"type":"array","items":{"type":"string"}},"scheme":{"type":"string","const":"exact"}},"required":["amount_usd","asset","network","networks","scheme"],"additionalProperties":{}},"per_run_cost_estimate_usd":{"type":"string"},"run_cost_estimate":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"delivery":{"type":"object","properties":{"promised_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"work_kind":{"type":"string"}},"required":["promised_seconds","work_kind"],"additionalProperties":false},"orderable":{"type":"boolean","const":false},"runtime_missing":{"type":"array","items":{"type":"string"}}},"required":["plan","config_schema","sample_config","mcp_tools","external_dependencies","validation_gate","price","per_run_cost_estimate_usd","run_cost_estimate","delivery","orderable","runtime_missing"],"additionalProperties":{}}},"required":["quote_id","expires_at","expired","routing","model_usage","status","reason","capabilities"],"additionalProperties":{}}]}}}},"400":{"description":"intent_required / input_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"quote_final","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"quote_expired","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"quote_agent_unavailable / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/quotes/{quote_id}":{"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string"},"description":"quote_id from POST /v1/quotes"}],"get":{"summary":"Read a quote","responses":{"200":{"description":"quote","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"needs_input"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["number","enum","string"]},"options":{"type":"array","items":{"type":"string"}},"default":{"type":"string"}},"required":["id","text","type"],"additionalProperties":false}},"answer":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{},"description":"POST this with your values in answers to continue the same quote"}},"required":["quote_id","expires_at","expired","routing","model_usage","status","questions","answer"],"additionalProperties":{}},{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"quoted"},"plan":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"the plan the image runs (null for a generated server, see spec)"},"config_schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"env the buyer sets at docker run; secret entries are writeOnly"},"sample_config":{"type":"string","description":"the config_schema as env lines with placeholders"},"mcp_tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"external_dependencies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"validation_gate":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"asset":{"type":"string","const":"USDC"},"network":{"type":"string"},"networks":{"minItems":1,"type":"array","items":{"type":"string"}},"scheme":{"type":"string","const":"exact"}},"required":["amount_usd","asset","network","networks","scheme"],"additionalProperties":{}},"per_run_cost_estimate_usd":{"type":"string"},"run_cost_estimate":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"delivery":{"type":"object","properties":{"promised_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"work_kind":{"type":"string"}},"required":["promised_seconds","work_kind"],"additionalProperties":false},"extraction":{"description":"senga's extraction spending cap for an image without the buyer's ANTHROPIC_API_KEY; not part of price, never charged","type":"object","properties":{"budget_usd":{"type":"string"},"ingest_usd":{"description":"estimated cost of one full ingest of the stated data_items through senga's fallback","type":"string"},"ingests_covered":{"description":"how many full ingests budget_usd covers by that estimate; 0 means the fallback alone does not finish the first ingest, bring your own ANTHROPIC_API_KEY","type":"integer","minimum":0,"maximum":9007199254740991},"charged_to_buyer":{"type":"boolean","const":false},"note":{"type":"string"}},"required":["budget_usd","charged_to_buyer","note"],"additionalProperties":false},"source_setup":{"description":"document pipelines only: where the source is set and which of its values are known","type":"object","properties":{"set_at":{"type":"string","const":"docker run"},"note":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","null"]},"description":"each non-secret source setting with the value stated in the intent, hints or answers, or null when it is still open"},"at_docker_run":{"type":"array","items":{"type":"string"},"description":"the source's credentials and account settings, never asked in a quote; set them only at docker run"},"optional_questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["number","enum","string"]},"options":{"type":"array","items":{"type":"string"}},"default":{"type":"string"}},"required":["id","text","type"],"additionalProperties":false},"description":"open source settings; answering is optional and never blocks the order"},"answer":{"description":"POST this with any of the source values (also to correct one already in values): sample_config is filled, price, plan steps and expiry stay","type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{}}},"required":["set_at","note","values","at_docker_run","optional_questions"],"additionalProperties":{}},"extracts":{"description":"what the predefined pipeline extracts, and nothing else","type":"string"},"not_extracted":{"description":"facts the buyer asked for that the predefined pipeline does not extract and none of its MCP tools answers","type":"array","items":{"type":"string"}},"order":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{},"description":"POST this to /v1/orders to buy the quote with x402"}},"required":["quote_id","expires_at","expired","routing","model_usage","status","plan","config_schema","sample_config","mcp_tools","external_dependencies","validation_gate","price","per_run_cost_estimate_usd","run_cost_estimate","delivery","order"],"additionalProperties":{}},{"type":"object","properties":{"quote_id":{"type":"string"},"expires_at":{"type":"string"},"expired":{"type":"boolean","description":"true once expires_at has passed: the quote keeps its status but can no longer be answered or ordered (quote_expired)"},"routing":{"anyOf":[{"type":"object","properties":{"route":{"type":"string"},"decided_by":{"type":"string"}},"required":["route","decided_by"],"additionalProperties":false},{"type":"null"}],"description":"which pipeline serves the request and what decided it: parser (a literal weather request read without any model call), jev, llm, quote_agent or fallback"},"model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to answer this quote (routing, intake, design), all rounds; calls 0 when the deterministic parser read the request; senga's cost, not charged"},"scenario":{"type":"string"},"status":{"type":"string","const":"unsupported"},"reason":{"type":["string","null"]},"capabilities":{"type":"string","description":"the agent card listing what the platform can build"},"proposal":{"description":"a planned pipeline the runtime cannot build yet","type":"object","properties":{"plan":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"the plan the image runs (null for a generated server, see spec)"},"config_schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"env the buyer sets at docker run; secret entries are writeOnly"},"sample_config":{"type":"string","description":"the config_schema as env lines with placeholders"},"mcp_tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"external_dependencies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"validation_gate":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"asset":{"type":"string","const":"USDC"},"network":{"type":"string"},"networks":{"minItems":1,"type":"array","items":{"type":"string"}},"scheme":{"type":"string","const":"exact"}},"required":["amount_usd","asset","network","networks","scheme"],"additionalProperties":{}},"per_run_cost_estimate_usd":{"type":"string"},"run_cost_estimate":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"delivery":{"type":"object","properties":{"promised_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"work_kind":{"type":"string"}},"required":["promised_seconds","work_kind"],"additionalProperties":false},"orderable":{"type":"boolean","const":false},"runtime_missing":{"type":"array","items":{"type":"string"}}},"required":["plan","config_schema","sample_config","mcp_tools","external_dependencies","validation_gate","price","per_run_cost_estimate_usd","run_cost_estimate","delivery","orderable","runtime_missing"],"additionalProperties":{}}},"required":["quote_id","expires_at","expired","routing","model_usage","status","reason","capabilities"],"additionalProperties":{}}]}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/orders":{"post":{"summary":"x402-paid. Buy a quoted plan with {\"quote_id\"}. A valid authorization answers 202 at once; the build, test and settlement continue in the background. When delivered, pull the image (when manifest.image.registry is set) or download image.tar from artifact_url, and run manifest.run","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"base64 x402 v2 payment payload"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quote_id":{"type":"string"},"delivery":{"default":"self_hosted","description":"optional. self_hosted: the default when delivery is omitted: we start nothing; get the tested image (docker pull manifest.image.ref after docker login with the order when manifest.image.registry is set, otherwise image.tar from artifact_url) and run manifest.run on your infrastructure with your own values. hosted: optional preview, only for plans that need none of your secrets: we also run the tested image after settlement and give you an MCP URL (mcp.url) to call for 6 hours (until hosting.expires_at); then the container stops (hosting.status expired) and the image stays available to run yourself.","type":"string","enum":["hosted","self_hosted"]}},"required":["quote_id"]}}}},"responses":{"200":{"description":"replay of a delivered order (PAYMENT-RESPONSE header carries the settlement), or of an order that failed before settlement (status failed with its error; nothing was charged)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"202":{"description":"accepted (or replay of an order in progress): order_id, access_token, eta_seconds, status_url, poll","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"400":{"description":"quote_required / quote_not_priced / invalid_delivery / hosting_needs_buyer_secrets","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"PAYMENT-REQUIRED header carries x402 requirements (payment_required, invalid_payment); the body repeats them with code and hint","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"x402Version":{"type":"number","const":2},"error":{"type":"string"},"resource":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}},"accepts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"number"}},"required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"additionalProperties":{}}},"extensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"code":{"type":"string","enum":["payment_required","invalid_payment"]},"hint":{"type":"string"}},"required":["x402Version","resource","accepts","code","hint"],"additionalProperties":{},"description":"x402 v2 PaymentRequired (the same as the base64 PAYMENT-REQUIRED header) with code and hint; an order waiting in payment_required also carries its order fields"}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"payment_in_progress / quote_already_ordered (order_id in the body) / access_recovered","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"quote_expired / payment_window_closed","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"too_many_orders / unpaid_orders / rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"capacity_exhausted / hosting_full (retry_after_seconds, Retry-After) / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/orders/{order_id}":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"get":{"summary":"Order status with phase and eta_seconds; states accepted, building, testing, ready, payment_required, topup_required, settling, delivered, failed. When delivered: manifest, test_report, image, artifact and (if hosted) mcp","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"200":{"description":"order","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/orders/{order_id}/events":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"get":{"summary":"Server-Sent Events of the order (optional alternative to polling): event status with the full order on every phase change, progress with eta_seconds at least every 15 s, end when the order is delivered, failed, payment_required or topup_required. Works with ?access_token= for EventSource clients.","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"200":{"description":"text/event-stream"},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"too_many_streams / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/orders/{order_id}/artifact":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"get":{"summary":"Delivered artifact: manifest, test report, image digest, download URL, ready pull (registry, preferred) and load (image.tar, fallback) commands that read the token from $SENGA_ACCESS_TOKEN, and runner_image, the RunSpec image block (from_registry preferred, from_archive as the fallback; null when not available), secret because it carries the access_token","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"200":{"description":"artifact","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string"},"digest":{"type":["string","null"]},"image":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"manifest.image with download_url"},"runner_image":{"anyOf":[{"type":"object","properties":{"from_archive":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"from_registry":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["from_archive","from_registry"],"additionalProperties":false},{"type":"null"}],"description":"the RunSpec image block; secret: it carries the access_token (registry_auth.password, archive headers), so pass it to the runner without logging it"},"manifest":{"anyOf":[{"type":"object","properties":{"image":{"type":"object","properties":{"ref":{"type":"string"},"digest":{"type":"string"},"platform":{"type":"string","const":"linux/amd64"},"file":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"archive_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"registry":{"default":null,"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"repository":{"type":"string"},"digest":{"type":"string"},"pinned":{"type":"string"},"username":{"type":"string"},"password_env":{"type":"string"},"login":{"type":"string"}},"required":["host","repository","digest","pinned","username","password_env","login"],"additionalProperties":false},{"type":"null"}]}},"required":["ref","digest","platform","file","bytes","registry"],"additionalProperties":false},"command":{"type":"array","items":{"type":"string"}},"run":{"type":"string"},"run_with":{"description":"image reference to start; equals image.ref and the last word of run; docker pull it only when image.registry is set, otherwise docker load image.tar first","type":"string"},"ports":{"type":"object","properties":{"http":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["http"],"additionalProperties":false},"healthz":{"type":"string"},"mcp":{"type":"object","properties":{"path":{"type":"string"},"transport":{"type":"string"}},"required":["path","transport"],"additionalProperties":false},"env":{"type":"array","items":{"type":"object","properties":{"env":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"required":{"type":"boolean"},"example":{"type":"string"},"description":{"type":"string"},"default":{"type":"string"},"secret":{"type":"boolean"},"alternatives":{"type":"array","items":{"type":"string"}}},"required":["env","required","example","description","secret"],"additionalProperties":false}},"required_env":{"type":"array","items":{"type":"string"}},"sample_config":{"type":"string"},"mounts":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"}},"domain_tools":{"type":"array","items":{"type":"string"}},"dependencies":{"type":"array","items":{"type":"string"}},"test_report":{"type":"string"}},"required":["image","command","run","ports","healthz","mcp","env","sample_config","mounts","tools","dependencies","test_report"],"additionalProperties":false},{"type":"null"}]},"test_report":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"image_digest":{"type":"string"},"fixture":{"anyOf":[{"type":"object","properties":{"source_id":{"type":"string"},"observations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["source_id","observations"],"additionalProperties":false},{"type":"null"}]},"checks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"passed":{"type":"boolean"},"detail":{"type":"string"}},"required":["name","passed","detail"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed"]},"started_at":{"type":"string"},"finished_at":{"type":["string","null"]},"source_ids":{"type":"array","items":{"type":"string"}},"processed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items stored by this run; processed, skipped and quarantined add up to the listed items"},"inserted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quarantined":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"new":{"description":"Items of a source the platform had not stored before","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed":{"description":"Items whose content differs from the newest stored revision of their source","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"description":"Items whose revision or content the platform already stored","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"array","items":{"type":"string"}},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"title":{"description":"Source name: page title or file name","type":["string","null"]},"revision":{"type":["string","null"]},"step":{"type":"string"},"branch":{"type":["string","null"]},"reason":{"type":"string"},"outcome":{"type":"string","enum":["inserted","skipped","quarantined"]},"change":{"description":"Against the newest stored revision of the source: a new source, changed content or the same content","type":"string","enum":["new","changed","unchanged"]},"extract":{"description":"Fact extraction of the item in this run","type":"object","properties":{"outcome":{"type":"string","enum":["extracted","failed","not_started","skipped"]},"reason":{"type":"string","description":"What the validation gate kept and rejected, or why extraction failed"}},"required":["outcome","reason"],"additionalProperties":false},"notes":{"description":"What the item's facts caused across sources, e.g. an open ownership conflict","type":"array","items":{"type":"string"}},"branches":{"description":"Branch each plan step took for the item in this run, by step id, from the branches the plan promises for that step; branch is the one of step","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["item","revision","step","branch","reason","outcome"],"additionalProperties":false}},"progress":{"description":"Only while the run is running: the step in progress and how many of its items are done out of total","type":"object","properties":{"step":{"type":"string"},"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["step","done","total"],"additionalProperties":false},"extract_path":{"type":"string","enum":["anthropic","senga","fake","unavailable"],"description":"How the image extracts facts: anthropic directly with the buyer's own ANTHROPIC_API_KEY, otherwise always senga's extraction API with the order key; fake only in senga's build test (EXTRACT_FAKE=1), a deterministic extractor without a model or HTTP; unavailable only for a plan without senga access"},"extract_note":{"description":"What the extract path means when it is not a real extraction, e.g. the build-time test extractor","type":"string"},"llm_usage":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_creation_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"calls":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","calls"],"additionalProperties":false,"description":"Model calls of one run and their tokens per model; cache tokens are part of the input"}},"extract_schema":{"description":"Generated fact schema the run extracted to (order:<order_id>)","type":"string"},"extract_records":{"description":"Records of the generated schema the gate kept in this run","type":"integer","minimum":0,"maximum":9007199254740991},"extract_dropped":{"description":"Records the gate dropped in this run, by reason code","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}}},"required":["run_id","state","started_at","finished_at","source_ids","processed","inserted","skipped","quarantined","errors","items"],"additionalProperties":false}},"samples":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"duration_ms":{"type":"number"}},"required":["passed","image_digest","fixture","checks","runs","samples","duration_ms"],"additionalProperties":false},{"type":"null"}]},"load":{"description":"download image.tar, docker load and run; reads the access_token from $SENGA_ACCESS_TOKEN","type":["string","null"]},"pull":{"description":"docker login, pull and run (registry only); reads the access_token from $SENGA_ACCESS_TOKEN","type":["string","null"]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"additionalProperties":false,"description":"Claude calls senga made to build this order (code agent attempts of a generated server); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","digest","image","runner_image","manifest","test_report","load","pull","build_model_usage"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_ready","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/orders/{order_id}/artifact/image.tar":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"get":{"summary":"OCI image as docker-save tarball (docker load -i image.tar)","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"200":{"description":"application/x-tar"},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_ready","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v2/":{"get":{"summary":"OCI distribution API base, used by docker login (user order_id, password access_token). Read-only; there is no catalog","security":[{"registryBasic":[]}],"responses":{"200":{"description":"logged in"},"401":{"description":"UNAUTHORIZED: no or wrong login, with WWW-Authenticate: Basic; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"403":{"description":"DENIED: another order, or not delivered yet; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"429":{"description":"TOOMANYREQUESTS: too many failed logins; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"text/html":{}}}}}},"/v2/orders/{order_id}/manifests/{reference}":{"get":{"summary":"Image manifest of a delivered order (tag tested or the digest from manifest.image.registry); docker pull manifest.image.ref does this","security":[{"registryBasic":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"the repository is orders/<order_id>"},{"name":"reference","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OCI image index or manifest, Docker-Content-Digest header"},"401":{"description":"UNAUTHORIZED: no or wrong login, with WWW-Authenticate: Basic; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"403":{"description":"DENIED: another order, or not delivered yet; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"404":{"description":"MANIFEST_UNKNOWN; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"429":{"description":"TOOMANYREQUESTS: too many failed logins; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"text/html":{}}}}}},"/v2/orders/{order_id}/blobs/{digest}":{"get":{"summary":"Layer or config blob of a delivered order's image","security":[{"registryBasic":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"the repository is orders/<order_id>"},{"name":"digest","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"blob"},"401":{"description":"UNAUTHORIZED: no or wrong login, with WWW-Authenticate: Basic; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"403":{"description":"DENIED: another order, or not delivered yet; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"404":{"description":"BLOB_UNKNOWN; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"429":{"description":"TOOMANYREQUESTS: too many failed logins; OCI error body {\"errors\": [{\"code\", \"message\"}]}"},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"text/html":{}}}}}},"/mcp":{"post":{"summary":"The platform's own MCP server (streamable HTTP, stateless): describe_platform, quote, get_quote, place_order (x402 over MCP: payment in _meta[\"x402/payment\"], the PaymentPayload object or its base64 PAYMENT-SIGNATURE string), order_status, get_artifact, pay_topup (a topup_required order, paid like place_order), cancel_order (a topup_required order, free) and recover_access. place_order and pay_topup answer a PaymentRequired as an isError result; place_order carries the settlement in _meta[\"x402/payment-response\"].","responses":{"200":{"description":"JSON-RPC response; a tool failure is a result with isError, a protocol failure a JSON-RPC error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"result":{}},"required":["jsonrpc","id","result"],"additionalProperties":{}},{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"-32700 parse error: the body is not JSON; -32600 invalid request: not a JSON-RPC 2.0 request, or a batch (send one request per call); -32601 method not found; -32602 invalid params; on /a2a a refused quote carries data {code, status} with the platform error code; -32603 internal error; on /a2a data {code, status} carries the platform error code; -32001 task not found (/a2a GetTask with an unknown quote_id); -32000 method not allowed: GET or DELETE on a stateless MCP server (HTTP 405)"},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id","error"],"additionalProperties":false}]}}}},"400":{"description":"-32600: batches are not supported, send one request per call","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"-32700 parse error: the body is not JSON; -32600 invalid request: not a JSON-RPC 2.0 request, or a batch (send one request per call); -32601 method not found; -32602 invalid params; on /a2a a refused quote carries data {code, status} with the platform error code; -32603 internal error; on /a2a data {code, status} carries the platform error code; -32001 task not found (/a2a GetTask with an unknown quote_id); -32000 method not allowed: GET or DELETE on a stateless MCP server (HTTP 405)"},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id","error"],"additionalProperties":false}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}},"get":{"summary":"Not available: the server is stateless and has no SSE stream","responses":{"405":{"description":"-32000 method not allowed, use POST","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"-32700 parse error: the body is not JSON; -32600 invalid request: not a JSON-RPC 2.0 request, or a batch (send one request per call); -32601 method not found; -32602 invalid params; on /a2a a refused quote carries data {code, status} with the platform error code; -32603 internal error; on /a2a data {code, status} carries the platform error code; -32001 task not found (/a2a GetTask with an unknown quote_id); -32000 method not allowed: GET or DELETE on a stateless MCP server (HTTP 405)"},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id","error"],"additionalProperties":false}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}},"delete":{"summary":"Not available: the server is stateless and has no session","responses":{"405":{"description":"-32000 method not allowed, use POST","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"-32700 parse error: the body is not JSON; -32600 invalid request: not a JSON-RPC 2.0 request, or a batch (send one request per call); -32601 method not found; -32602 invalid params; on /a2a a refused quote carries data {code, status} with the platform error code; -32603 internal error; on /a2a data {code, status} carries the platform error code; -32001 task not found (/a2a GetTask with an unknown quote_id); -32000 method not allowed: GET or DELETE on a stateless MCP server (HTTP 405)"},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id","error"],"additionalProperties":false}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/a2a":{"post":{"summary":"A2A JSON-RPC 2.0 (SendMessage / message/send, GetTask / tasks/get): send what you need as a text part or a data part {intent, hints}; the task id is the quote_id, reply with {answers} while input-required; a completed task carries the priced quote as its artifact. Free.","responses":{"200":{"description":"JSON-RPC response: a Task (v0.3) or {task} (v1.0), or a JSON-RPC error (-32700 parse, -32600 invalid request, -32601 method, -32602 params or a refused quote with data {code, status}, -32603 internal, -32001 task not found)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"result":{}},"required":["jsonrpc","id","result"],"additionalProperties":{}},{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"-32700 parse error: the body is not JSON; -32600 invalid request: not a JSON-RPC 2.0 request, or a batch (send one request per call); -32601 method not found; -32602 invalid params; on /a2a a refused quote carries data {code, status} with the platform error code; -32603 internal error; on /a2a data {code, status} carries the platform error code; -32001 task not found (/a2a GetTask with an unknown quote_id); -32000 method not allowed: GET or DELETE on a stateless MCP server (HTTP 405)"},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id","error"],"additionalProperties":false}]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/orders/{order_id}/topup":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"post":{"summary":"Pay a top-up offer of a topup_required order: without PAYMENT-SIGNATURE 402 for the new total (topup.total_usd); with it the order resumes (202) and settles the new total only after its image passes the test. Order holder only, same wallet as the order.","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"202":{"description":"resumed order","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"PAYMENT-REQUIRED for the new total (payment_required, invalid_payment)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"x402Version":{"type":"number","const":2},"error":{"type":"string"},"resource":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}},"accepts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"number"}},"required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"additionalProperties":{}}},"extensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"code":{"type":"string","enum":["payment_required","invalid_payment"]},"hint":{"type":"string"}},"required":["x402Version","resource","accepts","code","hint"],"additionalProperties":{},"description":"x402 v2 PaymentRequired (the same as the base64 PAYMENT-REQUIRED header) with code and hint; an order waiting in payment_required also carries its order fields"}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_waiting_for_topup / payment_in_progress","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"topup_expired","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate_limited / too_many_orders","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"capacity_exhausted / hosting_full / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/orders/{order_id}/cancel":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"post":{"summary":"Cancel a topup_required order for free: it fails with cancelled and nothing is charged. Order holder only.","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"200":{"description":"cancelled order","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_waiting_for_topup","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/orders/{order_id}/recover":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"post":{"summary":"Recover a lost access_token with the paying wallet, free. Body {} answers a one-time challenge {challenge_id, message, expires_at}; body {challenge_id, signature} with an EIP-191 signature of message by the order's payer answers a new access_token and revokes the old one. An order_id in the body must match the path.","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"order_id":{"type":"string","description":"the order to recover; on /v1/orders/{order_id}/recover optional and must match the path"}}},{"type":"object","properties":{"order_id":{"type":"string","description":"the order to recover; on /v1/orders/{order_id}/recover optional and must match the path"},"challenge_id":{"type":"string"},"signature":{"type":"string","description":"0x EIP-191 personal_sign of the challenge message by the paying wallet"}},"required":["challenge_id","signature"]}]}}}},"responses":{"200":{"description":"challenge, or the recovered access_token with status_url and artifact_url","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"challenge_id":{"type":"string"},"order_id":{"type":"string"},"message":{"type":"string","description":"sign this with EIP-191 personal_sign"},"expires_at":{"type":"string"},"sign":{"type":"string"},"redeem":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{}}},"required":["challenge_id","order_id","message","expires_at","sign","redeem"],"additionalProperties":false},{"type":"object","properties":{"order_id":{"type":"string"},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"previous_access_token":{"type":"string","const":"revoked"}},"required":["order_id","access_token","status_url","artifact_url","previous_access_token"],"additionalProperties":false}]}}}},"400":{"description":"invalid_recovery / invalid_order_id","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"wallet_mismatch, challenge_unknown, challenge_used, challenge_expired or challenge_mismatch","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"recovery_busy / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/orders/{order_id}/recover/x402":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"post":{"summary":"Recover a lost access_token with an x402 authorization of the paying wallet, for wallets that cannot sign a message. Without PAYMENT-SIGNATURE it answers 402 for a proof amount; resend with PAYMENT-SIGNATURE signed by the order's payer → a new access_token, the old one revoked. the authorization only proves the paying wallet: it is verified, never settled and lapses at its validBefore, so nothing is charged.","responses":{"200":{"description":"the recovered access_token with status_url and artifact_url","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"previous_access_token":{"type":"string","const":"revoked"}},"required":["order_id","access_token","status_url","artifact_url","previous_access_token"],"additionalProperties":false}}}},"400":{"description":"invalid_order_id","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"wallet_mismatch or proof_used","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"PAYMENT-REQUIRED header carries the x402 requirement of the proof (payment_required, invalid_payment); never settled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"x402Version":{"type":"number","const":2},"error":{"type":"string"},"resource":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}},"accepts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"number"}},"required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"additionalProperties":{}}},"extensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"code":{"type":"string","enum":["payment_required","invalid_payment"]},"hint":{"type":"string"}},"required":["x402Version","resource","accepts","code","hint"],"additionalProperties":{},"description":"x402 v2 PaymentRequired (the same as the base64 PAYMENT-REQUIRED header) with code and hint; an order waiting in payment_required also carries its order fields"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/v1/orders/recover":{"post":{"summary":"The same recovery with the order in the body: {order_id} answers the challenge, {order_id, challenge_id, signature} redeems it. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"order_id":{"type":"string","description":"the order to recover; on /v1/orders/{order_id}/recover optional and must match the path"}},"required":["order_id"]},{"type":"object","properties":{"order_id":{"type":"string","description":"the order to recover; on /v1/orders/{order_id}/recover optional and must match the path"},"challenge_id":{"type":"string"},"signature":{"type":"string","description":"0x EIP-191 personal_sign of the challenge message by the paying wallet"}},"required":["order_id","challenge_id","signature"]}]}}}},"responses":{"200":{"description":"challenge, or the recovered access_token with status_url and artifact_url","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"challenge_id":{"type":"string"},"order_id":{"type":"string"},"message":{"type":"string","description":"sign this with EIP-191 personal_sign"},"expires_at":{"type":"string"},"sign":{"type":"string"},"redeem":{"type":"object","properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","url","body"],"additionalProperties":{}}},"required":["challenge_id","order_id","message","expires_at","sign","redeem"],"additionalProperties":false},{"type":"object","properties":{"order_id":{"type":"string"},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"previous_access_token":{"type":"string","const":"revoked"}},"required":["order_id","access_token","status_url","artifact_url","previous_access_token"],"additionalProperties":false}]}}}},"400":{"description":"invalid_recovery / invalid_order_id","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"wallet_mismatch, challenge_unknown, challenge_used, challenge_expired or challenge_mismatch","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"recovery_busy / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/orders/{order_id}/payment":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"post":{"summary":"x402-paid alias for POST /v1/orders with quote_id (per spec table). A fresh payment authorization for an order, typically one waiting in payment_required. Without PAYMENT-SIGNATURE 402 at the quoted price; with it the waiting order settles without rebuilding (202), and a replayed payment returns the same order.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"base64 x402 v2 payment payload"}],"responses":{"200":{"description":"replay of a delivered order, or of an order that failed before settlement","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"202":{"description":"the order resumed (or a replay of it in progress)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accepted","building","testing","ready","payment_required","topup_required","settling","delivered","failed"]},"phase":{"type":"string"},"eta_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promised_at":{"type":"string","description":"the delivery time promised in the quote (delivery.promised_seconds after the order); a paid top-up sets a new one"},"delivered_at":{"description":"when the artifact became available; null until delivered","type":["string","null"]},"on_time":{"description":"delivered_at is not later than promised_at; null until delivered","type":["boolean","null"]},"access_token":{"type":"string"},"status_url":{"type":"string"},"artifact_url":{"type":"string"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"build_model_usage":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"models":{"type":"array","items":{"type":"string"}},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"latency_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"list-price cost of the calls to senga; null when a model has no known price; never charged to the buyer"}},"required":["calls","models","input_tokens","output_tokens","cache_read_tokens","cache_write_tokens","latency_ms","usd"],"description":"Claude calls senga made to build this order (code agent attempts); calls 0 for a plan of known steps; senga's cost, not charged"}},"required":["order_id","status","phase","eta_seconds","promised_at","delivered_at","on_time","status_url","artifact_url","error","build_model_usage"]}}}},"402":{"description":"PAYMENT-REQUIRED header carries x402 requirements (payment_required, invalid_payment)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"x402Version":{"type":"number","const":2},"error":{"type":"string"},"resource":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}},"accepts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"number"}},"required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"additionalProperties":{}}},"extensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"code":{"type":"string","enum":["payment_required","invalid_payment"]},"hint":{"type":"string"}},"required":["x402Version","resource","accepts","code","hint"],"additionalProperties":{},"description":"x402 v2 PaymentRequired (the same as the base64 PAYMENT-REQUIRED header) with code and hint; an order waiting in payment_required also carries its order fields"}}}},"404":{"description":"order_not_found / quote_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_waiting_for_payment (order_status in the body) / payment_in_progress / quote_already_ordered / access_recovered","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"quote_expired / payment_window_closed","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"too_many_orders / unpaid_orders / rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}},"503":{"description":"capacity_exhausted / hosting_full / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}}}}},"/v1/extract":{"post":{"summary":"Fact extraction for a delivered image without the buyer's own ANTHROPIC_API_KEY: the image sends one document's segments ({document, segments}, answered with records) or a batch of up to 12 documents and 400 segments in all ({documents: [{document, segments}]}, extracted in one model call and answered with documents: [{content_sha256, records}]), and gets the records of its schema, charged once per call to the order's extraction budget (the quote's extraction.budget_usd, senga's cost, never charged to the buyer). Called by the image with the extract key from its plan.json, never by a buyer.","description":"Only plans that extract facts get this fallback. With the buyer's own ANTHROPIC_API_KEY the image never calls senga; the order key stays in plan.json unused. Without it, the image calls senga's POST /v1/extract with that key. The key is a metered extraction credential for this order only, not a buyer secret and not a key to the model provider: it can spend only this order's extraction budget (the quote's extraction.budget_usd), and senga stops accepting calls once that budget is spent. Facts and normalized content stay in the buyer's storage; a call sends senga only the documents' text segments with their titles, dates and speakers.","security":[{"extractKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"order_id":{"type":"string","minLength":1},"schema":{"anyOf":[{"type":"string","enum":["uc2.meeting_facts","uc3.company_map"]},{"type":"string","pattern":"^order:[\\s\\S]{1,}$","description":"The generated fact schema frozen in that order's plan (documents fallback); senga loads it from its own order"}]},"document":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"title":{"type":"string"},"meeting_date":{"type":["string","null"]},"language":{"type":["string","null"]}},"required":["content_sha256","title","meeting_date","language"]},"segments":{"minItems":1,"maxItems":400,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":["string","null"]},"text":{"type":"string","minLength":1}},"required":["index","speaker","text"]}}},"required":["order_id","schema","document","segments"],"description":"one document: {order_id, schema, document, segments}; answered with records"},{"type":"object","properties":{"order_id":{"type":"string","minLength":1},"schema":{"anyOf":[{"type":"string","enum":["uc2.meeting_facts","uc3.company_map"]},{"type":"string","pattern":"^order:[\\s\\S]{1,}$","description":"The generated fact schema frozen in that order's plan (documents fallback); senga loads it from its own order"}]},"documents":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"document":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"title":{"type":"string"},"meeting_date":{"type":["string","null"]},"language":{"type":["string","null"]}},"required":["content_sha256","title","meeting_date","language"]},"segments":{"minItems":1,"maxItems":400,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":["string","null"]},"text":{"type":"string","minLength":1}},"required":["index","speaker","text"]}}},"required":["document","segments"],"description":"One document of a batch: its identity and its numbered segments"}}},"required":["order_id","schema","documents"],"description":"several documents in one model call: {order_id, schema, documents: [{document, segments}]}; answered with documents: [{content_sha256, records}]"}]}}}},"responses":{"200":{"description":"records (or, for a batch, the records of every document) with the model usage and the order's budget","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","segment"],"additionalProperties":{},"description":"One extracted record: its type within the schema, the segment it cites and the schema's fields of that type"}},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false},"decisions":{"type":"array","items":{"type":"object","properties":{"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"decision":{"type":"string","minLength":1},"keywords":{"type":"array","items":{"type":"string","minLength":1}}},"required":["segment","decision","keywords"],"additionalProperties":false}},"action_items":{"type":"array","items":{"type":"object","properties":{"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"owner":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"action":{"type":"string","minLength":1},"due_date":{"type":["string","null"]},"keywords":{"type":"array","items":{"type":"string","minLength":1}}},"required":["segment","owner","action","due_date","keywords"],"additionalProperties":false}},"discussed":{"type":"array","items":{"type":"object","properties":{"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"keywords":{"type":"array","items":{"type":"string","minLength":1}}},"required":["segment","keywords"],"additionalProperties":false,"description":"A segment that raises something not agreed (a proposal, option, open question or rejected idea), with keywords so a question in either language finds it"}}},"required":["records","usage","budget"],"additionalProperties":false,"description":"a registered schema; uc2.meeting_facts also returns decisions and action_items"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["type","segment","fields"],"additionalProperties":false}},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false}},"required":["records","usage","budget"],"additionalProperties":false,"description":"order:<order_id>, the generated schema frozen in that order"},{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","segment"],"additionalProperties":{},"description":"One extracted record: its type within the schema, the segment it cites and the schema's fields of that type"}}},"required":["content_sha256","records"],"additionalProperties":false}},"unplaced":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"records the model cited by a segment number that no document of the batch sent; dropped"},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false}},"required":["documents","unplaced","usage","budget"],"additionalProperties":false,"description":"a batch {documents: [...]} of a registered schema: the records of every document"},{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"content_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["type","segment","fields"],"additionalProperties":false}}},"required":["content_sha256","records"],"additionalProperties":false}},"unplaced":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"records the model cited by a segment number that no document of the batch sent; dropped"},"usage":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost_usd":{"type":"number","minimum":0}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false},"budget":{"type":"object","properties":{"limit_usd":{"type":"number","minimum":0},"spent_usd":{"type":"number","minimum":0}},"required":["limit_usd","spent_usd"],"additionalProperties":false}},"required":["documents","unplaced","usage","budget"],"additionalProperties":false,"description":"a batch {documents: [...]} of order:<order_id>: the generated schema's records of every document"}]}}}},"400":{"description":"invalid_request / unknown_schema","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"invalid_extract_key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found / not_found (extraction is not enabled on this platform)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_delivered / schema_mismatch / extract_busy","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"too_many_segments (at most 400) / body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"extract_budget_exhausted (budget {limit_usd, spent_usd} in the body) / extract_daily_limit","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"llm_failed / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After)","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}},"/o/{order_id}/mcp":{"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"},"description":"order_id from the 202 of POST /v1/orders"}],"post":{"summary":"Hosted MCP endpoint of the delivered image, only for orders placed with delivery hosted, for 6 hours after delivery (streamable HTTP, stateless)","security":[{"accessTokenQuery":[]},{"accessTokenHeader":[]},{"bearer":[]}],"responses":{"200":{"description":"JSON-RPC"},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"not_ready / hosting_failed","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"410":{"description":"hosting_expired","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"hosting_failed / platform_unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}},"headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}}},"503":{"description":"transient: platform_unavailable, the proxy in front of senga during a restart or deploy; the body may be its HTML page; retry the same request after a few seconds (Retry-After); the proxy answers before any JSON-RPC response","headers":{"Retry-After":{"description":"seconds to wait before repeating the same request","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["intent_required","invalid_delivery","hosting_needs_buyer_secrets","quote_required","quote_not_found","quote_expired","quote_not_priced","quote_final","quote_agent_unavailable","input_too_large","body_too_large","rate_limited","payment_required","payment_in_progress","unpaid_orders","invalid_payment","capacity_exhausted","hosting_full","too_many_orders","unauthorized","forbidden","invalid_order_id","invalid_recovery","challenge_unknown","challenge_used","challenge_expired","challenge_mismatch","wallet_mismatch","proof_used","recovery_busy","quote_already_ordered","not_waiting_for_payment","payment_window_closed","not_waiting_for_topup","topup_expired","topup_declined","cancelled","access_recovered","order_not_found","not_ready","build_failed","test_failed","settlement_failed","interrupted","settlement_unknown","hosting_failed","hosting_expired","internal_error","platform_unavailable","not_found","too_many_streams","access_revoked","invalid_request","too_many_segments","invalid_extract_key","not_delivered","extract_busy","extract_budget_exhausted","extract_daily_limit","llm_failed","unknown_schema","schema_mismatch"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"text/html":{}}}}}}}}