{"openapi":"3.1.0","info":{"title":"Atira Challenges API","version":"1","description":"The participant API of Atira Challenges: challenges and their scouting logins, the current run, test runs, submissions, runs and their logs, the leaderboard, team profiles and accounts.\n\nSend your personal token (`atp_...`, from `atira login` or the device flow under Sign-in), a team key (`tk_...`, organizer-provisioned teams and deployments without GitHub sign-in) or the run token (`rt_...`) in the `x-api-key` header (`Authorization: Bearer` works too). Errors are `{\"type\": \"error\", \"error\": {\"type\", \"message\"}}`.\n\nGuides: https://ehl-challenge.atira.ai/docs/api.md (curl examples), https://ehl-challenge.atira.ai/docs/cli.md (the CLI), https://ehl-challenge.atira.ai/docs/run-contract.md (runs and the model proxy at /llm), https://ehl-challenge.atira.ai/llms.txt (everything for agents)."},"servers":[{"url":"https://ehl-challenge.atira.ai"}],"externalDocs":{"description":"Everything for agents","url":"https://ehl-challenge.atira.ai/llms.txt"},"tags":[{"name":"Challenges","description":"What there is to solve"},{"name":"Models","description":"The organizers' self-hosted models: free, no limits, counted at public API prices"},{"name":"Internal","description":"Kept for organizers' tools, not for participants"},{"name":"Runs","description":"The current run (run token) and your team's runs (team key)"},{"name":"Test runs","description":"One run of your package in the sandbox on the public dataset"},{"name":"Submissions","description":"Packages for review and a scored run on the public dataset"},{"name":"Leaderboard","description":"Public rankings"},{"name":"Teams","description":"Registration, your dashboard and public profiles"},{"name":"Sign-in","description":"Personal tokens for the CLI, scripts and agents: the device flow, the browser code exchange, your devices"},{"name":"Account","description":"GitHub sign-in sessions: your team, invites and repository"},{"name":"Videos","description":"Run recordings"}],"paths":{"/v1/models/status":{"get":{"tags":["Models"],"summary":"The organizers' self-hosted models and whether each one's GPU is warm","description":"Free for participants of this track, with no limits: each call counts toward a run's cost at `price`, the model's public API price per million tokens, but nobody pays. The state comes from each model's health check, which never wakes a GPU: `ready` (warm), `starting` (calls are waking it), `idle` (the first call wakes it, in about a minute), `available` (on, but its warmth is unknown) or `off` (not configured). Cached for about 20 seconds.","operationId":"getModelStatus","security":[],"responses":{"200":{"description":"Every self-hosted model, configured or not","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelStatus"}}},"required":["models"]}}}}}}},"/v1/challenges":{"get":{"tags":["Challenges"],"summary":"List the challenges","operationId":"listChallenges","security":[],"responses":{"200":{"description":"The challenges","content":{"application/json":{"schema":{"type":"object","properties":{"challenges":{"type":"array","items":{"$ref":"#/components/schemas/Challenge"}}},"required":["challenges"]}}}}}}},"/v1/challenges/{id}":{"get":{"tags":["Challenges"],"summary":"One challenge: limits, answer channel and answer schema","operationId":"getChallenge","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}}],"responses":{"200":{"description":"The challenge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Challenge"}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/stats":{"get":{"tags":["Challenges"],"summary":"Totals: teams, submissions, scored runs, runs in progress, best quality","operationId":"getStats","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}}],"responses":{"200":{"description":"The totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/activity":{"get":{"tags":["Challenges"],"summary":"Recent public activity, newest first","operationId":"getActivity","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 100 events (default 30)","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"before","in":"query","required":false,"description":"The `next_cursor` of the previous page","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"400":{"$ref":"#/components/responses/Error400"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/leaderboard":{"get":{"tags":["Leaderboard"],"summary":"The leaderboard","description":"Eligible entries first, then higher quality, then the lower product of cost and time (cost counted as at least $0.01, time as at least 1 s), then submission ID. One entry per team: its best complete submission. During the hackathon this is the public-dataset board, where every scored submission runs; once organizers take the final results live, it is the final run on the private dataset (`board.final`), and `?dataset=public` keeps the public-dataset board.","operationId":"getLeaderboard","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}},{"name":"dataset","in":"query","required":false,"description":"`public`: the public-dataset board, also while the final results are live","schema":{"type":"string","enum":["public"]}}],"responses":{"200":{"description":"The leaderboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leaderboard"}}}},"400":{"$ref":"#/components/responses/Error400"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/targets/{target_id}/leaderboard":{"get":{"tags":["Leaderboard"],"summary":"The leaderboard of one public evaluation target","operationId":"getTargetLeaderboard","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}},{"name":"target_id","in":"path","required":true,"description":"Evaluation target id (`target_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The leaderboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leaderboard"}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/scouting":{"get":{"tags":["Challenges"],"summary":"The published scouting logins: the public websites, as a run sees them","description":"The demo access organizers published, shaped like `GET /v1/runs/current` without anything that needs a run token: the brief, each website's URL and login (`access`, the same shape as `CHALLENGE_SITE_ACCESS`), the answer target and schema. Develop your agent locally against these websites (`atira scout --env`), then test it in the sandbox. Nothing done there counts: an answer entered on the answer website is acknowledged without counting. `404` until organizers publish logins.","operationId":"getScouting","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}}],"responses":{"200":{"description":"The scouting logins","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scouting"}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/practice-runs":{"post":{"tags":["Internal"],"summary":"Internal: a practice run, for organizers' demo access","description":"Deprecated and internal: organizers' demo access and the platform's tests use it; participants never need it. Develop locally against the public websites (`GET /v1/challenges/{id}/scouting`, `atira scout --env`), then test in the sandbox (`POST /v1/challenges/{id}/rehearsals`). Returns a run token, the brief, the website logins and the answer format.","operationId":"startPracticeRun","deprecated":true,"x-internal":true,"security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scenario_id":{"type":"string","description":"A public scenario; default the challenge's"}},"additionalProperties":false}}}},"responses":{"201":{"description":"The run, with its token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeRun"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"}}}},"/v1/runs/current":{"get":{"tags":["Runs"],"summary":"The current run: brief, logins, answer target and schema","operationId":"getCurrentRun","security":[{"RunToken":[]}],"responses":{"200":{"description":"The run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentRun"}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/current/answer":{"post":{"tags":["Runs"],"summary":"Hand in the answer (challenges whose answer channel is the API)","description":"The body is the answer as JSON, matching `answer_schema`. A malformed answer returns `400` with `issues` and the run stays open; an accepted answer is final. Challenges whose answer channel is a website (RFQ) refuse this with `409`.","operationId":"postAnswer","security":[{"RunToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"The answer, matching the run's `answer_schema`"}}}},"responses":{"202":{"description":"Accepted and final","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerAccepted"}}}},"400":{"description":"Not JSON, or the answer does not match the schema; nothing is recorded","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AnswerIssues"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"}}}},"/v1/runs/{run_id}/cancel":{"post":{"tags":["Runs"],"summary":"Cancel a run that has not finished","description":"Your team's test and scored runs; organizers (portal session) any run. The execution stops, its sandbox is deleted, recording and live links end, and the run fails with \"Cancelled by @login\" and `finished_at`; a queued run never starts. The team's test-run slot is free at once. Cancelling a scored run ends its submission's other unfinished runs too: the submission does not complete and the leaderboard ignores it. `409` when the run has already finished.","operationId":"cancelRun","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"The run, now failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelledRun"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/v1/runs":{"get":{"tags":["Runs"],"summary":"Your team's runs, newest first","operationId":"listRuns","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"responses":{"200":{"description":"The runs","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/Run"}}},"required":["runs"]}}}},"401":{"$ref":"#/components/responses/Error401"}}}},"/v1/runs/{run_id}":{"get":{"tags":["Runs"],"summary":"One of your runs, with its score (and answer, for test runs)","operationId":"getRun","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetail"}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/feed":{"get":{"tags":["Runs"],"summary":"Live state of one of your runs: phase, status, model calls, cost, log cursor","operationId":"getRunFeed","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The run's live state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feed"}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/logs":{"get":{"tags":["Runs"],"summary":"Logs of a test or scored run, from a cursor","description":"Up to 128 chunks after `after`. Repeat with the returned `cursor` until `chunks` is empty; poll while the run is live. Scored runs hide scenario values.","operationId":"getRunLogs","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"after","in":"query","required":false,"description":"Cursor of the last chunk read (default 0)","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"A page of log chunks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/logs/stream":{"get":{"tags":["Runs"],"summary":"Logs of a test or scored run as they arrive (server-sent events)","description":"A `text/event-stream` with one event per chunk as it is stored: `id` is the chunk's cursor, `data` is `{at, stream, text}`. Resume with `Last-Event-ID` (an EventSource sends it by itself) or `after`. A comment line beats every 15 seconds; once the run has finished and every chunk is sent, an `end` event (`data: {cursor}`) closes the stream, and connecting again answers `204`. Same access and redaction as `/logs`.","operationId":"streamRunLogs","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"after","in":"query","required":false,"description":"Cursor of the last chunk read (default 0)","schema":{"type":"integer","minimum":0,"default":0}},{"name":"Last-Event-ID","in":"header","required":false,"description":"Cursor of the last event received; takes precedence over `after`","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Log chunks as server-sent events, until the run has finished","content":{"text/event-stream":{"schema":{"type":"string"}}}},"204":{"description":"The run has finished and nothing after the cursor is left"},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/logs.jsonl":{"get":{"tags":["Runs"],"summary":"All logs of a test or scored run as JSON lines","operationId":"downloadRunLogs","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"One `{at, stream, text}` object per line","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/logs/query":{"get":{"tags":["Runs"],"summary":"Log lines of a test or scored run, by time, stream and text","description":"Each stored chunk split into lines, every line with its time on the run's clock: milliseconds from the run's start (else its first log line), as the run page's log view counts it. `from` and `to` take that clock as `mm:ss`, `h:mm:ss`, `3m20s`, `1500ms` or seconds (a minus is before the start), or an ISO 8601 time. Up to `limit` lines; when more match, pass `next` as `after`. Same access and redaction as `/logs`.","operationId":"queryRunLogs","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"The earliest time, e.g. `02:10`","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"The latest time, e.g. `2m40s`","schema":{"type":"string"}},{"name":"stream","in":"query","required":false,"description":"Only these streams, comma-separated: setup, stdout, stderr, input, error, screen","schema":{"type":"string"}},{"name":"grep","in":"query","required":false,"description":"Only lines containing this text, case-insensitive; `a|b` matches either (at most 200 characters)","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Lines per page (default 200)","schema":{"type":"integer","minimum":1,"maximum":1000,"default":200}},{"name":"after","in":"query","required":false,"description":"A previous page's `next`, or a chunk cursor as `/logs` takes it","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of matching lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogQueryPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/frame":{"get":{"tags":["Runs"],"summary":"A browser's screen: the latest live frame, or with `t` the frame at that time from the recording","description":"Without `t`: the latest frame of a test run (or a scored run on the public dataset) while it runs. With `t`: one PNG cut from browser `browser`'s recording at time `t` on the run's clock, for whoever may watch the recording (as `/video`); a time outside the recording gives its first or last frame. Frames are cut by the platform's ffmpeg, two at a time; without ffmpeg it answers `503` with error type `frames_unavailable`, and you can cut the frame yourself from `/video/source`.","operationId":"getRunFrame","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"description":"Which of the run's browsers (1 to 4, from `browsers` in agent.json); browser 1 when absent. A browser the run does not have answers `404`.","schema":{"type":"integer","minimum":1,"maximum":4,"default":1}},{"name":"t","in":"query","required":false,"description":"A time on the run's clock (`mm:ss`, `h:mm:ss`, `3m20s`, seconds, or an ISO 8601 time), to the nearest quarter second","schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"description":"The ETag of the frame you have","schema":{"type":"string"}}],"responses":{"200":{"description":"The frame","headers":{"ETag":{"schema":{"type":"string"},"description":"Identifies the live frame (without `t`)"},"X-Frame-At":{"schema":{"type":"integer"},"description":"When it was captured (Unix ms)"},"X-Run-Time":{"schema":{"type":"integer"},"description":"With `t`: the frame's time on the run's clock, in ms from the run's start"},"X-Run-Clock":{"schema":{"type":"string"},"description":"With `t`: the same time as `mm:ss.s`"}},"content":{"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}},"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}}}},"204":{"description":"No frame yet"},"304":{"description":"Unchanged since If-None-Match"},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"502":{"description":"ffmpeg found no frame there","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/Error503"}}}},"/v1/runs/{run_id}/live/screen":{"post":{"tags":["Runs"],"summary":"A view-only link to a live run's screen","description":"The agent's browser while the run step runs, one screen per browser (`browser`). Runs on the public dataset (test runs, scored runs during the hackathon): your team and organizers. Runs on a private dataset (the final run): organizers only. A further browser's viewer may wait a moment for its screen. Made on the first request and reused while valid; it stops working when the run ends. Embed it with `referrerpolicy=\"no-referrer\"`; the viewer ignores input.","operationId":"watchRunScreen","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"description":"Which of the run's browsers (1 to 4, from `browsers` in agent.json); browser 1 when absent. A browser the run does not have answers `404`.","schema":{"type":"integer","minimum":1,"maximum":4,"default":1}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"The viewer link and when it expires","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveShare"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"description":"The run is not live: it has not started its run step, or it has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/Error503"}}}},"/v1/runs/{run_id}/live/tty":{"post":{"tags":["Runs"],"summary":"A view-only link to a live test run's terminal","description":"The agent's raw output, unredacted, while the run step runs. Your team's test runs only. Made on the first request and reused while valid; it stops working when the run ends. Embed it with `referrerpolicy=\"no-referrer\"`; the viewer ignores input.","operationId":"watchRunTerminal","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"The viewer link and when it expires","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveShare"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"description":"The run is not live: it has not started its run step, or it has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/Error503"}}}},"/v1/runs/{run_id}/video":{"get":{"tags":["Videos"],"summary":"The recording of a run (WebM, byte ranges)","description":"Your team's test runs; scored runs once the organizers reveal them; anyone with a share link's `view` token.","operationId":"getRunVideo","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]},{}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"description":"Which of the run's browsers (1 to 4, from `browsers` in agent.json); browser 1 when absent. A browser the run does not have answers `404`.","schema":{"type":"integer","minimum":1,"maximum":4,"default":1}},{"name":"view","in":"query","required":false,"description":"A share link's token","schema":{"type":"string"}},{"name":"Range","in":"header","required":false,"description":"`bytes=start-end`","schema":{"type":"string"}}],"responses":{"200":{"description":"The video","content":{"video/webm":{"schema":{"type":"string"}}}},"206":{"description":"The requested range","content":{"video/webm":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error400"},"404":{"$ref":"#/components/responses/Error404"},"416":{"description":"The range is not satisfiable"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/runs/{run_id}/video/source":{"get":{"tags":["Videos"],"summary":"Where a player reads a recording from","description":"Who may watch the recording may ask. With object storage: a presigned URL to the WebM in storage (`direct`), served inline with byte ranges and no CORS, so a `<video>` plays it without this API in between; it is a credential until `expires_at` (10 min), so ask again when it runs out or fails. Without object storage: the recording's own route (`/v1/runs/{run_id}/video`), with its `browser` and `view`. Never cached.","operationId":"getRunVideoSource","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]},{}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"description":"Which of the run's browsers (1 to 4, from `browsers` in agent.json); browser 1 when absent. A browser the run does not have answers `404`.","schema":{"type":"integer","minimum":1,"maximum":4,"default":1}},{"name":"view","in":"query","required":false,"description":"A share link's token","schema":{"type":"string"}}],"responses":{"200":{"description":"Where to read the recording","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"A presigned URL to storage, or the API's path for the recording"},"direct":{"type":"boolean","description":"Whether `url` reads from storage itself"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When a presigned `url` stops working; null for the API's path"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until then"}},"required":["url","direct","expires_at","expires_in"]}}}},"400":{"$ref":"#/components/responses/Error400"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/videos":{"get":{"tags":["Videos"],"summary":"Where each recording sits on the run's timeline","description":"For a replay of the run: each browser's recording with its first frame's time (`started_at`, epoch ms) and length. `estimated` marks a recording from before starts were stored, placed to end with the run. `start` and `end` span the replay; `origin` is the run's start, the zero the logs count from. Who may watch the recordings may read it.","operationId":"getRunVideoTimeline","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]},{}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"view","in":"query","required":false,"description":"A share link's token","schema":{"type":"string"}}],"responses":{"200":{"description":"The timeline","content":{"application/json":{"schema":{"type":"object","required":["start","end","origin","recordings"],"properties":{"start":{"type":"integer"},"end":{"type":"integer"},"origin":{"type":"integer"},"recordings":{"type":"array","items":{"type":"object","required":["browser","started_at","duration_ms","estimated"],"properties":{"browser":{"type":"integer"},"started_at":{"type":"integer"},"duration_ms":{"type":"number"},"estimated":{"type":"boolean"}}}}}}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/runs/{run_id}/video/share":{"post":{"tags":["Videos"],"summary":"Create (or replace) a share link for a test run's recording","operationId":"shareRunVideo","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"201":{"description":"The share link; one token covers every recording of the run","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The first recording's link"},"urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"With one recording per browser: a link for each, in browser order"}},"required":["url"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"delete":{"tags":["Videos"],"summary":"Revoke the share link","operationId":"unshareRunVideo","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"description":"Run id (`run_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/challenges/{id}/rehearsals":{"post":{"tags":["Test runs"],"summary":"Upload a test run: one run in the scored-run sandbox on the public scenario","description":"The package is checked statically, then run once with live frames, logs and a recording. Runs start in a fair order (scored runs first, then teams in turn); a team runs one test run at a time and may have three waiting (the defaults), a few per hour: one more is refused with `429`.","operationId":"startTestRun","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The package to test. A gzipped tarball (`tar czf agent.tar.gz -C my-agent .`) with `agent.json` at its root: `{\"setup\"?: [argv], \"run\": [argv], \"browsers\"?: 1-4}`. Regular files only; up to the deployment's limit (20 MB by default) compressed, 2,000 entries, 5 MB per file and 20 MB in total uncompressed.","content":{"application/gzip":{"schema":{"type":"string","contentMediaType":"application/gzip"}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestRunCreated"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/challenges/{id}/submissions":{"post":{"tags":["Submissions"],"summary":"Submit a package for review and its scored run on the public dataset","description":"One submission in flight per team: while one is in review or running, the next is refused with `429`. Each team ranks by its best complete submission.","operationId":"submit","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The package to submit. A gzipped tarball (`tar czf agent.tar.gz -C my-agent .`) with `agent.json` at its root: `{\"setup\"?: [argv], \"run\": [argv], \"browsers\"?: 1-4}`. Regular files only; up to the deployment's limit (20 MB by default) compressed, 2,000 entries, 5 MB per file and 20 MB in total uncompressed.","content":{"application/gzip":{"schema":{"type":"string","contentMediaType":"application/gzip"}}}},"responses":{"202":{"description":"Accepted for review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionCreated"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"get":{"tags":["Submissions"],"summary":"Your team's submissions and their status, newest first","operationId":"listSubmissions","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Challenge id, e.g. `rfq`","schema":{"type":"string"}}],"responses":{"200":{"description":"The submissions","content":{"application/json":{"schema":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}}},"required":["submissions"]}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/teams/me/submissions/{submission_id}":{"get":{"tags":["Submissions"],"summary":"One submission: review findings, status and its runs","operationId":"getSubmission","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"submission_id","in":"path","required":true,"description":"Submission id (`sub_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionDetail"}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/teams":{"post":{"tags":["Teams"],"summary":"Register a team (deployments without GitHub sign-in)","description":"The key is shown once. With GitHub sign-in, create the team with `POST /v1/me/team` instead; members then sign in with personal tokens.","operationId":"registerTeam","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":40},"registration_code":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"The team and its key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreated"}}}},"400":{"$ref":"#/components/responses/Error400"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/teams/me":{"get":{"tags":["Teams"],"summary":"Your team's dashboard: best result, submissions and test runs per challenge","operationId":"getDashboard","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"responses":{"200":{"description":"The dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"401":{"$ref":"#/components/responses/Error401"}}}},"/v1/teams/me/secrets":{"get":{"tags":["Teams"],"summary":"Your team's run secrets: names and times, never the values","operationId":"listTeamSecrets","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"responses":{"200":{"description":"The secrets and the per-team limit","content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"updated_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["name","created_at","updated_at"]}},"limit":{"type":"integer"}},"required":["secrets","limit"]}}}},"401":{"$ref":"#/components/responses/Error401"}}}},"/v1/teams/me/secrets/{name}":{"put":{"tags":["Teams"],"summary":"Set a run secret, such as your model provider's key","description":"Secrets are sealed and never returned. They are set as environment variables for your run step in test and scored runs, and redacted from its logs.","operationId":"putTeamSecret","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"name","in":"path","required":true,"description":"Variable name, e.g. `OPENAI_API_KEY` (`[A-Z][A-Z0-9_]*`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":16,"maxLength":4096}},"required":["value"]}}}},"responses":{"200":{"description":"The secret, without its value","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"updated_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["name","created_at","updated_at"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"}}},"delete":{"tags":["Teams"],"summary":"Delete a run secret","operationId":"deleteTeamSecret","security":[{"PersonalToken":[]},{"TeamKey":[]},{"Session":[]}],"parameters":[{"name":"name","in":"path","required":true,"description":"Variable name","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/teams/{team_id}/profile":{"get":{"tags":["Teams"],"summary":"A team's public profile: members, best result and public submission history","operationId":"getTeamProfile","security":[],"parameters":[{"name":"team_id","in":"path","required":true,"description":"Team id (`team_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"The signed-in user, their team, and invites waiting for them","description":"With a personal token, `token` describes it (`atira whoami`). A captain also gets the team's pending invites.","operationId":"getMe","security":[{"PersonalToken":[]},{"Session":[]}],"responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"$ref":"#/components/responses/Error401"}}}},"/v1/me/tokens":{"get":{"tags":["Sign-in"],"summary":"Your signed-in devices: your live personal tokens (never the tokens themselves)","description":"A captain also gets how many live tokens each member has.","operationId":"listTokens","security":[{"PersonalToken":[]},{"Session":[]}],"responses":{"200":{"description":"Your tokens","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/PersonalToken"}},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"},"tokens":{"type":"integer"}},"required":["user_id","login","tokens"]}}},"required":["tokens"]}}}},"401":{"$ref":"#/components/responses/Error401"}}}},"/v1/me/tokens/{token_id}":{"delete":{"tags":["Sign-in"],"summary":"Revoke one of your personal tokens; it stops working at once","operationId":"revokeToken","security":[{"PersonalToken":[]},{"Session":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"description":"Token id (`pat_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/me/inference-token":{"post":{"tags":["Sign-in"],"summary":"A 30-minute inference token for the model relay (/llm/*) only, bound to your Ed25519 key","description":"What `atira models proxy` calls with the CLI's personal token; sessions get 403, as no key is shown on the web. The token (`ati_...`) works only on `/llm/*`, only with each request signed by the bound key: `x-atira-ts` (Unix ms, within 60 s), `x-atira-nonce` (never reused) and `x-atira-sig`, an Ed25519 signature (base64url) over `ts \\n nonce \\n METHOD \\n path?query \\n sha256(body) in hex`. Revoking the personal token or leaving the team ends it. A member holds at most 5; minting more retires the oldest. Minting is limited to 30 an hour.","operationId":"mintInferenceToken","security":[{"PersonalToken":[]},{"Session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"public_key":{"type":"string","description":"Ed25519 public key: the raw 32 bytes, base64url (a JWK's `x`)"}},"required":["public_key"]}}}},"responses":{"201":{"description":"Minted, shown once","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"integer"},"team_id":{"type":"string"}},"required":["token","expires_at","team_id"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/cli/device":{"post":{"tags":["Sign-in"],"summary":"Start a device sign-in (RFC 8628): a code to approve in the browser","description":"Open `verification_url` (the code is filled in), check the code and approve. Then poll `POST /v1/cli/token` with the `device_code`, no faster than `interval` seconds. Answers 404 where the platform has no GitHub sign-in.","operationId":"startDeviceSignIn","security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":256}},"required":[]}}}},"responses":{"200":{"description":"The codes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCode"}}}},"400":{"$ref":"#/components/responses/Error400"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/cli/token":{"post":{"tags":["Sign-in"],"summary":"Exchange an approved device code, or a browser sign-in code and its PKCE verifier, for a personal token","description":"A device code answers `400` with `authorization_pending` until it is approved, `slow_down` when polled too often (wait `interval` seconds, 5 more each time), `access_denied` when cancelled and `expired_token` after 10 minutes. A browser code (from the loopback redirect of `/cli/authorize`) lasts 5 minutes and is used once; presenting it again revokes the token it gave.","operationId":"issueToken","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"device_code":{"type":"string"},"grant_type":{"const":"urn:ietf:params:oauth:grant-type:device_code"}},"required":["device_code"]},{"type":"object","properties":{"code":{"type":"string"},"code_verifier":{"type":"string","minLength":43,"maxLength":128},"grant_type":{"const":"authorization_code"}},"required":["code","code_verifier"]}]}}}},"responses":{"200":{"description":"The token, shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedToken"}}}},"400":{"description":"Not (yet) exchangeable, or an invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantError"}}}},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"delete":{"tags":["Sign-in"],"summary":"Revoke the personal token sent with this request (`atira logout`)","operationId":"revokeCurrentToken","security":[{"PersonalToken":[]}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"]}}}},"401":{"$ref":"#/components/responses/Error401"}}}},"/v1/me/team":{"post":{"tags":["Account"],"summary":"Create a team; you become its captain","operationId":"createTeam","security":[{"Session":[]}],"parameters":[{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":40},"registration_code":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"The team; members sign in with personal tokens","content":{"application/json":{"schema":{"type":"object","properties":{"team_id":{"type":"string"},"name":{"type":"string"}},"required":["team_id","name"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/me/team/key":{"get":{"tags":["Account"],"summary":"Gone: team keys are no longer shown; members sign in with personal tokens","operationId":"getTeamKey","security":[{"Session":[]}],"responses":{"401":{"$ref":"#/components/responses/Error401"},"410":{"description":"Team keys are not shown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Account"],"summary":"Revoke the team's shared key (captain); a key copied before personal sign-in stops working","description":"The new key is not shown. Personal tokens are not affected.","operationId":"rotateTeamKey","security":[{"Session":[]}],"parameters":[{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"rotated":{"type":"boolean"}},"required":["rotated"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"}}}},"/v1/me/team/invites":{"post":{"tags":["Account"],"summary":"Invite one GitHub account (captain); the link is for that account only, once, for 7 days","description":"Pending invites hold seats: members plus pending invites stay within six.","operationId":"createInvite","security":[{"Session":[]}],"parameters":[{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"login":{"type":"string","description":"GitHub username"}},"required":["login"]}}}},"responses":{"201":{"description":"The invite and its link","content":{"application/json":{"schema":{"type":"object","properties":{"invite_id":{"type":"string"},"login":{"type":"string"},"code":{"type":"string"},"url":{"type":"string"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["invite_id","login","code","url","expires_at"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/me/team/invites/{invite_id}":{"delete":{"tags":["Account"],"summary":"Revoke a pending invite (captain)","operationId":"revokeInvite","security":[{"Session":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"description":"Invite id (`invite_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/me/invites/{invite_id}/accept":{"post":{"tags":["Account"],"summary":"Accept an invite addressed to you, without the link","operationId":"acceptInvite","security":[{"Session":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"description":"Invite id, from `GET /v1/me`","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Joined","content":{"application/json":{"schema":{"type":"object","properties":{"team_id":{"type":"string"}},"required":["team_id"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/me/invites/{invite_id}/decline":{"post":{"tags":["Account"],"summary":"Decline an invite addressed to you","operationId":"declineInvite","security":[{"Session":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"description":"Invite id, from `GET /v1/me`","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Declined","content":{"application/json":{"schema":{"type":"object","properties":{"declined":{"type":"boolean"}},"required":["declined"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/me/team/leave":{"post":{"tags":["Account"],"summary":"Leave your team; your personal tokens stop acting for it","operationId":"leaveTeam","security":[{"Session":[]}],"parameters":[{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Left","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"key_changed":{"type":"boolean"}},"required":["ok","key_changed"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/me/team/members/{user_id}":{"delete":{"tags":["Account"],"summary":"Remove a member (captain); their personal tokens stop acting for the team","operationId":"removeMember","security":[{"Session":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"description":"The member's user id","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"key_changed":{"type":"boolean"}},"required":["ok","key_changed"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/invites/{code}":{"get":{"tags":["Account"],"summary":"An invite link: the team's name and the GitHub account it is for","description":"Signed in as that account, the response also holds the invite id and the team's members.","operationId":"getInvite","security":[],"parameters":[{"name":"code","in":"path","required":true,"description":"Invite code (`inv_...`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The invite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"}}}},"404":{"$ref":"#/components/responses/Error404"}}}},"/v1/invites/{code}/join":{"post":{"tags":["Account"],"summary":"Join the team of an invite: only the invited GitHub account, once (up to six members)","operationId":"joinTeam","security":[{"Session":[]}],"parameters":[{"name":"code","in":"path","required":true,"description":"Invite code (`inv_...`)","schema":{"type":"string"}},{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Joined","content":{"application/json":{"schema":{"type":"object","properties":{"team_id":{"type":"string"}},"required":["team_id"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}}}},"/v1/me/team/repo":{"get":{"tags":["Account"],"summary":"The GitHub repository linked for the organizers' review","operationId":"getTeamRepo","security":[{"Session":[]}],"responses":{"200":{"description":"The link state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoState"}}}},"401":{"$ref":"#/components/responses/Error401"},"409":{"$ref":"#/components/responses/Error409"}}},"put":{"tags":["Account"],"summary":"Link a repository the organizers' GitHub App can read (captain)","operationId":"linkTeamRepo","security":[{"Session":[]}],"parameters":[{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo_id":{"type":"integer","minimum":1}},"required":["repo_id"]}}}},"responses":{"200":{"description":"The link","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepoLink"},{"type":"null"}]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}}},"delete":{"tags":["Account"],"summary":"Unlink the repository (captain)","operationId":"unlinkTeamRepo","security":[{"Session":[]}],"parameters":[{"name":"x-atira-csrf","in":"header","required":false,"description":"With a session cookie, writes need the value of the `atira_csrf` cookie here. Not needed with a token or team key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Unlinked","content":{"application/json":{"schema":{"type":"object","properties":{"unlinked":{"type":"boolean"}},"required":["unlinked"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"}}}},"/v1/me/team/repo/repositories":{"get":{"tags":["Account"],"summary":"Repositories the installed GitHub App can read (captain)","operationId":"listInstallableRepos","security":[{"Session":[]}],"responses":{"200":{"description":"The repositories","content":{"application/json":{"schema":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"object","additionalProperties":true}},"current":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["repositories","current"]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}}}}},"components":{"securitySchemes":{"PersonalToken":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your personal token (`atp_...`): `atira login`, or `POST /v1/cli/device` then `POST /v1/cli/token`. It acts as you on the team you are in now, for 90 days or until revoked."},"TeamKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"A team key (`tk_...`): organizer-provisioned teams, and deployments without GitHub sign-in (shown once at registration)."},"RunToken":{"type":"apiKey","in":"header","name":"x-api-key","description":"A live run's token (`rt_...`): `CHALLENGE_RUN_TOKEN` in the sandbox."},"Session":{"type":"apiKey","in":"cookie","name":"atira_session","description":"A GitHub sign-in session (browsers). Writes also need the `x-atira-csrf` header."}},"responses":{"Error400":{"description":"The request is invalid: a malformed body, a bad parameter, or a package that fails its checks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"Missing or unknown credential: the personal token, team key, run token or session is wrong, revoked, finished or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"The credential is valid but not allowed to do this (for example, only the captain may).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"Not found, or not visible to this credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error409":{"description":"Conflict with the current state (for example, the challenge has no evaluation, or you are not in a team).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error413":{"description":"The body exceeds its limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"Busy or rate limited: one submission or test run at a time, and a few per hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error503":{"description":"Temporarily unavailable; retry later (after `Retry-After` seconds when it is set).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"type":{"const":"error"},"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","conflict_error","rate_limit_error"]},"message":{"type":"string"}},"required":["type","message"]}},"required":["type","error"]},"AnswerIssues":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["issues"]},"AnswerChannel":{"oneOf":[{"type":"object","properties":{"kind":{"const":"api"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"site"},"siteId":{"type":"string"}},"required":["kind","siteId"]}]},"Challenge":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"sites":{"type":"array","items":{"type":"string"}},"limits":{"type":"object","properties":{"practiceTimeLimitMs":{"type":"integer"},"scoredTimeLimitMs":{"type":"integer"},"maxAnswerBytes":{"type":"integer"}},"required":["practiceTimeLimitMs","scoredTimeLimitMs","maxAnswerBytes"]},"evaluation_available":{"type":"boolean"},"answer_channel":{"$ref":"#/components/schemas/AnswerChannel"},"answer_schema":{"type":"object","description":"JSON Schema of the answer"}},"required":["id","version","title","summary","sites","limits","evaluation_available","answer_channel","answer_schema"]},"SiteAccess":{"type":"object","properties":{"siteId":{"type":"string"},"url":{"type":"string"},"credentials":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]}},"required":["siteId","url"]},"SubmissionTarget":{"oneOf":[{"type":"object","properties":{"kind":{"const":"api"},"url":{"type":"string"}},"required":["kind","url"]},{"type":"object","properties":{"kind":{"const":"site"},"siteId":{"type":"string"},"url":{"type":"string"}},"required":["kind","siteId","url"]}]},"CurrentRun":{"type":"object","properties":{"run_id":{"type":"string"},"challenge_id":{"type":"string"},"challenge_version":{"type":"string"},"scenario_id":{"type":"string"},"kind":{"type":"string","enum":["practice","scored","rehearsal"]},"started_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"brief":{"type":"string","description":"The task in Markdown, with the rules"},"access":{"type":"array","items":{"$ref":"#/components/schemas/SiteAccess"}},"submission":{"$ref":"#/components/schemas/SubmissionTarget"},"answer_url":{"type":"string","description":"Only when the answer goes to the API"},"answer_schema":{"type":"object"},"spent_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"llm_proxy_url":{"type":"string"},"llm_providers":{"type":"array","items":{"type":"string"}}},"required":["run_id","challenge_id","challenge_version","scenario_id","kind","brief","access","submission","answer_schema","spent_micro_usd","llm_proxy_url","llm_providers"]},"Scouting":{"type":"object","properties":{"challenge_id":{"type":"string"},"challenge_version":{"type":"string"},"scenario_id":{"type":"string"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"},"until_revoked":{"type":"boolean"},"access":{"type":"array","items":{"$ref":"#/components/schemas/SiteAccess"}},"submission":{"$ref":"#/components/schemas/SubmissionTarget"},"brief":{"type":"string","description":"The task in Markdown, with the rules"},"answer_schema":{"type":"object"},"note":{"type":"string","description":"What happens to an answer entered with these logins"}},"required":["challenge_id","challenge_version","scenario_id","expires_at","until_revoked","access","submission","brief","answer_schema","note"]},"CancelledRun":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"const":"failed"},"error":{"type":"string","description":"`Cancelled by @login`"},"finished_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["run_id","status","error","finished_at"]},"PracticeRun":{"allOf":[{"$ref":"#/components/schemas/CurrentRun"},{"type":"object","properties":{"token":{"type":"string","description":"The run token (`rt_...`); send it as `x-api-key`"}},"required":["token"]}]},"AnswerAccepted":{"type":"object","properties":{"run_id":{"type":"string"},"received_at":{"type":"integer","description":"Unix time in milliseconds"},"quality":{"type":"number"},"eligible":{"type":"boolean"},"breakdown":{}},"required":["run_id","received_at"]},"Score":{"type":"object","properties":{"quality":{"type":"number"},"eligible":{"type":"boolean"},"cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"duration_ms":{"type":"integer"},"scored_at":{"type":"integer","description":"Unix time in milliseconds"},"breakdown":{"description":"Practice and test runs only: points for each part of the answer, never the expected values"}},"required":["quality","eligible","cost_micro_usd","duration_ms","scored_at"]},"Run":{"type":"object","properties":{"run_id":{"type":"string"},"challenge_id":{"type":"string"},"challenge_version":{"type":"string"},"suite_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"submission_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["practice","scored","rehearsal"]},"dataset":{"type":"string","enum":["public","private"],"description":"The dataset the run used: public for practice, test and hackathon scored runs; private for the final run"},"scenario_id":{"type":"string","description":"Runs on the public dataset only"},"status":{"type":"string","enum":["queued","provisioning","setup","running","answered","submitted","timed_out","failed","scored"]},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"started_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"calls":{"type":"integer"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"has_answer":{"type":"boolean"},"score":{"anyOf":[{"$ref":"#/components/schemas/Score"},{"type":"null"}]}},"required":["run_id","challenge_id","kind","status","created_at","calls","input_tokens","output_tokens","cost_micro_usd","has_answer","score"]},"RunDetail":{"allOf":[{"$ref":"#/components/schemas/Run"},{"type":"object","properties":{"has_video":{"type":"boolean"},"video_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"video_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"videos":{"type":"array","items":{"type":"object","properties":{"browser":{"type":"integer"},"duration_ms":{"type":"integer"},"size_bytes":{"type":"integer"}},"required":["browser","duration_ms","size_bytes"]},"description":"With one recording per browser: each of them (`?browser=n` on the video)"},"answer":{"description":"The accepted answer (test runs)"},"queue_position":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"1 starts next: scored runs first, then teams in turn, the team with the fewest runs in flight first"},"runs_ahead":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"estimated_start_s":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Rough: recent runs' durations over the run slots; null before any run has finished"},"team_limit_reached":{"type":"boolean","description":"A test run that waits for its team's earlier test run to end: one at a time per team by default"}},"required":["has_video","video_duration_ms","video_size_bytes","answer","queue_position","runs_ahead","estimated_start_s","team_limit_reached"]}]},"Feed":{"type":"object","properties":{"phase":{"type":"string","enum":["queued","provisioning","setup","running","scoring","done"]},"phase_times":{"type":"object","additionalProperties":{"type":"integer","description":"Unix time in milliseconds"}},"status":{"type":"string","enum":["queued","provisioning","setup","running","answered","submitted","timed_out","failed","scored"]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"now":{"type":"integer","description":"Unix time in milliseconds"},"started_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"site":{"anyOf":[{"type":"object","properties":{"site_id":{"type":"string"},"title":{"type":"string"},"at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["site_id","title","at"]},{"type":"null"}]},"calls":{"type":"integer"},"cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"organizer":{"type":"boolean"},"observe_frames":{"type":"boolean"},"log_cursor":{"type":"integer","description":"Cursor of the newest log chunk"},"browsers":{"type":"integer","minimum":1,"maximum":4,"description":"How many browsers the run has"},"queue_position":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"1 starts next: scored runs first, then teams in turn, the team with the fewest runs in flight first"},"runs_ahead":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"estimated_start_s":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Rough: recent runs' durations over the run slots; null before any run has finished"},"team_limit_reached":{"type":"boolean","description":"A test run that waits for its team's earlier test run to end: one at a time per team by default"},"frame_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"frame_hash":{"anyOf":[{"type":"string"},{"type":"null"}]},"frames":{"type":"array","items":{"type":"object","properties":{"browser":{"type":"integer"},"frame_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"frame_hash":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["browser","frame_at","frame_hash"]},"description":"Every browser's latest frame, browser 1 first; `frame_at` and `frame_hash` are browser 1's"}},"required":["phase","status","error","now","started_at","finished_at","site","calls","cost_micro_usd","observe_frames","log_cursor","browsers","queue_position","runs_ahead","estimated_start_s","team_limit_reached"]},"LiveShare":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A kyora viewer page (`https://view.kyora.run/s#kshare_…`) to embed in an iframe. A bearer secret: anyone holding it can watch until it expires."},"expires_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["url","expires_at"]},"LogPage":{"type":"object","properties":{"cursor":{"type":"integer","description":"Pass as `after` to read on"},"chunks":{"type":"array","items":{"type":"object","properties":{"stream":{"type":"string","enum":["setup","stdout","stderr","input"]},"at":{"type":"integer","description":"Unix time in milliseconds"},"text":{"type":"string"}},"required":["stream","at","text"]}}},"required":["cursor","chunks"]},"LogQueryPage":{"type":"object","properties":{"origin":{"type":"integer","description":"The run clock's zero: the run's start, else its first log line (Unix ms)"},"from":{"anyOf":[{"type":"integer","description":"`from` in ms on the run's clock"},{"type":"null"}]},"to":{"anyOf":[{"type":"integer","description":"`to` in ms on the run's clock"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"t":{"anyOf":[{"type":"integer","description":"Milliseconds from the run's start; null without a time"},{"type":"null"}]},"clock":{"anyOf":[{"type":"string","description":"`t` as the run page shows it, `mm:ss.s`"},{"type":"null"}]},"at":{"type":"integer","description":"Unix time in milliseconds"},"stream":{"type":"string"},"text":{"type":"string","description":"One line, without its newline; cut after 2,000 characters"}},"required":["t","clock","at","stream","text"]}},"matched":{"type":"integer","description":"Every matching line from `after` on"},"next":{"anyOf":[{"type":"string","description":"Pass as `after` for the next page; null on the last"},{"type":"null"}]}},"required":["origin","from","to","lines","matched","next"]},"TestRunCreated":{"type":"object","properties":{"rehearsal_id":{"type":"string"},"run_id":{"type":"string"}},"required":["rehearsal_id","run_id"]},"SubmissionCreated":{"type":"object","properties":{"submission_id":{"type":"string"},"review_status":{"const":"pending"},"findings":{"type":"array","items":{}},"run_ids":{"type":"array","items":{"type":"string"}}},"required":["submission_id","review_status","findings","run_ids"]},"Submission":{"type":"object","properties":{"submission_id":{"type":"string"},"challenge_id":{"type":"string"},"challenge_version":{"type":"string"},"suite_id":{"type":"string"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin_submission_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"review_status":{"type":"string","enum":["pending","passed","flagged","rejected"]},"findings":{"type":"array","items":{"type":"object","additionalProperties":true}},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"status":{"type":"string","enum":["in_review","rejected","in_evaluation","complete","failed"]},"runs":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string","enum":["queued","provisioning","setup","running","answered","submitted","timed_out","failed","scored"]}},"required":["run_id","status"]}},"medians":{"anyOf":[{"type":"object","properties":{"eligible":{"type":"boolean"},"median_quality":{"type":"number"},"median_cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"median_duration_ms":{"type":"integer"},"run_count":{"type":"integer"}},"required":["eligible","median_quality","median_cost_micro_usd","median_duration_ms","run_count"]},{"type":"null"}]},"per_scenario":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"median_quality":{"type":"number"},"eligible":{"type":"boolean"}},"required":["label","median_quality","eligible"]}}},"required":["submission_id","challenge_id","challenge_version","suite_id","target_id","origin_submission_id","review_status","findings","created_at","status","runs","medians","per_scenario"]},"SubmissionDetail":{"type":"object","properties":{"submission_id":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"review_status":{"type":"string"},"status":{"type":"string"},"findings":{"type":"array","items":{"type":"object","additionalProperties":true}},"per_scenario":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"median_quality":{"type":"number"},"eligible":{"type":"boolean"}},"required":["label","median_quality","eligible"]}},"runs":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string","enum":["queued","provisioning","setup","running","answered","submitted","timed_out","failed","scored"]},"queued_at":{"type":"integer","description":"Unix time in milliseconds"},"started_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"calls":{"type":"integer"},"cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"score":{"anyOf":[{"type":"object","properties":{"quality":{"type":"number"},"eligible":{"type":"boolean"}},"required":["quality","eligible"]},{"type":"null"}]}},"required":["run_id","status","queued_at","started_at","finished_at","calls","cost_micro_usd","input_tokens","output_tokens","score"]}}},"required":["submission_id","created_at","review_status","status","findings","per_scenario","runs"]},"LeaderboardEntry":{"type":"object","properties":{"team_id":{"type":"string"},"team_name":{"type":"string"},"submission_id":{"type":"string"},"eligible":{"type":"boolean"},"median_quality":{"type":"number"},"median_cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"median_duration_ms":{"type":"integer"},"run_count":{"type":"integer"},"best_submitted_at":{"type":"integer","description":"Unix time in milliseconds"},"submission_count":{"type":"integer"},"per_scenario":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"median_quality":{"type":"number"},"eligible":{"type":"boolean"}},"required":["label","median_quality","eligible"]}},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["captain","member"]}},"required":["user_id","login","name","avatar_url","role"]}},"history":{"type":"array","items":{"type":"object","properties":{"submitted_at":{"type":"integer","description":"Unix time in milliseconds"},"eligible":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"median_quality":{"anyOf":[{"type":"number"},{"type":"null"}]},"median_cost_micro_usd":{"anyOf":[{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},{"type":"null"}]},"median_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["submitted_at","eligible","median_quality","median_cost_micro_usd","median_duration_ms"]}},"public_dataset":{"anyOf":[{"type":"object","properties":{"rank":{"type":"integer"},"eligible":{"type":"boolean"},"median_quality":{"type":"number"},"median_cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"median_duration_ms":{"type":"integer"}},"required":["rank","eligible","median_quality","median_cost_micro_usd","median_duration_ms"]},{"type":"null"}],"description":"On the final results (`board.final`): the team's result on the public-dataset board, its rank and medians; null when it had none"},"rank_change":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"On the final results (`board.final`): places moved since the public-dataset board, positive up and 0 unchanged; null when the team is new"}},"required":["team_id","team_name","submission_id","eligible","median_quality","median_cost_micro_usd"]},"Leaderboard":{"type":"object","properties":{"board":{"anyOf":[{"type":"object","properties":{"dataset":{"type":"string","enum":["public","private"]},"final":{"type":"boolean","description":"The final results, taken live by the organizers"},"final_live":{"type":"boolean","description":"Whether the challenge's final results are live"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"suite_id":{"type":"string"},"runs":{"type":"integer"}},"required":["dataset","final","final_live","suite_id","runs"]},{"type":"null"}]},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntry"}},"evaluating":{"type":"array","items":{"type":"object","properties":{"team_id":{"type":"string"},"team_name":{"type":"string"},"submission_id":{"type":"string"},"review_status":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"submission_count":{"type":"integer"}},"required":["team_id","team_name","submission_id","review_status","created_at","submission_count"]}}},"required":["entries","evaluating"]},"ModelStatus":{"type":"object","properties":{"provider":{"type":"string","description":"The proxy's provider id, e.g. `clef` or `qwen` (`/llm/{provider}`)"},"name":{"type":"string"},"state":{"type":"string","enum":["ready","starting","idle","available","off"]},"queued":{"anyOf":[{"type":"integer","description":"Calls waiting at the model's front, when it says"},{"type":"null"}]},"weights":{"anyOf":[{"type":"string","description":"The weights the front serves, when it says"},{"type":"null"}]},"checked_at":{"anyOf":[{"type":"integer","description":"When the front last answered"},{"type":"null"}]},"price":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"}},"required":["input","output"],"description":"What each call counts at in a run, USD per million input and output tokens; never charged"}},"required":["provider","name","state","queued","weights","checked_at","price"]},"Stats":{"type":"object","properties":{"teams":{"type":"integer"},"submissions":{"type":"integer"},"scored_runs":{"type":"integer"},"running_now":{"type":"integer"},"best_quality":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["teams","submissions","scored_runs","running_now","best_quality","updated_at"]},"Activity":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["registered","joined","submitted","reviewed","evaluated","rank_changed"]},"at":{"type":"integer","description":"Unix time in milliseconds"},"team_id":{"type":"string"},"team_name":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["id","type","at","team_id","team_name","data"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["events","next_cursor"]},"Profile":{"type":"object","properties":{"team_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["captain","member"]}},"required":["user_id","login","name","avatar_url","role"]}},"challenges":{"type":"array","items":{"type":"object","properties":{"challenge_id":{"type":"string"},"title":{"type":"string"},"best":{"anyOf":[{"type":"object","properties":{"rank":{"type":"integer"},"eligible":{"type":"boolean"},"median_quality":{"type":"number"},"median_cost_micro_usd":{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},"median_duration_ms":{"type":"integer"},"submission_id":{"type":"string"},"per_scenario":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"median_quality":{"type":"number"},"eligible":{"type":"boolean"}},"required":["label","median_quality","eligible"]}}},"required":["rank","eligible","median_quality","median_cost_micro_usd","median_duration_ms","submission_id","per_scenario"]},{"type":"null"}]},"history":{"type":"array","items":{"type":"object","properties":{"submission_id":{"type":"string"},"submitted_at":{"type":"integer","description":"Unix time in milliseconds"},"review_status":{"type":"string"},"status":{"type":"string"},"eligible":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"median_quality":{"anyOf":[{"type":"number"},{"type":"null"}]},"median_cost_micro_usd":{"anyOf":[{"type":"integer","description":"Micro-USD (1,000,000 = 1 USD)"},{"type":"null"}]},"median_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"per_scenario":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"median_quality":{"type":"number"},"eligible":{"type":"boolean"}},"required":["label","median_quality","eligible"]}}},"required":["submission_id","submitted_at","review_status","status","eligible","median_quality","median_cost_micro_usd","median_duration_ms","per_scenario"]}}},"required":["challenge_id","title","best","history"]}}},"required":["team_id","name","created_at","members","challenges"]},"Dashboard":{"type":"object","properties":{"team":{"type":"object","properties":{"team_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["team_id","name","created_at"]},"challenges":{"type":"array","items":{"type":"object","properties":{"challenge_id":{"type":"string"},"title":{"type":"string"},"best":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"submissions":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}},"practice_runs":{"type":"array","items":{"$ref":"#/components/schemas/Run"}},"rehearsals":{"type":"array","items":{"type":"object","properties":{"rehearsal_id":{"type":"string"},"run_id":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"status":{"type":"string","enum":["queued","provisioning","setup","running","answered","submitted","timed_out","failed","scored"]}},"required":["rehearsal_id","run_id","created_at","status"]}}},"required":["challenge_id","title","best","submissions","practice_runs","rehearsals"]}}},"required":["team","challenges"]},"TeamCreated":{"type":"object","properties":{"team_id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string","description":"Shown once (`tk_...`)"}},"required":["team_id","name","key"]},"Account":{"type":"object","properties":{"user":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["captain","member"]}},"required":["user_id","login","name","avatar_url","role"]},"team":{"anyOf":[{"type":"object","properties":{"team_id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["captain","member"]},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["captain","member"]}},"required":["user_id","login","name","avatar_url","role"]}},"max_members":{"type":"integer"},"invites":{"type":"array","items":{"type":"object","properties":{"invite_id":{"type":"string"},"login":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["invite_id","login","url","created_at","expires_at"]}}},"required":["team_id","name","role","members","max_members","invites"]},{"type":"null"}]},"invites":{"type":"array","items":{"type":"object","properties":{"invite_id":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["invite_id","team_id","team_name","expires_at","invited_by"]}},"token":{"anyOf":[{"type":"object","properties":{"token_id":{"type":"string"},"label":{"type":"string"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"}},"required":["token_id","label","expires_at"]},{"type":"null"}]}},"required":["user","team","invites","token"]},"Invite":{"type":"object","properties":{"team_name":{"type":"string"},"login":{"type":"string"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"},"for_you":{"type":"boolean"},"invite_id":{"type":"string"},"team_id":{"type":"string"},"members_count":{"type":"integer"},"max_members":{"type":"integer"},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["captain","member"]}},"required":["user_id","login","name","avatar_url","role"]}}},"required":["team_name","login","expires_at","for_you"]},"PersonalToken":{"type":"object","properties":{"token_id":{"type":"string"},"label":{"type":"string"},"created_at":{"type":"integer","description":"Unix time in milliseconds"},"last_used_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]},"expires_at":{"type":"integer","description":"Unix time in milliseconds"},"current":{"type":"boolean","description":"The token this request was sent with"}},"required":["token_id","label","created_at","last_used_at","expires_at","current"]},"IssuedToken":{"type":"object","properties":{"token":{"type":"string","description":"`atp_...`, shown once; send it in `x-api-key`"},"token_id":{"type":"string"},"label":{"type":"string"},"expires_at":{"type":"integer","description":"Unix time in milliseconds"},"user":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"}},"required":["user_id","login"]}},"required":["token","token_id","label","expires_at","user"]},"DeviceCode":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string","description":"`XXXX-XXXX`"},"verification_url":{"type":"string","description":"The approval page, with the code filled in"},"expires_in":{"type":"integer","description":"Seconds"},"interval":{"type":"integer","description":"Seconds between polls"}},"required":["device_code","user_code","verification_url","expires_in","interval"]},"GrantError":{"type":"object","properties":{"type":{"const":"error"},"error":{"type":"object","properties":{"type":{"type":"string","enum":["authorization_pending","slow_down","access_denied","expired_token","invalid_grant","invalid_request_error"]},"message":{"type":"string"}},"required":["type","message"]},"interval":{"type":"integer","description":"Seconds to wait before the next poll"}},"required":["type","error"]},"RepoLink":{"type":"object","properties":{"repository":{"type":"object","properties":{"repo_id":{"type":"integer"},"owner":{"type":"string"},"name":{"type":"string"},"full_name":{"type":"string"},"url":{"type":"string"},"default_branch":{"type":"string"},"private":{"type":"boolean"}},"required":["repo_id","owner","name","full_name","url","default_branch","private"]},"linked_by":{"type":"object","properties":{"user_id":{"type":"string"},"login":{"type":"string"}},"required":["user_id","login"]},"linked_at":{"type":"integer","description":"Unix time in milliseconds"},"access":{"type":"object","properties":{"status":{"type":"string"},"checked_at":{"anyOf":[{"type":"integer","description":"Unix time in milliseconds"},{"type":"null"}]}},"required":["status","checked_at"]}},"required":["repository","linked_by","linked_at","access"]},"RepoState":{"type":"object","properties":{"configured":{"type":"boolean"},"role":{"type":"string","enum":["captain","member"]},"link":{"anyOf":[{"$ref":"#/components/schemas/RepoLink"},{"type":"null"}]},"connect_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_choose":{"type":"boolean"}},"required":["configured","role","link","connect_url","can_choose"]}}}}