{"openapi":"3.1.0","info":{"title":"MathStreams/Api","version":"sha256-11b0e34f057f","description":"Generated by Yichus from the checked program: every schema here is read off the handlers' types.\n\nEvery operation is a POST whose body is one JSON object (or no body when the handler takes no input).\nA union whose constructors carry values is an object whose `type` property names the constructor; a union of bare constructors is a string naming one; constructor names are snake_case. A value that is one of two types whose JSON differs (a string or an array, say) is that value alone. An optional value is `null` (or left out of a request) when absent.\nA refused or failed request answers a 4xx or 5xx status with `{\"message\": ..., \"status\": ..., \"code\": ...}` saying why. `code` is a stable snake_case name to branch on: an operation that names its own reasons lists them under its 404 and 422 responses, each with the members that describe it, and every other refusal carries its status's code (the `Error` schema lists them). A 503 that carries `Retry-After` means nothing was saved, or that sending the same request again is safe: send it again after that many seconds.\nA request that changes data may carry an `Idempotency-Key` header (1 to 255 characters): a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422."},"servers":[{"url":"https://api.problemsapi.com"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/streams/list":{"post":{"operationId":"streams_list","summary":"Lists your streams with each one's current revision.","tags":["streams"],"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Streams"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/streams/get":{"post":{"operationId":"streams_get","summary":"Shows one stream: its definition now (its skills, or the prompt a conversation at /chat/completions wrote), every revision so far, oldest first, the current one last, each saying what it runs: a program, its skills, or no program and why the writer gave none; and what names the program the current one runs.","tags":["streams"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stream":{"type":"string"}},"required":["stream"]}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamView"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/streams/writing":{"post":{"operationId":"streams_writing","summary":"Shows how the program of a revision of one of your streams was written, when a conversation defined it: each round's draft, oldest first, with the program the writer wrote (null when its call gave none) and how the draft ended: `accepted` (the revision runs it, `program_hash` names it), `returned` (sent back to the writer with these problems, which its next round fixes), or `stopped` (a step could give no answer, as `failed` says, and the next round shows the writer its draft again with why); and whether writing has ended (`ended`).","tags":["streams"],"description":"Shows how the program of a revision of one of your streams was written,\nwhen a conversation defined it: each round's draft, oldest first, with\nthe program the writer wrote (null when its call gave none) and how the\ndraft ended: `accepted` (the revision runs it, `program_hash` names it),\n`returned` (sent back to the writer with these problems, which its next\nround fixes), or `stopped` (a step could give no answer, as `failed`\nsays, and the next round shows the writer its draft again with why);\nand whether writing has ended (`ended`). The writer fixes one program\nover at most six rounds. While writing goes on, a round is under way,\nthe revision's `program` on /streams/get is `writing`, and its pulls\nanswer 503; a pull of a revision whose writer stopped starts another\nround.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionRef"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WritingView"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/streams/share":{"post":{"operationId":"streams_share","summary":"Shares one of your streams defined by conversation under a ref: any account that sends the ref to /streams/from_ref gets a stream with the same title and prompt, running the same program, with no model call.","tags":["streams"],"description":"Shares one of your streams defined by conversation under a ref: any\naccount that sends the ref to /streams/from_ref gets a stream with the\nsame title and prompt, running the same program, with no model call. The\nref copies the stream's current revision. Sharing it again gives the\nsame ref; once the stream is revised, sharing it gives a new ref, and\nthe old one still copies the revision it was made for. A ref cannot be\nwithdrawn, and whoever copies it reads the stream's title and prompt.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stream":{"type":"string"}},"required":["stream"]}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedRef"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/streams/from_ref":{"post":{"operationId":"streams_from_ref","summary":"Copies the stream shared under a ref as your stream `stream`, so an app you deploy can pin the stream it was designed with: the ref names one definition and one program, and copying it calls no model.","tags":["streams"],"description":"Copies the stream shared under a ref as your stream `stream`, so an app\nyou deploy can pin the stream it was designed with: the ref names one\ndefinition and one program, and copying it calls no model. A new slug\nmakes a new stream; a stream already named `stream` gets the shared\ndefinition and program as its next revision, unless it already has\nthem, in which case nothing changes. The copy draws its own sequence of\nquestions from the program, as any new revision does, so its pulls are\nnot the shared stream's pulls.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromRef"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSummary"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/streams/create":{"post":{"operationId":"streams_create","summary":"Makes a stream from a slug, a title and a list of skills.","tags":["streams"],"description":"Makes a stream from a slug, a title and a list of skills. Sending the\nsame stream again returns it unchanged; a slug already used by a\ndifferent stream is refused.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewStream"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSummary"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/streams/revise":{"post":{"operationId":"streams_revise","summary":"Changes a stream's skills.","tags":["streams"],"description":"Changes a stream's skills. A change of skills makes a new revision, and\npulls made before it keep their questions; the same skills again change\nnothing.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Revise"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSummary"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pulls/create":{"post":{"operationId":"pulls_create","summary":"Takes the next questions from a stream under a key you choose, such as the day.","tags":["pulls"],"description":"Takes the next questions from a stream under a key you choose, such as\nthe day. The same key always returns the same questions and changes\nnothing; the same key with a different count is refused. Each question\nhas a `type`, an id, a prompt and its answer. A `number` question's\nanswer is a number, and it has its LaTeX; a `text` question's answer is\ntext, such as a command, and only a stream's program states one. A question a skill\nmakes also has its problem as a typed tree (the numbers, the\noperation, and whether to set it inline or stacked in columns), from\nwhich the rest is computed. A stream defined by conversation makes its\nquestions from the code the service wrote for its definition, which\ndraws each question's numbers and works out its answer, and takes the\nnames and other words it dresses a question in from lists of its own\nwhen it can, so a pull takes well under a second. When the definition\nneeds words no list in the code can give, the code may instead ask a\nmodel for a few words, of a fixed kind such as a first name or a kind\nof food, and each new pull then waits a few seconds for that call,\nwhich writes the words for every question the pull would choose (two\ncalls when its questions ask twice), except those it serves again (below). Words are used only when\nthey hold a letter and nothing but the letters A to Z and À to ž (such\nas é, ß and ł), spaces, hyphens, apostrophes, periods and commas; the\npull passes by a question whose words cannot be used. Words are\nwritten for the questions that ask among twice as many as the pull\nasks for, so a few unusable words cost nothing; past that, it can\nserve fewer than asked for. When no code was accepted for a\ndefinition, a model writes each pull's problems to it instead: a\nproblem no tree poses, the model states in words with its answer, and\na second call to the model solves it without seeing that answer; it is\nserved only when the two agree. A new key may serve again as many\nquestions as half the count it asks for, from earlier pulls of the\nstream's current revision, when a model call paid for them (it wrote\nthem, or their words), so fewer are written; none whose prompt is\namong the last 60 the stream served. Such a question keeps its id and\nanswer, and /pulls/why names the pull that first served it. When no\nquestion can be served, a call to the model fails, or the stream\nchanges while they are made (it is redefined, or another of its pulls\nis taken), the pull answers 503 and nothing is saved, and sending it\nagain tries again. A stream whose program cannot make a pull's\nquestions answers 503 on each try of that pull; a conversation that\nchanges the definition writes a new program.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pulled"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pulls/history":{"post":{"operationId":"pulls_history","summary":"Lists the pulls taken from a stream, newest first.","tags":["pulls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stream":{"type":"string"}},"required":["stream"]}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/History"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pulls/get":{"post":{"operationId":"pulls_get","summary":"Returns the questions of one earlier pull by its key.","tags":["pulls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRef"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pull"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pulls/check":{"post":{"operationId":"pulls_check","summary":"Checks a learner's answers to one pull: one per question in order, or each naming its question's id, so one question can be checked alone.","tags":["pulls"],"description":"Checks a learner's answers to one pull: one per question in order, or\neach naming its question's id, so one question can be checked alone.\nEach mark names its question and has the `type` of its question. An\nanswer to a `number` question is read as an exact number, so 16/5,\n3 1/5, 3-1/5, 3⅕, \\frac{16}{5} and 3.2 are the same; its mark comes\nback with the number read, the form it was written in, whether it is\ncorrect, and whether it is written the way the question asks. An answer\nthat cannot be read, or is left empty, has no number or form and is not\ncorrect. An answer to a `text` question is correct when its words are\nthe answer's, however they are spaced. A question the stream's program\nwrote its own check for is marked by that check, which may also name\nthe mistake a wrong answer makes, and may accept other answers, asking\na judge model about an answer its code cannot decide; the judge's\nruling on that answer is kept, so the same answer is asked about once.\nWhen the check cannot run, or the judge cannot rule, the check answers\n503 and sending it again is safe. Checking changes nothing else.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checked"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pulls/why":{"post":{"operationId":"pulls_why","summary":"Shows why one question of an earlier pull is what it is.","tags":["pulls"],"description":"Shows why one question of an earlier pull is what it is. A question\nmade by code (a stream's skills, or the code the service wrote for a\ndefinition) keeps the numbers that code drew for it and any words a\nmodel wrote for it, and the service replays them through that code:\n`steps` lists each number drawn, with the range it was drawn from, and\neach set of words, with the kind of words asked for, in the order the\ncode took them, and `replay` says whether the replay made the same\nquestion again. Its numerals come from the code and its draws (words\na model writes hold no digits), and its answer is computed by the\ncode. The code itself is not shown. A question a model wrote at the\npull has no steps. `first_pull` names the earlier pull that first\nserved a question this pull served again. Asking changes nothing.\n\nEach account may call this at most 120 calls in 60 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionRef"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Why"}}},"headers":{"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"429":{"description":"One of the route's limits has run out (at most 120 calls in 60 seconds): the message names it by what it counts, the account or a request field's value, and says the wait in words. Send the request again after the Retry-After seconds. Its `code` is `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/pulls/check_photo":{"post":{"operationId":"pulls_check_photo","summary":"Checks a learner's answers from a photo of their worksheet for one pull.","tags":["pulls"],"description":"Checks a learner's answers from a photo of their worksheet for one pull.\nA model reads what the learner wrote beside each question, as written,\nand the answers it read are marked as /pulls/check marks them: one mark\nper question in order, each with the answer read in `given`. A question\nwhose answer was left empty, crossed out or could not be read is marked\nas unanswered. Send the image as an https: URL or a data:image/ URL; the\nwhole request must be under 1 MiB, so shrink a phone photo first. When\nthe model cannot read the photo, the check answers 503 and sending it\nagain asks the model again. Checking changes nothing but the judge's\nrulings it keeps, as /pulls/check does.\n\nEach account may call this at most 60 calls in 60 seconds and 1200 in 3600 seconds.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoCheck"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checked"}}},"headers":{"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"429":{"description":"One of the route's limits has run out (at most 60 calls in 60 seconds and 1200 in 3600 seconds): the message names it by what it counts, the account or a request field's value, and says the wait in words. Send the request again after the Retry-After seconds. Its `code` is `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/learner/pull":{"post":{"operationId":"learner_pull","summary":"Returns the questions of the pull a token names, without their answers, for a page your learners load: it takes your publishable key and the `token` /pulls/create gave the pull, and reaches no other pull.","tags":["learner"],"description":"Returns the questions of the pull a token names, without their answers,\nfor a page your learners load: it takes your publishable key and the\n`token` /pulls/create gave the pull, and reaches no other pull.\n\nEach account may call this at most 240 calls in 60 seconds.\n\nA publishable key may call this operation too, from pages on any site.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerRef"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerPull"}}},"headers":{"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"429":{"description":"One of the route's limits has run out (at most 240 calls in 60 seconds): the message names it by what it counts, the account or a request field's value, and says the wait in words. Send the request again after the Retry-After seconds. Its `code` is `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/learner/check":{"post":{"operationId":"learner_check","summary":"Checks a learner's answers to the pull a token names, as /pulls/check does, for a page your learners load: it takes your publishable key and the pull's `token`.","tags":["learner"],"description":"Checks a learner's answers to the pull a token names, as /pulls/check\ndoes, for a page your learners load: it takes your publishable key and\nthe pull's `token`. A mark says whether its answer is correct and\nwritten the way the question asks, and may name a wrong answer's\nmistake, but never gives the question's answer, so a learner cannot\nread answers off a check of blanks.\n\nEach account may call this at most 120 calls in 60 seconds and 2400 in 3600 seconds and 30 in 86400 seconds for each `token`.\n\nA publishable key may call this operation too, from pages on any site.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerCheck"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerChecked"}}},"headers":{"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"429":{"description":"One of the route's limits has run out (at most 120 calls in 60 seconds and 2400 in 3600 seconds and 30 in 86400 seconds for each `token`): the message names it by what it counts, the account or a request field's value, and says the wait in words. Send the request again after the Retry-After seconds. Its `code` is `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/learner/check_photo":{"post":{"operationId":"learner_check_photo","summary":"Checks a learner's answers from a photo of their worksheet, as /pulls/check_photo does, for a page your learners load: it takes your publishable key and the pull's `token`.","tags":["learner"],"description":"Checks a learner's answers from a photo of their worksheet, as\n/pulls/check_photo does, for a page your learners load: it takes your\npublishable key and the pull's `token`. Like /learner/check, a mark\nnever gives the question's answer. Each check calls a model, which your\naccount pays for, so any page holding a pull's token can spend on it.\n\nEach account may call this at most 10 calls in 60 seconds and 200 in 3600 seconds and 10 in 86400 seconds for each `token`.\n\nA publishable key may call this operation too, from pages on any site.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerPhotoCheck"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerChecked"}}},"headers":{"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"429":{"description":"One of the route's limits has run out (at most 10 calls in 60 seconds and 200 in 3600 seconds and 10 in 86400 seconds for each `token`): the message names it by what it counts, the account or a request field's value, and says the wait in words. Send the request again after the Retry-After seconds. Its `code` is `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The route's limits, one item per limit: `q` calls per account in each window of `w` seconds.","schema":{"type":"string"}},"RateLimit":{"description":"One item per limit counted for this call, named as in RateLimit-Policy: `r` calls left in its current window, which ends in `t` seconds. Limits are counted shortest window first, and a call past one is not counted against the longer ones.","schema":{"type":"string"}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/chat/completions":{"post":{"operationId":"chat_completions","summary":"Defines a stream by conversation, in the OpenAI Chat Completions shape, so an OpenAI client pointed at this API can send it. `model` names the stream to define, as `stream:maya` names the stream whose slug is maya, and `messages` is the whole conversation so far.","tags":["chat"],"description":"Defines a stream by conversation, in the OpenAI Chat Completions shape,\nso an OpenAI client pointed at this API can send it. `model` names the\nstream to define, as `stream:maya` names the stream whose slug is maya,\nand `messages` is the whole conversation so far. A message's content is\na string or a list of text and image parts, and a user message may\ncarry images (https: or data:image/ URLs), such as a worksheet to match.\nThe other request fields a client sends with them, such as\n`temperature` or `max_tokens`, are accepted and ignored, except a\nrequest for a streamed answer, for a number of choices other than one,\nor for log probabilities, which is refused.\nThe assistant asks a question back when it needs one. Once it knows what\nyou want it writes the stream's definition, which creates the stream or\nmakes its next revision, and `stream` names it. A turn takes a few\nseconds. A new definition is saved at once, and its `program` is\n`writing`: the service then writes the code that makes its questions,\nand checks a sample of them with a second solver, in up to six rounds,\nthe writer fixing its program after each the service sends back. That\ntakes about half a minute, and longer when a draft is sent back; until\nit ends a pull of the stream answers 503 try_again, and /streams/writing\nshows each draft so far. Once writing ends, the revision's `program` on\n/streams/get says what it runs: the code, or no code and why, in which\ncase its pulls are written by a model. A definition the same as the\ncurrent one changes nothing.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}}},"responses":{"200":{"description":"The handler's result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}}}},"400":{"description":"The request is malformed or out of bounds (a limit, a format); the message says which. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"What the request names does not exist for this caller. Its `code` names why, and its other members say what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalError"}}}},"422":{"description":"The request is valid, but the current state refuses it (a name already taken, a key reused for a different request). Its `code` names why, and its other members say what. An Idempotency-Key sent again with a different body is `idempotency_key_reused`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RefusalError"},{"$ref":"#/components/schemas/IdempotencyKeyReusedError"}]}}}},"503":{"description":"The service could not settle the request now: nothing was saved, or sending the same request again is safe. Send it again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/publishable_keys/create":{"post":{"operationId":"publishable_keys_create","summary":"Makes your account a publishable key.","description":"A publishable key acts as your account but may call only /learner/pull, /learner/check, /learner/check_photo, so it is safe in pages your own users load, from any site. Only a key without scopes, one made where your account's keys are listed, may make one. Each call makes a new key, so list your account's publishable keys first (publishable_keys_list, POST /publishable_keys/list) and reuse one that fits; revoke one you no longer need with publishable_keys_revoke (POST /publishable_keys/revoke). Send an Idempotency-Key to retry safely: a repeat with the same key and name answers the key the first request made, without making another.","tags":["publishable_keys"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request for its retries: a repeat with the same key and body gets the handler's first answer, marked `Idempotent-Replayed: true`, without running again. A 503 with `Retry-After`, or a request refused before its handler ran, runs again. Each server instance keeps the latest 1000 keys in memory, so a repeat also runs again after a restart, on another instance, or once 1000 newer keys have been used. The same key with a different body is refused with 422. Send a new key for a new request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"What the key is for, shown where your keys are listed. \"Publishable key\" when left out."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The new key.","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The key, sent as Authorization: Bearer. /publishable_keys/list shows it again."},"id":{"type":"string","description":"The key's id where your keys are listed."},"name":{"type":"string","description":"The key's name."}},"required":["key","id","name"]}}}},"400":{"description":"The body is not an object with an optional name of 1 to 100 characters, or the Idempotency-Key is not 1 to 255 characters. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The request carries a publishable key, which cannot make keys. Its `code` is `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An Idempotency-Key sent again with a different name. Its `code` is `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key could not be made now. Send the request again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/publishable_keys/list":{"post":{"operationId":"publishable_keys_list","summary":"Lists your account's publishable keys.","description":"Every publishable key of your account that is not revoked or expired, newest first, with the key itself: a publishable key is made to be shown in a page, so reuse one here rather than making another. A key without scopes, or a signed-in caller, may list them; a publishable key may not.","tags":["publishable_keys"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Your publishable keys.","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The key's id where your keys are listed."},"name":{"type":"string","description":"The key's name."},"created_at":{"type":"string","format":"date-time","description":"When the key was made."},"key":{"type":"string","description":"The key, sent as Authorization: Bearer."}},"required":["id","name","created_at","key"]}}},"required":["keys"]}}}},"400":{"description":"The body is not an empty object. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The request carries a publishable key, which cannot see or revoke keys. Its `code` is `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The keys could not be listed now. Send the request again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/publishable_keys/revoke":{"post":{"operationId":"publishable_keys_revoke","summary":"Revokes one of your account's publishable keys.","description":"The key stops working: pages that hold it are refused within a minute, as every instance of this service forgets the keys it checked within that time. Only your account's publishable keys can be revoked here; your other keys are revoked where your account's keys are listed. Revoking a key already revoked answers the same, so a repeat is safe.","tags":["publishable_keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"description":"The key's id, as /publishable_keys/list or /publishable_keys/create answered it."}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The key, revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The key's id where your keys are listed."},"name":{"type":"string","description":"The key's name."},"revoked":{"type":"boolean","const":true,"description":"Always true: the key is revoked."}},"required":["id","name","revoked"]}}}},"400":{"description":"The body is not an object with an id of 1 to 100 characters. Its `code` is `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The request carries a publishable key, which cannot see or revoke keys. Its `code` is `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No publishable key of your account has that id. Its `code` is `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key could not be revoked now. Send the request again after the Retry-After seconds. Its `code` is `try_again`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"}}}},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"schemas":{"Accepted":{"type":"object","properties":{"type":{"type":"string","const":"accepted"},"program_hash":{"type":"string"},"review":{"anyOf":[{"$ref":"#/components/schemas/ShapeReview"},{"type":"null"}]}},"required":["type","program_hash"]},"AddWhole":{"type":"object","properties":{"type":{"type":"string","const":"add_whole"},"digits":{"type":"integer"},"regroup":{"type":"boolean"}},"required":["type","digits","regroup"]},"Answer":{"description":"An answer to the question whose id is `question`.","type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"]},"AnswerForm":{"description":"The form the answer is asked for.","type":"string","enum":["improper_fraction","whole_number","simplest_fraction","decimal_number"]},"BySkills":{"type":"object","properties":{"type":{"type":"string","const":"by_skills"}},"required":["type"]},"ChatCompletion":{"description":"One turn of a conversation that defines a stream, as Chat Completions\nanswers it: `object` is \"chat.completion\" and `created` is in seconds.\n`stream` is the stream this turn created or revised, or null when the\nturn saved nothing (a question back to you). `program` is what that\nrevision runs, as /streams/get records it, so a definition saved with no\nprogram says why; it is null when `stream` is, and when the turn wrote\nthe definition the stream already had, whose revision was saved before\nrevisions recorded what they run.","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"$ref":"#/components/schemas/Choice"}},"stream":{"anyOf":[{"$ref":"#/components/schemas/StreamSummary"},{"type":"null"}]},"program":{"anyOf":[{"$ref":"#/components/schemas/ProgramRecord"},{"type":"null"}]}},"required":["id","object","created","model","choices"]},"ChatCompletionMessage":{"description":"The assistant's message: `role` is `assistant`, and `content` what it\nsays to you.","type":"object","properties":{"role":{"$ref":"#/components/schemas/Role"},"content":{"type":"string"}},"required":["role","content"]},"CheckRequest":{"description":"A learner's answers to one pull. `answers` has one per question in order\n(\"\" or a shorter list leaves a question unanswered); `by_question` names\neach answer's question by its id, in any order, so a check can cover one\nquestion or a few. Send at most one; sending neither checks no answers,\nand every question comes back unanswered.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"answers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"by_question":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Answer"}},{"type":"null"}]}},"required":["stream","key"]},"Checked":{"description":"The marks for one pull's answers, one per question in order.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"marks":{"type":"array","items":{"$ref":"#/components/schemas/Mark"}}},"required":["stream","key","marks"]},"Choice":{"description":"The one choice a turn answers with: `index` 0, the message, and\n`finish_reason` \"stop\".","type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/ChatCompletionMessage"},"finish_reason":{"type":"string"}},"required":["index","message","finish_reason"]},"CompletionRequest":{"description":"A Chat Completions request: `model` and `messages`, the conversation,\nand the other fields an OpenAI client may send, so a client that sends\nits settings with every request is answered. Each of the others may be\nleft out or null. A turn answers one message, all at once, so most are\naccepted and ignored: `temperature`, `top_p`, `frequency_penalty` and\n`presence_penalty` (numbers, read as any JSON); `max_tokens`,\n`max_completion_tokens`, `seed` and `top_logprobs` (integers); `stop`\n(a string or a list of strings); `user`, `safety_identifier`,\n`prompt_cache_key`, `prompt_cache_retention`, `service_tier`,\n`reasoning_effort` and `verbosity` (strings); `store` and\n`parallel_tool_calls` (booleans); and `metadata`, `logit_bias` and\n`stream_options` (any JSON). Three are refused with 400 when they ask\nfor what a turn does not give: `stream` true (an answer is not\nstreamed), `n` other than 1 (a turn has one choice) and `logprobs` true\n(a turn has no log probabilities). Any other field, such as `tools` or\n`response_format`, is refused as undeclared.","type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"n":{"anyOf":[{"type":"integer"},{"type":"null"}]},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"top_logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"temperature":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."},"top_p":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."},"frequency_penalty":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."},"presence_penalty":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"stop":{"anyOf":[{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]},"user":{"anyOf":[{"type":"string"},{"type":"null"}]},"safety_identifier":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt_cache_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt_cache_retention":{"anyOf":[{"type":"string"},{"type":"null"}]},"service_tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}]},"verbosity":{"anyOf":[{"type":"string"},{"type":"null"}]},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"metadata":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."},"logit_bias":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."},"stream_options":{"description":"Any JSON value, read exactly as written: a number keeps its text (0.70 stays 0.70). It nests at most 256 arrays and objects, is small enough to write back (an array of up to about 500,000 numbers is), and holds no string with a lone surrogate escape such as \\ud800. In a request, null and leaving the field out are the same."}},"required":["model","messages"]},"Convert":{"type":"object","properties":{"type":{"type":"string","const":"convert"},"numeral":{"$ref":"#/components/schemas/Numeral"},"form":{"$ref":"#/components/schemas/AnswerForm"}},"required":["type","numeral","form"]},"Draft":{"description":"The draft one round of writing a revision's program made: the program\nthe writer wrote (None when its call gave none), and how the draft ended.","type":"object","properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended":{"$ref":"#/components/schemas/DraftEnd"}},"required":["ended"]},"DraftEnd":{"description":"How a draft of a program ended: the service accepted it, and the revision\nruns it, with what the review of its shape found (null on a draft\naccepted before drafts were reviewed); the service sent it back to the writer with these problems,\neach cut to its head and tail when longer than 2000 characters; or a\nstep could give no answer (the call to the writer failed, say), and the\nnext round shows the writer its draft again, if it wrote one, with why\nit was not checked.","oneOf":[{"$ref":"#/components/schemas/Accepted"},{"$ref":"#/components/schemas/Returned"},{"$ref":"#/components/schemas/Stopped"}],"discriminator":{"propertyName":"type","mapping":{"accepted":"#/components/schemas/Accepted","returned":"#/components/schemas/Returned","stopped":"#/components/schemas/Stopped"}}},"Drew":{"type":"object","properties":{"type":{"type":"string","const":"drew"},"low":{"type":"integer"},"high":{"type":"integer"},"value":{"type":"integer"}},"required":["type","low","high","value"]},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Why the request was refused or failed."},"status":{"type":"integer","description":"The response's HTTP status, repeated so the body alone says it."},"code":{"type":"string","description":"Why, as a stable snake_case name to branch on. A refusal an operation names itself carries its own code, listed with the operation; any other carries its status's: `invalid` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405), `too_large` (413), `refused` (422), `rate_limited` (429), `internal` (500), `try_again` (503), otherwise `error`. An Idempotency-Key sent again with a different body is `idempotency_key_reused` (422)."},"auth_reason":{"type":"string","description":"Only on a refused credential (a 401, a 403, or a 503 when the credential could not be checked): which check refused it, as a stable snake_case name beside the status's `code` (`not_yet_valid`, `wrong_authorized_party`, `invalid_session`, `missing_bearer`, `malformed`, `bad_signature`, `unknown_kid`, `expired`, `wrong_issuer`, `wrong_audience`, `missing_sub`, `invalid_roles_claim`, `jwks_unavailable`, `no_webcrypto`, `invalid_api_key`, `sign_in_ended`, `revoked_api_key`, `expired_api_key`, `unknown_api_key_scopes`, `oauth_scope_missing`, `publishable_key_not_allowed`, `api_key_check_unavailable`, `missing_user_id`). `message` says the same in a sentence for a person."}},"required":["message","status","code"]},"Evaluate":{"type":"object","properties":{"type":{"type":"string","const":"evaluate"},"operator":{"$ref":"#/components/schemas/Operator"},"operands":{"type":"array","items":{"$ref":"#/components/schemas/Numeral"}},"layout":{"$ref":"#/components/schemas/Layout"}},"required":["type","operator","operands","layout"]},"Fraction":{"type":"object","properties":{"type":{"type":"string","const":"fraction"},"numerator":{"type":"integer"},"denominator":{"type":"integer"}},"required":["type","numerator","denominator"]},"FromRef":{"description":"A copy of the stream shared under `ref` (1 to 64 characters), as your\nstream named `stream` (1 to 64 characters).","type":"object","properties":{"ref":{"type":"string"},"stream":{"type":"string"}},"required":["ref","stream"]},"History":{"description":"A stream's pulls, newest first: the latest 400, and older pulls stay\nreadable by key.","type":"object","properties":{"stream":{"type":"string"},"pulls":{"type":"array","items":{"$ref":"#/components/schemas/PullSummary"}}},"required":["stream","pulls"]},"IdempotencyKeyReusedError":{"description":"An Idempotency-Key sent again with a different body: the service refuses it before the operation runs. Send a new key for a new request.","allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"idempotency_key_reused"}},"required":["code"]}]},"ImageRef":{"description":"An image, by an https: URL or a data:image/ URL.","type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"ImageUrl":{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"$ref":"#/components/schemas/ImageRef"}},"required":["type","image_url"]},"Integer":{"type":"object","properties":{"type":{"type":"string","const":"integer"},"value":{"type":"integer"}},"required":["type","value"]},"Layout":{"description":"How to set a sum, difference or product out: `inline`, or `stacked` in\ncolumns with the operands right-aligned one above the other. A skill\nstacks sums and differences of numbers with more than one digit.","type":"string","enum":["inline","stacked"]},"LearnerCheck":{"description":"A learner's answers to the pull a `token` names, sent as a check sends\nthem.","type":"object","properties":{"token":{"type":"string"},"answers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"by_question":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Answer"}},{"type":"null"}]}},"required":["token"]},"LearnerChecked":{"description":"The marks for one pull's answers as its learners see them.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"marks":{"type":"array","items":{"$ref":"#/components/schemas/LearnerMark"}}},"required":["stream","key","marks"]},"LearnerMark":{"description":"One answer's mark as its learner sees it: whether it is correct and\nwhether it is written the way the question asks, but never the\nquestion's answer. A `number` mark also has the number the answer was\nread as and the form it was written in (both null when it could not be\nread, or was left empty), and the mistake a wrong answer makes when the\nquestion's own check names one.","oneOf":[{"$ref":"#/components/schemas/LearnerMark_Number"},{"$ref":"#/components/schemas/LearnerMark_Text"}],"discriminator":{"propertyName":"type","mapping":{"number":"#/components/schemas/LearnerMark_Number","text":"#/components/schemas/LearnerMark_Text"}}},"LearnerMark_Number":{"type":"object","properties":{"type":{"type":"string","const":"number"},"question":{"type":"string"},"given":{"type":"string"},"value":{"anyOf":[{"$ref":"#/components/schemas/Rational"},{"type":"null"}]},"written":{"anyOf":[{"$ref":"#/components/schemas/Written"},{"type":"null"}]},"correct":{"type":"boolean"},"as_asked":{"type":"boolean"},"mistake":{"anyOf":[{"$ref":"#/components/schemas/Mistake"},{"type":"null"}]}},"required":["type","question","given","correct","as_asked"]},"LearnerMark_Text":{"type":"object","properties":{"type":{"type":"string","const":"text"},"question":{"type":"string"},"given":{"type":"string"},"correct":{"type":"boolean"},"as_asked":{"type":"boolean"}},"required":["type","question","given","correct","as_asked"]},"LearnerPhotoCheck":{"description":"A photo of a learner's worksheet for the pull a `token` names, sent as\na photo check sends it.","type":"object","properties":{"token":{"type":"string"},"image":{"type":"string"}},"required":["token","image"]},"LearnerPull":{"description":"A pull as its learners see it: its questions, without their answers.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/LearnerQuestion"}}},"required":["stream","key","questions"]},"LearnerQuestion":{"description":"A pull's question as its learner sees it: a question without its\nanswer. A `number` question's `form` says how the answer is to be\nwritten. A question stated in words has the prompt and LaTeX the\nstream's program or a model wrote, each told not to give the answer\nthere; nothing checks that they did not. A `text` question has only\nits prompt, which the stream's program wrote.","oneOf":[{"$ref":"#/components/schemas/LearnerQuestion_Number"},{"$ref":"#/components/schemas/LearnerQuestion_Text"}],"discriminator":{"propertyName":"type","mapping":{"number":"#/components/schemas/LearnerQuestion_Number","text":"#/components/schemas/LearnerQuestion_Text"}}},"LearnerQuestion_Number":{"type":"object","properties":{"type":{"type":"string","const":"number"},"id":{"type":"string"},"prompt":{"type":"string"},"problem":{"anyOf":[{"$ref":"#/components/schemas/Problem"},{"type":"null"}]},"latex":{"anyOf":[{"type":"string"},{"type":"null"}]},"form":{"$ref":"#/components/schemas/AnswerForm"}},"required":["type","id","prompt","form"]},"LearnerQuestion_Text":{"type":"object","properties":{"type":{"type":"string","const":"text"},"id":{"type":"string"},"prompt":{"type":"string"}},"required":["type","id","prompt"]},"LearnerRef":{"description":"A pull, by the `token` /pulls/create gave it: what a page your learners\nload sends, with your publishable key.","type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"Mark":{"description":"One answer against its question, named by its id in `question`, by the\nkind of answer the question asks for. `correct` says the answer is the\nquestion's; `as_asked` says it is also written the way the question\nasks; `expected` is the answer as the question writes it. A number\nquestion's mark also has `value`, the number the answer was read as,\nand `written`, the form it was written in (both null when it could not\nbe read, or was left empty), and `mistake`, the mistake a wrong answer\nmakes when the question's own check names one, and null otherwise. A\nwrong number is still as asked when it is written in the form the\nquestion asks for; a wrong text answer is not.","oneOf":[{"$ref":"#/components/schemas/Mark_Number"},{"$ref":"#/components/schemas/Mark_Text"}],"discriminator":{"propertyName":"type","mapping":{"number":"#/components/schemas/Mark_Number","text":"#/components/schemas/Mark_Text"}}},"Mark_Number":{"type":"object","properties":{"type":{"type":"string","const":"number"},"question":{"type":"string"},"given":{"type":"string"},"value":{"anyOf":[{"$ref":"#/components/schemas/Rational"},{"type":"null"}]},"written":{"anyOf":[{"$ref":"#/components/schemas/Written"},{"type":"null"}]},"correct":{"type":"boolean"},"as_asked":{"type":"boolean"},"expected":{"type":"string"},"mistake":{"anyOf":[{"$ref":"#/components/schemas/Mistake"},{"type":"null"}]}},"required":["type","question","given","correct","as_asked","expected"]},"Mark_Text":{"type":"object","properties":{"type":{"type":"string","const":"text"},"question":{"type":"string"},"given":{"type":"string"},"correct":{"type":"boolean"},"as_asked":{"type":"boolean"},"expected":{"type":"string"}},"required":["type","question","given","correct","as_asked","expected"]},"Message":{"description":"One message of the conversation. `content` is a string, or a list of\nparts; only a user message may carry images.","type":"object","properties":{"role":{"$ref":"#/components/schemas/Role"},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/Part"}}]}},"required":["role","content"]},"Mistake":{"description":"What a wrong answer got wrong, as a question's own check names it: an\noperation used in place of the one the question asks for, an answer one\naway from the right one, one a power of ten away (a place-value slip),\nparts in the wrong order (digits, or a fraction upside down), the wrong\nsign, a rounding the question did not ask for, or a missing or wrong\nunit. A fixed list, and none of them carries a value, so a check that\nnames a mistake never shows a learner's page the answer.","type":"string","enum":["used_addition","used_subtraction","used_multiplication","used_division","off_by_one","place_value","swapped","wrong_sign","rounding","units"]},"MixedNumber":{"type":"object","properties":{"type":{"type":"string","const":"mixed_number"},"whole":{"type":"integer"},"numerator":{"type":"integer"},"denominator":{"type":"integer"}},"required":["type","whole","numerator","denominator"]},"MixedToImproper":{"type":"object","properties":{"type":{"type":"string","const":"mixed_to_improper"},"max_whole":{"type":"integer"},"denominators":{"type":"array","items":{"type":"integer"}}},"required":["type","max_whole","denominators"]},"NewStream":{"description":"A new stream: a slug of 1 to 64 characters that names it among your\nstreams, a title of 1 to 200 characters, and 1 to 10 skills.","type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/Skill"}}},"required":["slug","title","skills"]},"NotWritten":{"type":"object","properties":{"type":{"type":"string","const":"not_written"},"sent_back":{"type":"array","items":{"$ref":"#/components/schemas/SentBack"}},"failed":{"anyOf":[{"$ref":"#/components/schemas/StepFailed"},{"type":"null"}]}},"required":["type","sent_back"]},"Numeral":{"description":"A number as a problem writes it: a whole number, a fraction kept as\nwritten (6/8 stays 6/8), or a mixed number such as 3 1/5: `integer`,\n`fraction` and `mixed_number`, after MathJSON and Content MathML.","oneOf":[{"$ref":"#/components/schemas/Integer"},{"$ref":"#/components/schemas/Fraction"},{"$ref":"#/components/schemas/MixedNumber"}],"discriminator":{"propertyName":"type","mapping":{"integer":"#/components/schemas/Integer","fraction":"#/components/schemas/Fraction","mixed_number":"#/components/schemas/MixedNumber"}}},"Operator":{"description":"An operation on numbers, `add`, `subtract` or `multiply`, after\nMathJSON's Add, Subtract and Multiply.","type":"string","enum":["add","subtract","multiply"]},"Part":{"description":"One part of a message: `{\"type\": \"text\", \"text\": ...}` or\n`{\"type\": \"image_url\", \"image_url\": {\"url\": ...}}`.","oneOf":[{"$ref":"#/components/schemas/Part_Text"},{"$ref":"#/components/schemas/ImageUrl"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/Part_Text","image_url":"#/components/schemas/ImageUrl"}}},"Part_Text":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},"PhotoCheck":{"description":"A photo of a learner's worksheet for one pull: `image` is an https: URL\nor a data:image/ URL (the whole request under 1 MiB).","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"image":{"type":"string"}},"required":["stream","key","image"]},"Problem":{"description":"A problem as a typed tree: the source of truth for the prompt, the\nLaTeX and the answer. `evaluate` applies the operator to its operands\nin order (`subtract` takes the rest from the first), set out as\n`layout` says; `convert` writes a number in another form; `simplify`\nwrites a fraction in lowest terms.","oneOf":[{"$ref":"#/components/schemas/Evaluate"},{"$ref":"#/components/schemas/Convert"},{"$ref":"#/components/schemas/Simplify"}],"discriminator":{"propertyName":"type","mapping":{"evaluate":"#/components/schemas/Evaluate","convert":"#/components/schemas/Convert","simplify":"#/components/schemas/Simplify"}}},"ProgramRecord":{"description":"What a revision runs: the program `program_hash` names; no program,\nbecause the writer gave its definition none, so its pulls ask a model\nto write number problems (`sent_back` is each draft the service sent back\nto the writer, oldest first, and `failed` the step that stopped the\nlast draft, or null when the last draft was sent back); its skills; or\nnothing yet, while its program is being written (/streams/writing shows\nthe drafts so far); or no program, because a later revision replaced\nits definition while its program was being written.","oneOf":[{"$ref":"#/components/schemas/Runs"},{"$ref":"#/components/schemas/NotWritten"},{"$ref":"#/components/schemas/BySkills"},{"$ref":"#/components/schemas/Writing"},{"$ref":"#/components/schemas/Replaced"}],"discriminator":{"propertyName":"type","mapping":{"runs":"#/components/schemas/Runs","not_written":"#/components/schemas/NotWritten","by_skills":"#/components/schemas/BySkills","writing":"#/components/schemas/Writing","replaced":"#/components/schemas/Replaced"}}},"Pull":{"description":"One pull: the questions served under one key. `token` names the pull\nto /learner/pull, /learner/check and /learner/check_photo: give it to\nthe page your learner loads, with your publishable key, and that page\nreaches this pull and no other. It is null only on pulls saved before\npulls had tokens.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"revision":{"type":"integer"},"requested":{"type":"integer"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"created_millis":{"type":"integer"},"token":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["stream","key","revision","requested","questions","created_millis"]},"PullRef":{"description":"One pull, by its stream's slug and its key.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"}},"required":["stream","key"]},"PullRequest":{"description":"`key` names this pull's intent (for 6problems, the day: \"2026-09-29\")\nin 1 to 100 characters, and `count` asks for 1 to 50 questions. The\nsame key returns the same questions and changes nothing; the same key\nwith a different count is refused.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"count":{"type":"integer"}},"required":["stream","key","count"]},"PullSummary":{"description":"One pull in a stream's history: its key, the revision it came from, the\nnumber of questions asked for and the number served (fewer when the\nstream's skills have fewer distinct questions, or its program made or\nits model wrote fewer that fit).","type":"object","properties":{"key":{"type":"string"},"revision":{"type":"integer"},"requested":{"type":"integer"},"served":{"type":"integer"},"created_millis":{"type":"integer"}},"required":["key","revision","requested","served","created_millis"]},"Pulled":{"description":"`replayed` says the key's pull already existed when this request ran:\nthe same questions, and nothing changed. A client that resends after a\nlost answer (a generated client does, by itself) can see `replayed` on\nthe first answer it receives.","type":"object","properties":{"pull":{"$ref":"#/components/schemas/Pull"},"replayed":{"type":"boolean"}},"required":["pull","replayed"]},"Question":{"description":"One question of a pull. `id` is the revision and where in that\nrevision's sequence it was drawn, so no two questions of a pull share\none, nor two questions of a stream drawn since questions had ids. A\npull may serve again, with its id, a question an earlier pull of the\nsame revision served, when a model call paid for it (a model wrote it,\nor wrote its words); /pulls/why names the pull that first served it.\n\nA `number` question's answer is a number. `problem` is the question as\na typed tree and `latex` its rendering; `prompt`, `answer`,\n`answer_text` and `form` are computed from the same tree. A question\nwith a null `problem` is stated in words. On a stream defined by\nconversation it was made by the stream's program, code the service had\nwritten for the definition, which draws the question's numbers and\ncomputes its answer, and may have had a model write a few words to\ndress it, such as a first name, from a fixed list of kinds none of\nwhich is a number; the program's answers were checked only on a\nsample, solved blind by a second call when it was written. On a stream\nwith no program it was stated by a model, and served only because a\nsecond call to the model, solving it without seeing that answer, gave\nthe same one. `problem` and `latex` are both null only on questions\nserved before problems had structure.\n\nA `text` question's answer is text, such as a command, which the\nstream's program wrote: `answer` is that text. A learner's answer is\nright when its words are the answer's, however they are spaced, unless\nthe question has its own check, which may also accept other answers,\nasking a judge model about one when its code cannot decide.","oneOf":[{"$ref":"#/components/schemas/Question_Number"},{"$ref":"#/components/schemas/Question_Text"}],"discriminator":{"propertyName":"type","mapping":{"number":"#/components/schemas/Question_Number","text":"#/components/schemas/Question_Text"}}},"QuestionRef":{"description":"One question of a pull, by its stream's slug, the pull's key and the\nquestion's id.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"question":{"type":"string"}},"required":["stream","key","question"]},"Question_Number":{"type":"object","properties":{"type":{"type":"string","const":"number"},"id":{"type":"string"},"prompt":{"type":"string"},"problem":{"anyOf":[{"$ref":"#/components/schemas/Problem"},{"type":"null"}]},"latex":{"anyOf":[{"type":"string"},{"type":"null"}]},"answer":{"$ref":"#/components/schemas/Rational"},"answer_text":{"type":"string"},"form":{"$ref":"#/components/schemas/AnswerForm"},"similarity":{"type":"string"}},"required":["type","id","prompt","answer","answer_text","form","similarity"]},"Question_Text":{"type":"object","properties":{"type":{"type":"string","const":"text"},"id":{"type":"string"},"prompt":{"type":"string"},"answer":{"type":"string"},"similarity":{"type":"string"}},"required":["type","id","prompt","answer","similarity"]},"Rational":{"description":"An exact answer in lowest terms with a positive denominator.","type":"object","properties":{"numerator":{"type":"integer"},"denominator":{"type":"integer"}},"required":["numerator","denominator"]},"RefusalError":{"description":"Why a request was refused: the error's `code` names the case, and the\nerror carries its fields beside `message` and `status`.\n\n- `no_stream` (404): no stream is named `stream`.\n- `no_pull` (404): stream `stream` has no pull with key `key`.\n- `no_token` (404): no pull of the key's account has the token a\n  learner route was sent.\n- `slug_taken` (422): a stream with a different title or skills is\n  already named `slug`.\n- `key_reused` (422): key `key` already pulled `requested` questions;\n  send that count to get the same pull, or a new key for a new one.\n- `answer_count` (422): the pull has `questions` questions and `answers`\n  answers were sent.\n- `no_question` (422): a `by_question` answer, or a request for a\n  question's Why, names `question`, which is not a question of the pull.\n- `definition_unconfirmed` (422): a conversation wrote a new definition\n  of stream `stream`, and the service could not confirm whether it was\n  saved. Sending the conversation again asks the model again, so read\n  the stream first.\n- `no_ref` (404): no stream was shared under the ref sent.\n- `no_program` (422): stream `stream` runs no program (it is defined by\n  skills, its definition was saved without one, or its program is still\n  being written), so it cannot be shared.\n- `no_writing` (404): revision `revision` of stream `stream` was not\n  defined by a conversation, so no program was written for it.","oneOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_stream"},"stream":{"type":"string"}},"required":["code","stream"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_pull"},"stream":{"type":"string"},"key":{"type":"string"}},"required":["code","stream","key"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_token"}},"required":["code"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"slug_taken"},"slug":{"type":"string"}},"required":["code","slug"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"key_reused"},"key":{"type":"string"},"requested":{"type":"integer"}},"required":["code","key","requested"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"answer_count"},"questions":{"type":"integer"},"answers":{"type":"integer"}},"required":["code","questions","answers"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_question"},"question":{"type":"string"}},"required":["code","question"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"definition_unconfirmed"},"stream":{"type":"string"}},"required":["code","stream"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_ref"}},"required":["code"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_program"},"stream":{"type":"string"}},"required":["code","stream"]}]},{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","const":"no_writing"},"stream":{"type":"string"},"revision":{"type":"integer"}},"required":["code","stream","revision"]}]}]},"Replaced":{"type":"object","properties":{"type":{"type":"string","const":"replaced"}},"required":["type"]},"Replay":{"description":"Whether replaying a question's draws and words through the code that\nmade it made the question again: `same`, the same question exactly\n(its prompt, LaTeX, answer, form and similarity key); `changed`, a\ndifferent question or none; `unreplayed`, no answer from that code,\nbecause it failed or took too long, or the service can no longer run\nit; or `unrecorded`, nothing to replay, because the question keeps no\ndraws (a model wrote it at the pull, or it was stored before questions\nkept their draws). A stream's program is replayed as it was saved;\na stream's skills are replayed through the skills code the service\nruns now, so a question made before that code changed can be\n`changed`. Either way the question made again must fit the rules\nquestions are held to now, so one saved before those rules changed,\nsuch as one whose text holds a tab, is `changed`.","type":"string","enum":["same","changed","unreplayed","unrecorded"]},"Returned":{"type":"object","properties":{"type":{"type":"string","const":"returned"},"problems":{"type":"array","items":{"type":"string"}}},"required":["type","problems"]},"Reviewed":{"type":"object","properties":{"type":{"type":"string","const":"reviewed"},"gaps":{"type":"array","items":{"type":"string"}}},"required":["type","gaps"]},"Revise":{"description":"A stream's new skills, naming the stream by its slug.","type":"object","properties":{"stream":{"type":"string"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/Skill"}}},"required":["stream","skills"]},"Revision":{"description":"One version of a stream's definition: its skills, or (with no skills)\nthe prompt a conversation at /chat/completions wrote, and what it runs\n(`program`), null on a revision saved before revisions recorded it.\nWritten once, and once more when the program of a revision whose\nprogram was being written is done: `program` then says what it runs.","type":"object","properties":{"number":{"type":"integer"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/Skill"}},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"seed":{"type":"integer"},"created_millis":{"type":"integer"},"program":{"anyOf":[{"$ref":"#/components/schemas/ProgramRecord"},{"type":"null"}]}},"required":["number","skills","seed","created_millis"]},"RevisionRef":{"description":"A revision of one of your streams, named by its stream's slug and its\nnumber.","type":"object","properties":{"stream":{"type":"string"},"revision":{"type":"integer"}},"required":["stream","revision"]},"Role":{"description":"Who said a message: `system`, `user` or `assistant`.","type":"string","enum":["system","user","assistant"]},"Runs":{"type":"object","properties":{"type":{"type":"string","const":"runs"},"program_hash":{"type":"string"}},"required":["type","program_hash"]},"SentBack":{"description":"A draft of a definition's program that the service sent back to its\nwriter: what was wrong with it, its first three problems. A problem the\ncompiler found quotes the lines of that draft it is about. A problem longer\nthan 2000 characters keeps its first 1500 and its last 400, with a line\nbetween them saying how many were cut.","type":"object","properties":{"problems":{"type":"array","items":{"type":"string"}}},"required":["problems"]},"ShapeReview":{"description":"What a model found when it read a definition beside the shape of the run\nof the program written for it: what the definition asks for that the\nrun lacks or gives out of proportion (none when nothing), or why it\nfound nothing (its call failed, or its answer could not be read). The\nreview is recorded and never decides how a draft ends: it is measured\nfirst.","oneOf":[{"$ref":"#/components/schemas/Reviewed"},{"$ref":"#/components/schemas/Unreviewed"}],"discriminator":{"propertyName":"type","mapping":{"reviewed":"#/components/schemas/Reviewed","unreviewed":"#/components/schemas/Unreviewed"}}},"SharedRef":{"description":"A stream shared: `ref` is what /streams/from_ref takes to copy it,\n`stream` the stream and the revision it copies, and `program_hash` the\nprogram that revision runs, which /streams/get shows for a copy too.","type":"object","properties":{"ref":{"type":"string"},"stream":{"$ref":"#/components/schemas/StreamSummary"},"program_hash":{"type":"string"}},"required":["ref","stream","program_hash"]},"Simplify":{"type":"object","properties":{"type":{"type":"string","const":"simplify"},"numeral":{"$ref":"#/components/schemas/Numeral"}},"required":["type","numeral"]},"SimplifyFraction":{"type":"object","properties":{"type":{"type":"string","const":"simplify_fraction"},"max_denominator":{"type":"integer"}},"required":["type","max_denominator"]},"Skill":{"description":"A skill from the 6problems topic list. Every parameter is a bound the\ngenerator draws within; a stream whose bounds are unusable is rejected\nas invalid (400).\n\n- `mixed_to_improper`: \"Write 3 1/5 as an improper fraction.\" The whole\n  part is 1 to max_whole, the denominator comes from the list, and the\n  numerator is coprime to it.\n- `add_whole`: \"347 + 285 =\" with `digits`-digit addends; `regroup` says\n  whether some column carries.\n- `subtract_whole`: \"512 - 287 =\" with `digits`-digit operands, the first\n  larger; `regroup` says whether some column borrows (so it needs at\n  least 2 digits).\n- `simplify_fraction`: \"Simplify 6/8.\" The unsimplified denominator is at\n  most max_denominator.\n- `to_decimal`: \"Write 9 1/10 as a decimal.\" The whole part is 0 to\n  max_whole, and every denominator must give a decimal that ends.","oneOf":[{"$ref":"#/components/schemas/MixedToImproper"},{"$ref":"#/components/schemas/AddWhole"},{"$ref":"#/components/schemas/SubtractWhole"},{"$ref":"#/components/schemas/SimplifyFraction"},{"$ref":"#/components/schemas/ToDecimal"}],"discriminator":{"propertyName":"type","mapping":{"mixed_to_improper":"#/components/schemas/MixedToImproper","add_whole":"#/components/schemas/AddWhole","subtract_whole":"#/components/schemas/SubtractWhole","simplify_fraction":"#/components/schemas/SimplifyFraction","to_decimal":"#/components/schemas/ToDecimal"}}},"Step":{"description":"One thing a run did: drew `value` from `low` to `high`, or was given\n`words` for an ask of `kind`.","oneOf":[{"$ref":"#/components/schemas/Drew"},{"$ref":"#/components/schemas/Wrote"}],"discriminator":{"propertyName":"type","mapping":{"drew":"#/components/schemas/Drew","wrote":"#/components/schemas/Wrote"}}},"StepFailed":{"description":"The step that stopped writing a definition's program, and why.","type":"object","properties":{"step":{"$ref":"#/components/schemas/WritingStep"},"reason":{"type":"string"}},"required":["step","reason"]},"Stopped":{"type":"object","properties":{"type":{"type":"string","const":"stopped"},"failed":{"$ref":"#/components/schemas/StepFailed"}},"required":["type","failed"]},"StreamSummary":{"description":"A stream: the slug that names it among your streams, its title and its\ncurrent revision.","type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"revision":{"type":"integer"}},"required":["slug","title","revision"]},"StreamView":{"description":"One stream: its summary, its definition now (its skills, or the prompt\nits problems are written to), and every revision so far, oldest first.\n`program_hash` names the program the current revision runs, without\nshowing it: a stream copied from a ref shows the program_hash of the\nstream that was shared, since it runs the same program. It is null when\nthe stream is defined by skills or its definition was saved without a\nprogram.","type":"object","properties":{"stream":{"$ref":"#/components/schemas/StreamSummary"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/Skill"}},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revisions":{"type":"array","items":{"$ref":"#/components/schemas/Revision"}},"program_hash":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["stream","skills","revisions"]},"Streams":{"description":"Your streams.","type":"object","properties":{"streams":{"type":"array","items":{"$ref":"#/components/schemas/StreamSummary"}}},"required":["streams"]},"SubtractWhole":{"type":"object","properties":{"type":{"type":"string","const":"subtract_whole"},"digits":{"type":"integer"},"regroup":{"type":"boolean"}},"required":["type","digits","regroup"]},"ToDecimal":{"type":"object","properties":{"type":{"type":"string","const":"to_decimal"},"max_whole":{"type":"integer"},"denominators":{"type":"array","items":{"type":"integer"}}},"required":["type","max_whole","denominators"]},"Unreviewed":{"type":"object","properties":{"type":{"type":"string","const":"unreviewed"},"reason":{"type":"string"}},"required":["type","reason"]},"Why":{"description":"Why one question of a pull is what it is: each step the code that made\nit took, oldest first (a number it drew, with the range it drew it\nfrom, or the words a model wrote for it, with the kind of words it\nasked for), and whether replaying them made the question again.\n`steps` is empty when there was nothing to replay, the replay failed,\ntook too long or could not run, or the draws and words were not a\nrecord the code makes. `first_pull` is the key of the earlier pull that\nfirst served the question, when this pull served it again, and null\nwhen the question was made for this pull.","type":"object","properties":{"stream":{"type":"string"},"key":{"type":"string"},"question":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"}},"replay":{"$ref":"#/components/schemas/Replay"},"first_pull":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["stream","key","question","steps","replay"]},"Words":{"description":"The words a program may ask a model for: a fixed list of kinds, each a\nway to dress a question, and none of them a number, so a model writing\nwords never sees a draw.","type":"string","enum":["first_name","colour","animals","foods","things","place"]},"Writing":{"type":"object","properties":{"type":{"type":"string","const":"writing"}},"required":["type"]},"WritingStep":{"description":"A step of writing a definition's program that can give no answer: the\ncall to the writer, compiling what it wrote, the call for the words the\nsample's questions ask for, or the blind solve of the sample.","type":"string","enum":["writer_call","compiling","words_call","solver_call"]},"WritingView":{"description":"The drafts of the program of stream `stream`'s revision `revision`, oldest\nfirst, and whether writing it has ended (`ended`); while it has not, a\nround is under way. An accepted draft says what the review of its run's\ntopics against the definition found (`review`, null on a draft accepted\nbefore drafts were reviewed); the review never decides whether a draft\nis accepted.","type":"object","properties":{"stream":{"type":"string"},"revision":{"type":"integer"},"drafts":{"type":"array","items":{"$ref":"#/components/schemas/Draft"}},"ended":{"type":"boolean"}},"required":["stream","revision","drafts","ended"]},"Written":{"description":"The form an answer was written in.","type":"string","enum":["as_whole","as_fraction","as_mixed","as_decimal"]},"Wrote":{"type":"object","properties":{"type":{"type":"string","const":"wrote"},"kind":{"$ref":"#/components/schemas/Words"},"words":{"type":"string"}},"required":["type","kind","words"]}},"responses":{"Error":{"description":"The request was refused or failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"An API key. The request acts as the account that owns the key, a user or an organization, so every key of one account reaches the same data. A publishable key (made with /publishable_keys/create) may call only the operations that say so; every other operation that takes a key refuses it with 403."}}},"x-mcp":{"url":"https://api.problemsapi.com/mcp","transport":"streamable-http","tools":"one per operation, named by its operationId"}}