{"openapi":"3.1.0","info":{"title":"Poker AI by AO API","version":"2.2.0","description":"Read public data without a key. For entries and purchases use a bearer key from /membership or the signed-in Site session. Signed-in browser writes are same-origin. Checkout returns a Stripe URL for payment authorization. Poll the order, then download the paid ZIP."},"paths":{"/api/tournament-season":{"get":{"operationId":"poker_tournament_schedule","summary":"Read the waiting count, current bracket progress and recent public results. Draws run back to back.","responses":{"200":{"description":"Schedule timestamps are Unix seconds"}}}},"/api/tournament-entry":{"get":{"operationId":"poker_tournament_entries","summary":"Read the current user's exact entries and their status","responses":{"200":{"description":"Entries owned by the signed-in user"},"401":{"description":"Sign in to the Site"}},"security":[{"pokerKey":[]}]},"post":{"operationId":"validate_or_submit_poker_tournament_model","summary":"Validate a model on the shared poker-turn-v1 replay or queue it","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["op","label","weights"],"additionalProperties":false,"properties":{"op":{"enum":["validate","submit"]},"label":{"type":"string","minLength":1,"maxLength":32},"weights":{"type":"object","description":"Use poker-wasm-v1 for new bots with custom code. poker-onnx-v1, poker-graph-v1, and authored weights JSON are also accepted."},"anonymous":{"type":"boolean","default":false},"hide_performance":{"type":"boolean","default":false},"publish_weights":{"type":"boolean","description":"New submissions using bearer keys publish weights by default. Use false to request private weights with an active membership. Existing entries keep their visibility. Legacy cookie clients that omit the field keep their previous behavior while billing is paused."}}}}}},"responses":{"200":{"description":"Validation returns the artifact version, kind, contract, decisions, max_cpu_us, seat_isolation and fixture_sha256. A duplicate submit returns the existing entry."},"201":{"description":"Saved entry ID, artifact version and queue status. Read it back with GET."},"400":{"description":"Invalid model or submission"},"401":{"description":"Sign in to the Site"},"402":{"description":"An active private weights membership is required"},"403":{"description":"Writes must be same-origin"},"429":{"description":"The validator is busy"},"503":{"description":"The private membership or engine is unavailable"}},"security":[{"pokerKey":[]}]}},"/archive/models.json":{"get":{"operationId":"poker_archive_model_index","summary":"List exact archived bot versions, public tournament entry IDs, and counts of settled results","security":[],"responses":{"200":{"description":"Public archive edition and model index"}}}},"/api/poker-weight-market":{"get":{"summary":"Read marketplace settings and eligibility for your tournament versions","security":[{"pokerKey":[]}],"responses":{"200":{"description":"Owned entries and membership status"}}},"post":{"summary":"Choose whether an owned version can be sold after a settled bracket loss","security":[{"pokerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["entry_id","listed"],"properties":{"entry_id":{"type":"string","pattern":"^submitted-[a-f0-9]{24}$"},"listed":{"type":"boolean","description":"An active membership is required to keep weights off sale."}}}}}},"responses":{"200":{"description":"Updated settings"},"402":{"description":"Membership required"}}}},"/api/poker-catalog":{"get":{"operationId":"poker_catalog","summary":"Read prices, progressive bulk rates, advance reservation options, and checkout availability","responses":{"200":{"description":"Success"},"401":{"description":"Sign in or supply a poker key"},"404":{"description":"Unavailable for this account"}}}},"/api/poker-orders":{"get":{"operationId":"poker_order","summary":"Read the order, refresh confirmed payment state, and check delayed delivery","responses":{"200":{"description":"Success"},"401":{"description":"Sign in or supply a poker key"},"404":{"description":"Unavailable for this account"}},"security":[{"pokerKey":[]}],"parameters":[{"name":"order","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}]},"post":{"operationId":"poker_quote_or_checkout","summary":"Get the exact bundle quote or create an idempotent Stripe Checkout Session","security":[{"pokerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"op":{"enum":["quote","checkout"]},"kind":{"enum":["archive","membership"]},"items":{"type":"array","uniqueItems":true,"maxItems":256,"items":{"type":"string"},"description":"Use catalog IDs for archive. Use an empty list for membership."},"expected_amount":{"type":"integer","minimum":1,"description":"Required for checkout. Use the quoted amount in cents."},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,80}$","description":"Required for checkout. Reuse this key on retry."}},"required":["op","kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Quote in USD cents, or order with ID and Stripe checkout_url"},"400":{"description":"Invalid items or key"},"401":{"description":"Authentication required"},"409":{"description":"Price or idempotency conflict"},"503":{"description":"Stripe not ready"}}}},"/api/archive-download":{"get":{"operationId":"poker_archive_download","summary":"Download a paid ZIP owned by this account","responses":{"200":{"description":"Success","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Sign in or supply a poker key"},"402":{"description":"Payment required"},"404":{"description":"Unavailable for this account"},"409":{"description":"Paid preorder is waiting for the release"}},"security":[{"pokerKey":[]}],"parameters":[{"name":"order","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}]}},"/api/poker-membership":{"get":{"operationId":"poker_membership","summary":"Check current private-weights membership status","responses":{"200":{"description":"Success"},"401":{"description":"Sign in or supply a poker key"},"404":{"description":"Unavailable for this account"}},"security":[{"pokerKey":[]}]},"post":{"operationId":"poker_billing_portal","summary":"Create a Stripe Customer Portal URL for this user's membership","security":[{"pokerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"op":{"const":"portal"}},"required":["op"],"additionalProperties":false}}}},"responses":{"200":{"description":"Stripe-hosted portal URL"},"404":{"description":"Membership missing"},"503":{"description":"Stripe not ready"}}}},"/api/tournament-weights":{"get":{"operationId":"poker_public_weights","summary":"List public weight versions or download the exact weights for one version","responses":{"200":{"description":"Success"},"401":{"description":"Sign in or supply a poker key"},"404":{"description":"Unavailable for this account"}},"parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}}]}},"/api/feedback":{"post":{"operationId":"poker_submit_feedback","summary":"Send private feedback about Poker AI by AO","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"additionalProperties":false,"properties":{"message":{"type":"string","minLength":1,"maxLength":2000},"path":{"type":"string","maxLength":160,"pattern":"^/(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]*$"}}}}}},"responses":{"200":{"description":"Existing report receipt"},"201":{"description":"New private report receipt"},"400":{"description":"Invalid report"},"429":{"description":"Submission rate limit"}}}},"/api/poker-stats":{"get":{"operationId":"poker_live_stats","summary":"Public counts of tournament entries, distinct versions, earlier league entry records, queued entries, and settled hands","security":[],"responses":{"200":{"description":"Aggregate counts"}}}},"/api/poker-live-hands":{"get":{"operationId":"poker_live_table_hands","summary":"Free private live-table hands for an owned submitted model","security":[{"pokerKey":[]}],"parameters":[{"name":"model","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}},{"name":"before","in":"query","description":"Opaque cursor returned by previous page","schema":{"type":"string"}}],"responses":{"200":{"description":"Owned models or a page of settled live-table hands"},"401":{"description":"Sign in or send a poker API key"},"404":{"description":"Model not owned"}}}},"/api/poker-author-data":{"get":{"operationId":"poker_author_history","summary":"Private author portfolio and retained performance history","security":[{"pokerKey":[]}],"parameters":[{"name":"source","in":"query","schema":{"type":"string","enum":["tournament","league"]}},{"name":"model","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}},{"name":"before","in":"query","description":"Opaque cursor returned by previous page","schema":{"type":"string"}}],"responses":{"200":{"description":"Portfolio, owned models and paginated performance"},"401":{"description":"Sign in or send a poker API key"},"404":{"description":"Model not owned"}}}}},"servers":[{"url":"https://poker.byao.one"}],"components":{"securitySchemes":{"pokerKey":{"type":"http","scheme":"bearer","description":"Create and revoke keys from the signed-in /membership page."}}}}