{"components":{"headers":{"ContentLanguage":{"description":"The language the answer's text is written in (`en`, `es`, `ja`, `zh-Hans`), chosen from the request's `Accept-Language`. A language whose translation of a sentence is not there yet gets the English one. Sent with `Vary: Accept-Language`.","schema":{"enum":["en","es","ja","zh-Hans"],"examples":["es"],"type":"string"}},"MinCli":{"description":"The oldest CLI version (semver) the server accepts. Sent on every response while the server enforces a minimum.","schema":{"examples":["0.1.0"],"type":"string"}},"RetryAfter":{"description":"Seconds to wait. Sent with `rate_limited` (until its window ends, a second for the plan's requests), with `concurrency_limited` (the account's queries at once are all running: one second) and with `overloaded` (the engine or a dependency is busy: nothing was charged).","schema":{"minimum":1,"type":"integer"}}},"parameters":{"AcceptLanguage":{"description":"The language the text of the answer is written in: the best of Hilberon's languages (`en`, `es`, `ja`, `zh-Hans`) the header names, by `q`; `es-MX` is Spanish, and every `zh` tag (`zh-CN`, `zh-TW`, `zh-HK`, `zh-Hant`…) is `zh-Hans`. English when it is absent or names none. The answer says which it used in `Content-Language`.","in":"header","name":"Accept-Language","required":false,"schema":{"examples":["es-MX,es;q=0.9,en;q=0.5"],"type":"string"}},"HilberonClient":{"description":"Identifies the CLI, as `hilberon-cli/<semver>`. A CLI older than the server's minimum is refused with `426 upgrade_required`.","in":"header","name":"x-hilberon-client","required":false,"schema":{"examples":["hilberon-cli/0.1.0"],"pattern":"^hilberon-cli/.+$","type":"string"}}},"schemas":{"AccountEfforts":{"description":"What the account set for each surface. A setting is both what runs when a request names\nnothing and the most a request may name; unset, the surface's default runs and a request may\nname up to the plan's ceiling. `null`, not left out, when unset: the export says so of every\nvalue the service does not hold.","properties":{"agents":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"default":null},"api":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"default":null},"cli":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"default":null},"web":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"default":null}},"type":"object"},"AccountEffortsChange":{"additionalProperties":false,"description":"The surfaces of [`AccountEfforts`] that change: a key left out changes nothing (`None`), `null`\nclears it (`Some(None)`) and a choice sets it.","properties":{"agents":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}]},"api":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}]},"cli":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}]},"web":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}]}},"type":"object"},"AccountExport":{"description":"`GET /v1/account/export`: everything the service holds about the account, in the field names\nof the service's own documents. Credit amounts are in credits, as everywhere on the wire. A\nvalue the service does not hold is `null`, not left out.","properties":{"account":{"$ref":"#/components/schemas/ExportAccount"},"email_changes":{"default":[],"description":"When the account's address changed, in the last 30 days, oldest first. Empty for a payload\nthat lacks it.","items":{"$ref":"#/components/schemas/ExportEmailChange"},"type":"array"},"exported_at":{"type":"string"},"grants":{"items":{"$ref":"#/components/schemas/ExportGrant"},"type":"array"},"identity":{"anyOf":[{"$ref":"#/components/schemas/ExportIdentity"},{"type":"null"}],"description":"What the identity provider holds; `null` when the identity no longer exists."},"keys":{"items":{"$ref":"#/components/schemas/ExportKey"},"type":"array"},"ledger":{"items":{"$ref":"#/components/schemas/ExportLedgerEntry"},"type":"array"},"purchases":{"items":{"$ref":"#/components/schemas/ExportPurchase"},"type":"array"},"refund_requests":{"default":[],"description":"The refunds the account asked for, oldest first. Empty for a payload that lacks it.","items":{"$ref":"#/components/schemas/ExportRefundRequest"},"type":"array"},"sessions":{"items":{"$ref":"#/components/schemas/ExportSession"},"type":"array"},"settings":{"$ref":"#/components/schemas/AccountSettings","default":{"efforts":{"agents":null,"api":null,"cli":null,"web":null},"improve_with_queries":true,"locale":"en"},"description":"What the account chose about the use of its queries to improve Hilberon. The samples\nthemselves are kept apart from the account and are not part of the export."},"usage":{"items":{"$ref":"#/components/schemas/ExportUsageTotal"},"type":"array"}},"required":["exported_at","account","sessions","grants","ledger","usage","keys","purchases"],"type":"object"},"AccountSettings":{"description":"What the person chose about the use of their queries to improve Hilberon (`GET` and `PATCH`\n`/v1/account/settings`). A query can still refuse for itself with `improve: false`; nothing\nin a query can turn sampling on where the account did not allow it. A query made with an API\nkey is never kept as a sample, so there is no setting for it.","properties":{"efforts":{"$ref":"#/components/schemas/AccountEfforts","default":{"agents":null,"api":null,"cli":null,"web":null},"description":"The effort of each surface. A payload that lacks it sets none."},"improve_with_queries":{"description":"Keep the queries made on the web and in the CLI as samples to improve Hilberon. On by\ndefault.","type":"boolean"},"locale":{"default":"en","description":"The language of what Hilberon sends the account (its emails): set at sign-up from the\nsite's language and when the person chooses one. English by default, and for a payload that\nlacks it.","enum":["en","es","ja","zh-Hans"],"type":"string"}},"required":["improve_with_queries"],"type":"object"},"AccountSettingsChange":{"additionalProperties":false,"description":"`PATCH /v1/account/settings`: only the fields that are present change.","properties":{"efforts":{"$ref":"#/components/schemas/AccountEffortsChange","description":"The surfaces whose effort changes."},"improve_with_queries":{"type":["boolean","null"]},"locale":{"enum":["en","es","ja","zh-Hans",null],"type":["string","null"]}},"type":"object"},"Align":{"enum":["none","left","center","right"],"type":"string"},"Allowed":{"description":"What the account may do now, as the server decides it (`Me::allowed`). A client reads these and never the plan's\nname: what each plan allows is the offering's, and changes without a client.","properties":{"api_keys":{"description":"The account can make API keys now: it holds prepaid credits.","type":"boolean"},"ask":{"description":"The credential of the request may ask (`POST /v1/ask`): the same as [`Me::ask`]. An API key never does.","type":"boolean"},"cli_queries":{"description":"A CLI sign-in (`hilberon login`) runs queries and step checks, not only reads the account.","type":"boolean"},"mcp":{"description":"An MCP client signs in with this account and runs queries (`/mcp`, `hbc_` tokens of an OAuth client).","type":"boolean"}},"required":["ask","mcp","cli_queries","api_keys"],"type":"object"},"Alternative":{"description":"Another way to solve the problem of a [`Steps`]: a method and the derivation it gives. It is\nlisted only when its derivation is verified, so it has no `verified` of its own.","properties":{"answer":{"anyOf":[{"$ref":"#/components/schemas/Rendered"},{"type":"null"}],"description":"This method's answer. It can be written differently from the main one: two\nantiderivatives can differ by a constant."},"assumptions":{"description":"Conditions this derivation relies on.","items":{"$ref":"#/components/schemas/Rendered"},"type":"array"},"check":{"anyOf":[{"$ref":"#/components/schemas/Check"},{"type":"null"}]},"items":{"description":"The steps of this method, numbered and linked by `parent` like the main derivation's.","items":{"$ref":"#/components/schemas/Step"},"type":"array"},"method":{"description":"The method, as a rule id of the catalog (`integrate.substitution`): the first choice where\nthis derivation differs from the main one. Its catalog name titles it.","type":"string"}},"required":["method","items"],"type":"object"},"ApiError":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"details":true,"hint":{"description":"What to do next, written for a person or an agent.","type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"ApiKey":{"properties":{"created_at":{"type":"string"},"credit_limit":{"description":"Credits the key may spend in total; at the limit queries are refused with\n`key_limit_reached`. Absent: no limit (CLI tokens have none).","format":"double","type":["number","null"]},"credits_spent":{"default":0.0,"description":"Credits queries made with this key have been charged so far.","format":"double","type":"number"},"expires_at":{"description":"From then on the key is refused with `key_expired`. Absent: it never expires.","type":["string","null"]},"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/KeyKind"},"last_used_at":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"description":"The visible start of the secret, e.g. `hbk_3fA9`.","type":"string"}},"required":["id","kind","name","prefix","created_at"],"type":"object"},"AskEvent":{"description":"One event of an ask's stream: `event: <type>` and `data: <this, as JSON>`.","oneOf":[{"description":"What the service is doing now.","properties":{"phase":{"$ref":"#/components/schemas/AskPhase"},"type":{"const":"status","type":"string"}},"required":["type","phase"],"type":"object"},{"description":"The engine is asked `query` (Hilberon syntax); `id` names it in the events that follow.","properties":{"id":{"format":"uint32","minimum":0,"type":"integer"},"query":{"type":"string"},"type":{"const":"query","type":"string"}},"required":["type","id","query"],"type":"object"},{"description":"The answer to query `id`, as `POST /v1/query` gives it.","properties":{"id":{"format":"uint32","minimum":0,"type":"integer"},"response":{"$ref":"#/components/schemas/QueryResponse"},"type":{"const":"answer","type":"string"}},"required":["type","id","response"],"type":"object"},{"description":"Query `id` did not run (the model may send a corrected one).","properties":{"error":{"$ref":"#/components/schemas/ApiError"},"id":{"format":"uint32","minimum":0,"type":"integer"},"type":{"const":"query_failed","type":"string"}},"required":["type","id","error"],"type":"object"},{"description":"The next piece of the summary, as it is written.","properties":{"delta":{"type":"string"},"type":{"const":"text","type":"string"}},"required":["type","delta"],"type":"object"},{"description":"The ask ended: the id of the main answer, when there is one, and what it cost.","properties":{"primary":{"format":"uint32","minimum":0,"type":["integer","null"]},"type":{"const":"done","type":"string"},"usage":{"$ref":"#/components/schemas/AskUsage"}},"required":["type","usage"],"type":"object"},{"description":"The ask stopped; what was spent is charged.","properties":{"error":{"$ref":"#/components/schemas/ApiError"},"type":{"const":"error","type":"string"},"usage":{"anyOf":[{"$ref":"#/components/schemas/AskUsage"},{"type":"null"}]}},"required":["type","error"],"type":"object"},{"description":"An event this client does not know yet.","properties":{"type":{"const":"unknown","type":"string"}},"required":["type"],"type":"object"}]},"AskImage":{"additionalProperties":false,"description":"A picture of the problem, at most [`MAX_ASK_IMAGE_BYTES`] once decoded.","properties":{"data":{"description":"The image's bytes in base64, without a `data:` prefix.","type":"string"},"media_type":{"$ref":"#/components/schemas/AskImageType"}},"required":["media_type","data"],"type":"object"},"AskImageType":{"description":"The format of an [`AskImage`], as its media type.","enum":["image/jpeg","image/png","image/webp"],"type":"string"},"AskPhase":{"description":"What the service is doing while it answers an ask.","oneOf":[{"enum":["unknown"],"type":"string"},{"const":"reading","description":"The model reads the text and the image.","type":"string"},{"const":"solving","description":"The engine is asked.","type":"string"},{"const":"writing","description":"The model writes the summary.","type":"string"}]},"AskRequest":{"additionalProperties":false,"description":"`POST /v1/ask` body (web sessions on Plus and Pro; Lite has no ask): a problem in words, a picture\nof it, or both.","properties":{"effort":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"description":"What the whole question may use, the model and its queries in one pool, as\n[`crate::QueryRequest::effort`]; the same default and ceilings. Below what the first model\ncall needs the ask is refused, and `details.min_effort` names the level that is enough."},"image":{"anyOf":[{"$ref":"#/components/schemas/AskImage"},{"type":"null"}]},"improve":{"description":"`false` keeps the ask's engine queries out of the samples. It can only refuse, as\n[`crate::QueryRequest::improve`].","type":["boolean","null"]},"text":{"description":"What the person wrote; may be empty when there is an image. At most\n[`MAX_ASK_TEXT_CHARS`] characters.","type":"string"}},"required":["text"],"type":"object"},"AskUsage":{"description":"What an ask cost, in credits: the model's part and the engine's queries.","properties":{"balance":{"description":"Credits left for this channel after the charge.","format":"double","type":["number","null"]},"credits":{"description":"`model_credits` and `engine_credits` together.","format":"double","type":"number"},"engine_credits":{"format":"double","type":"number"},"limit":{"description":"How many credits that limit allowed; absent when nothing stopped the ask.","format":"double","type":["number","null"]},"limited_by":{"anyOf":[{"$ref":"#/components/schemas/LimitSource"},{"type":"null"}],"description":"What stopped the ask; absent when nothing did."},"model_credits":{"format":"double","type":"number"},"notice":{"anyOf":[{"$ref":"#/components/schemas/UsageNotice"},{"type":"null"}],"description":"The notice of a charge of this ask, its model's or one of its queries' (whose `Answer` events never carry\none): the last when several crossed a mark."}},"required":["credits","model_credits","engine_credits"],"type":"object"},"Balances":{"description":"Spendable credits by source. `interactive` and `api` are what each channel\ncan spend right now.","properties":{"api":{"format":"double","type":"number"},"free":{"format":"double","type":"number"},"free_claimed_elsewhere":{"default":false,"description":"This month's free credits went to another account at the same mailbox (one account a mailbox a month: an\naccount deleted and made again, or one at an alias of the address), so `free` stays 0 until `next_reset`.","type":"boolean"},"granted":{"description":"What the plan's month and the month's free credits granted, spent or not: `interactive` is what is left of them\n(with any other credits the web and the CLI spend). After a plan changed within the month it is less than a\nmonth of the new plan. `None` for a payload that lacks it.","format":"double","type":["number","null"]},"interactive":{"format":"double","type":"number"},"next_reset":{"description":"When the plan's credits come back: the end of the subscription's month where there is one, else of the month's\nfree credits.","type":["string","null"]},"packs":{"description":"The prepaid packs with credits left, the first to end first: `prepaid` is theirs, and each ends on its own date.\nAbsent when there are none.","items":{"$ref":"#/components/schemas/PrepaidPack"},"type":"array"},"prepaid":{"format":"double","type":"number"},"subscription":{"format":"double","type":"number"}},"required":["subscription","free","prepaid","interactive","api"],"type":"object"},"BillingInterval":{"enum":["month","year","unknown"],"type":"string"},"BindKind":{"description":"What a bind of a step holds, so a client knows how to show it.","oneOf":[{"enum":["expression","symbol","equation","matrix","number"],"type":"string"},{"const":"form","description":"A form named by the rule: an indeterminate form such as `0/0`, a trigonometric identity…","type":"string"},{"const":"direction","description":"The side of a one-sided limit, as a word: `right` or `left`. It is not math, so\nthe explanation sets it in running text without delimiters (\"on the right side\").","type":"string"},{"const":"list","description":"A list of values. A list that is a math span of its own in a sentence is written as an\nenumeration, each item in a span (`2` and `3`): see [`crate::explain`].","type":"string"},{"const":"unknown","description":"A kind this client does not know yet.","type":"string"}]},"Block":{"oneOf":[{"properties":{"content":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"type":{"const":"paragraph","type":"string"}},"required":["type","content"],"type":"object"},{"description":"Levels 2 to 4 (the title is the page's only level 1). `id` is unique in the post: its anchor.","properties":{"content":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"id":{"type":"string"},"level":{"format":"uint8","maximum":255,"minimum":0,"type":"integer"},"type":{"const":"heading","type":"string"}},"required":["type","level","id","content"],"type":"object"},{"description":"Each item is its own blocks. `start` is the first number of an ordered list.","properties":{"items":{"items":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"type":"array"},"ordered":{"type":"boolean"},"start":{"format":"uint32","minimum":0,"type":"integer"},"type":{"const":"list","type":"string"}},"required":["type","ordered","start","items"],"type":"object"},{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"type":{"const":"quote","type":"string"}},"required":["type","blocks"],"type":"object"},{"description":"A fenced block of code, as written; `language` is its info string's first word.","properties":{"code":{"type":"string"},"language":{"type":["string","null"]},"type":{"const":"code","type":"string"}},"required":["type","code"],"type":"object"},{"description":"Mathematics on its own line (`$$…$$`).","properties":{"tex":{"type":"string"},"type":{"const":"math","type":"string"}},"required":["type","tex"],"type":"object"},{"description":"A ```` ```hilberon ```` block: the query as written and as TeX (in the language of the post's file). `try_it`\n(the fence's `try`) asks for a link that opens the query in the solver (`/?q=<the source>`); `plain` (the\nfence's `plain`) shows the source as code instead of the TeX.","properties":{"plain":{"type":"boolean"},"source":{"type":"string"},"tex":{"type":"string"},"try_it":{"type":"boolean"},"type":{"const":"hilberon","type":"string"}},"required":["type","source","tex","try_it","plain"],"type":"object"},{"description":"`head` is the first row; every row has as many cells as `align` has columns.","properties":{"align":{"items":{"$ref":"#/components/schemas/Align"},"type":"array"},"head":{"items":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"type":"array"},"rows":{"items":{"items":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"type":"array"},"type":"array"},"type":{"const":"table","type":"string"}},"required":["type","align","head","rows"],"type":"object"},{"properties":{"type":{"const":"rule","type":"string"}},"required":["type"],"type":"object"},{"description":"`:::figure`: one image and its caption.","properties":{"caption":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"image":{"$ref":"#/components/schemas/Image"},"type":{"const":"figure","type":"string"},"width":{"$ref":"#/components/schemas/Width"}},"required":["type","width","image","caption"],"type":"object"},{"description":"`:::gallery`: two to twelve images and one caption.","properties":{"caption":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"images":{"items":{"$ref":"#/components/schemas/Image"},"type":"array"},"type":{"const":"gallery","type":"string"}},"required":["type","images","caption"],"type":"object"},{"description":"`:::note`, `:::tip`, `:::warning`: an aside with its kind's label, or `title` when it has one.","properties":{"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"kind":{"$ref":"#/components/schemas/Callout"},"title":{"type":["string","null"]},"type":{"const":"callout","type":"string"}},"required":["type","kind","blocks"],"type":"object"}]},"Body":{"description":"A post's body: its blocks, then its footnotes.","properties":{"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"footnotes":{"description":"In the order they are first referred to; `Inline::Footnote` points at one by its `number`.","items":{"$ref":"#/components/schemas/Footnote"},"type":"array"},"schema":{"description":"[`SCHEMA`].","format":"uint32","minimum":0,"type":"integer"}},"required":["schema","blocks","footnotes"],"type":"object"},"CallerLimits":{"description":"What a credential may do now: its plan's or tier's limits with the account's setting for the\nsurface it is on, as the API decides them (`Me::caller`).","properties":{"effort":{"$ref":"#/components/schemas/Effort","description":"The highest level a request may name."},"max_credits":{"description":"The most a question may spend, in whole credits.","format":"uint32","minimum":0,"type":"integer"},"surface":{"$ref":"#/components/schemas/Surface"},"today":{"anyOf":[{"$ref":"#/components/schemas/CallerToday"},{"type":"null"}],"description":"What it spent today, for a credential with a day to count."}},"required":["surface","effort","max_credits"],"type":"object"},"CallerToday":{"description":"What a credential spent today and what it may, in credits.","properties":{"limit":{"description":"Absent when the day has no limit.","format":"double","type":["number","null"]},"spent":{"format":"double","type":"number"}},"required":["spent"],"type":"object"},"Callout":{"enum":["note","tip","warning"],"type":"string"},"CaptchaPass":{"description":"`POST /v1/captcha` response: the pass itself travels in a cookie.","properties":{"expires_at":{"description":"When the pass stops being accepted (RFC 3339).","type":"string"}},"required":["expires_at"],"type":"object"},"CaptchaRequest":{"additionalProperties":false,"description":"`POST /v1/captcha` body: a token Cap's widget redeemed.","properties":{"token":{"type":"string"}},"required":["token"],"type":"object"},"CardAdd":{"additionalProperties":false,"description":"`POST /v1/billing/payment-methods`: the card the page's form made a Stripe confirmation token of\n(`stripe.createConfirmationToken`), to be saved for the account.","properties":{"confirmation_token_id":{"description":"`ctoken_…`.","type":"string"},"set_default":{"description":"The card becomes the one the subscription renews with.","type":"boolean"}},"required":["confirmation_token_id","set_default"],"type":"object"},"CardAdded":{"description":"What saving a card came to: saved, or waiting for the authentication the bank asks for, which the page makes with\n`stripe.handleNextAction({ clientSecret })` and then confirms (`POST /v1/billing/payment-methods/confirm`).","oneOf":[{"properties":{"status":{"const":"succeeded","type":"string"}},"required":["status"],"type":"object"},{"properties":{"client_secret":{"description":"The Stripe setup intent's client secret.","type":"string"},"setup_intent_id":{"description":"`seti_…`, which the confirmation names.","type":"string"},"status":{"const":"requires_action","type":"string"}},"required":["status","client_secret","setup_intent_id"],"type":"object"}]},"CardConfirm":{"additionalProperties":false,"description":"`POST /v1/billing/payment-methods/confirm`: a card whose bank asked for an authentication the page has made\n(`stripe.handleNextAction`).","properties":{"set_default":{"type":"boolean"},"setup_intent_id":{"description":"`seti_…`, from the `requires_action` answer.","type":"string"}},"required":["setup_intent_id","set_default"],"type":"object"},"CardSetup":{"description":"`POST /v1/billing/payment-methods/setup`: what the page's card form (Stripe's Payment Element in setup mode) is\ncreated with before a card is typed.","properties":{"currency":{"description":"ISO 4217, lowercase: the currency the subscription is billed in, else `usd`.","type":"string"},"stripe_customer_session":{"description":"The client secret of a Stripe customer session that shows the cards saved already; `null` when there is none\nto show (Polar gives one with a checkout only).","type":["string","null"]},"stripe_key":{"description":"Stripe's publishable key of Polar's processor.","type":"string"}},"required":["stripe_key","currency"],"type":"object"},"Channel":{"description":"Which product pays for a request: `interactive` (web session or CLI token)\nspends subscription and free credits only; `api` (API key) spends prepaid\ncredits only.","enum":["interactive","api","unknown"],"type":"string"},"ChannelLimits":{"properties":{"api":{"$ref":"#/components/schemas/Limits","description":"API keys."},"interactive":{"$ref":"#/components/schemas/Limits","description":"Web session and CLI login."}},"required":["interactive","api"],"type":"object"},"Check":{"properties":{"kind":{"$ref":"#/components/schemas/CheckKind"},"points":{"format":"uint32","minimum":0,"type":["integer","null"]}},"required":["kind"],"type":"object"},"CheckKind":{"description":"How strongly an answer was verified, strongest first.","oneOf":[{"enum":["unknown"],"type":"string"},{"const":"exact_residual","description":"Substituting the answer left exactly zero.","type":"string"},{"const":"pullback_identity","description":"A chain-rule identity.","type":"string"},{"const":"numeric","description":"Passed a sampled numeric check (`points` says how many).","type":"string"},{"const":"by_construction","description":"A named theorem was applied without recomputation.","type":"string"}]},"CheckRequest":{"additionalProperties":false,"description":"`POST /v1/check` body.","properties":{"query":{"type":"string"}},"required":["query"],"type":"object"},"CheckResponse":{"description":"`POST /v1/check` response. `ok` is false when any diagnostic is an error.","properties":{"diagnostics":{"items":{"$ref":"#/components/schemas/Diagnostic"},"type":"array"},"ok":{"type":"boolean"}},"required":["ok","diagnostics"],"type":"object"},"CheckoutBody":{"description":"`POST /v1/billing/checkout`: a plan with its billing interval, or an amount of whole dollars of prepaid credits, with\nthe currency the page shows the price in and `agreed`: the person ticked the box that asks for the purchase to start\nat once, with the acknowledgement a withdrawal needs, and accepted the Terms of Service by the line beside it.","oneOf":[{"additionalProperties":false,"properties":{"agreed":{"description":"`true`: the plan's automatic renewal at the price shown was authorized and its start at once asked for, and\nthe Terms of Service were accepted.","type":"boolean"},"currency":{"description":"ISO 4217, lowercase: the currency of the market whose prices the page shows (`usd`, `eur`, `mxn`, `jpy`),\nwhich the subscription is billed in for as long as it lasts.","type":"string"},"interval":{"$ref":"#/components/schemas/BillingInterval"},"kind":{"const":"plan","type":"string"},"plan":{"$ref":"#/components/schemas/PlanId"}},"required":["kind","plan","interval","agreed","currency"],"type":"object"},{"additionalProperties":false,"description":"Prepaid credits for an amount of whole US dollars within the range of `GET /v1/billing/plans`.","properties":{"agreed":{"description":"`true`: the credits were asked for at once, with what that means for a refund, and the Terms of Service\nwere accepted.","type":"boolean"},"currency":{"description":"`usd`: credits are sold in US dollars only.","type":"string"},"dollars":{"format":"uint32","minimum":0,"type":"integer"},"kind":{"const":"credits","type":"string"}},"required":["kind","dollars","agreed","currency"],"type":"object"}]},"ContactRequest":{"additionalProperties":false,"description":"The business contact form.","properties":{"captcha":{"default":null,"description":"The captcha's token, good once: required while this server asks for a captcha.","type":["string","null"]},"company":{"type":"string"},"email":{"description":"The address the answer goes to (`Reply-To`). Nothing is sent to it.","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"message":{"description":"What the business needs.","type":"string"},"phone":{"default":null,"type":["string","null"]},"source":{"default":null,"description":"How they heard of Hilberon.","type":["string","null"]},"website":{"default":null,"description":"The form's hidden field, which a person neither sees nor fills: a message that fills it is answered `204` and\ndropped.","type":["string","null"]}},"required":["first_name","last_name","email","company","message"],"type":"object"},"CreateKeyRequest":{"additionalProperties":false,"description":"`POST /v1/keys`","properties":{"credit_limit":{"description":"Most credits the key may spend in total, from 1 to 10,000,000. Absent: no limit.","format":"double","type":["number","null"]},"expires_in":{"description":"Seconds until the key expires, from 3,600 (one hour) to 31,622,400 (366 days).\nAbsent: the key never expires.","format":"uint32","minimum":0,"type":["integer","null"]},"name":{"type":"string"}},"required":["name"],"type":"object"},"CreatedKey":{"description":"The only response that ever contains the secret.","properties":{"key":{"$ref":"#/components/schemas/ApiKey"},"secret":{"type":"string"}},"required":["key","secret"],"type":"object"},"CreditPricing":{"description":"How prepaid credits are sold: any whole number of dollars in a range, at the rate of the\nhighest tier the amount reaches.","properties":{"max_dollars":{"description":"Largest purchase, in whole US dollars.","format":"uint32","minimum":0,"type":"integer"},"min_dollars":{"description":"Smallest purchase, in whole US dollars.","format":"uint32","minimum":0,"type":"integer"},"suggested_dollars":{"description":"Amounts to offer as quick picks, in whole US dollars.","items":{"format":"uint32","minimum":0,"type":"integer"},"type":"array"},"tiers":{"description":"Lowest tier first; the first one starts at `min_dollars`.","items":{"$ref":"#/components/schemas/CreditTier"},"type":"array"}},"required":["min_dollars","max_dollars","suggested_dollars","tiers"],"type":"object"},"CreditTier":{"description":"One step of the volume discount on prepaid credits.","properties":{"credits_per_dollar":{"description":"Credits a dollar buys in this tier. A purchase gets\n`floor(dollars × credits_per_dollar)` credits.","format":"double","type":"number"},"from_dollars":{"description":"The tier applies to purchases of at least this many whole US dollars.","format":"uint32","minimum":0,"type":"integer"}},"required":["from_dollars","credits_per_dollar"],"type":"object"},"DeleteAccountRequest":{"additionalProperties":false,"description":"The confirmation that deletes the account.","properties":{"confirm":{"description":"What the user typed to confirm; the server decides what must match.","type":"string"}},"required":["confirm"],"type":"object"},"DeviceApproveRequest":{"additionalProperties":false,"description":"`POST /v1/auth/device/approve`","properties":{"approve":{"default":true,"description":"False denies the request.","type":"boolean"},"user_code":{"type":"string"}},"required":["user_code"],"type":"object"},"DeviceAuthorization":{"properties":{"device_code":{"type":"string"},"expires_in":{"description":"Seconds until the codes expire.","format":"uint32","minimum":0,"type":"integer"},"interval":{"description":"Minimum seconds between polls.","format":"uint32","minimum":0,"type":"integer"},"user_code":{"description":"Short code the user confirms in the browser, e.g. `WDJB-MJHT`.","type":"string"},"verification_uri":{"type":"string"},"verification_uri_complete":{"type":"string"}},"required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"type":"object"},"DevicePending":{"description":"A device login request waiting for the signed-in user's decision, so the approval\npage can show who asks before it approves.","properties":{"client_ip":{"description":"The address that started the request.","type":["string","null"]},"client_name":{"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"user_code":{"type":"string"}},"required":["user_code","client_name","created_at","expires_at"],"type":"object"},"DeviceStartRequest":{"additionalProperties":false,"description":"`POST /v1/auth/device`","properties":{"client_name":{"description":"Shown on the approval page and as the CLI token's name (e.g. the hostname).","type":["string","null"]}},"type":"object"},"DeviceToken":{"properties":{"access_token":{"description":"`hbc_…`","type":"string"},"email":{"type":["string","null"]},"token_type":{"type":"string"}},"required":["access_token","token_type"],"type":"object"},"DeviceTokenRequest":{"additionalProperties":false,"description":"`POST /v1/auth/device/token`","properties":{"device_code":{"type":"string"}},"required":["device_code"],"type":"object"},"Diagnostic":{"properties":{"args":{"additionalProperties":{"type":"string"},"description":"The values of the slots of the sentences `id` names, by name.","type":"object"},"code":{"description":"Stable machine code, e.g. `unknown_function`, `arity`, `unclosed_bracket`.","type":"string"},"fixes":{"items":{"$ref":"#/components/schemas/Fix"},"type":"array"},"hint":{"description":"How to fix it, written for a person or an agent.","type":["string","null"]},"id":{"description":"Which sentences `message` and `hint` are, so that a client can write them in another\nlanguage: the id of the pair in `hilberon-assist`'s tables, which is `code` or `code`\nand a variant (`arity.primed`), with `args` for their `{{name}}` slots. `message` and\n`hint` stay English. Absent when the diagnostic has no translation to offer.","type":["string","null"]},"message":{"type":"string"},"severity":{"$ref":"#/components/schemas/Severity"},"span":{"$ref":"#/components/schemas/Span"}},"required":["severity","code","message","span"],"type":"object"},"Effort":{"description":"How far the engine's searches may go, and with [`Effort::credits`] what a question may spend.\nThe credits stay the only runtime limit; effort bounds the shape of the searches (degrees,\ncandidates, dimensions).","oneOf":[{"enum":["quick","standard","deep","exhaustive"],"type":"string"},{"const":"unknown","description":"An effort this client does not know yet. Only responses carry it:\na request that names one is refused.","type":"string"}]},"EffortChoice":{"description":"A level, or a whole number of credits: the limit, at the first level whose credits reach it.","oneOf":[{"enum":["quick","standard","deep","exhaustive"],"type":"string"},{"maximum":4294967295,"minimum":2,"type":"integer"}]},"EffortReport":{"description":"The effort an answer was computed at and whether more effort could change it.","properties":{"cut":{"description":"A bound refused some search, so a larger effort may answer more.","type":"boolean"},"level":{"$ref":"#/components/schemas/Effort"},"lifts_at":{"anyOf":[{"$ref":"#/components/schemas/Effort"},{"type":"null"}],"description":"The cheapest effort at which the answer could change."}},"required":["level","cut"],"type":"object"},"EngineMessage":{"properties":{"head":{"type":"string"},"text":{"type":"string"}},"required":["head","text"],"type":"object"},"ErrorBody":{"description":"`{\"error\": {...}}`","properties":{"error":{"$ref":"#/components/schemas/ApiError"}},"required":["error"],"type":"object"},"ErrorCode":{"description":"Stable machine-readable error codes.","oneOf":[{"enum":["invalid_request","payload_too_large","unauthenticated","forbidden","insufficient_credits","effort_not_allowed","upgrade_required","rate_limited","concurrency_limited","overloaded","not_found","conflict","internal","unknown"],"type":"string"},{"const":"syntax_error","description":"`details.diagnostics` holds [`crate::Diagnostic`]s. Nothing was charged.","type":"string"},{"const":"captcha_required","description":"The request needs a fresh pass from `POST /v1/captcha` (the engine, anonymous or on the\nFree plan, from the web). Nothing was charged.","type":"string"},{"const":"key_expired","description":"The API key or CLI token is past its `expires_at`. Create a new key or run `hilberon login`.","type":"string"},{"const":"key_limit_reached","description":"The API key has spent its `credit_limit`. `details` holds `limit` and `spent`, in\ncredits. Nothing was charged.","type":"string"},{"const":"billing_unavailable","description":"Billing is not set up on this server, or the product is not on sale. Not a\ntemporary overload: retrying does not help until the operator configures it.","type":"string"},{"const":"upstream_unavailable","description":"The API, or the identity service behind it, is down or not reachable. Only the edge\nanswers it (with a `503` or a `502`), never\nthe API itself. Retry later.","type":"string"},{"const":"upstream_timeout","description":"The API, or the identity service behind it, took too long to answer. Only the edge\nanswers it (`504`), never the API itself. The request may still have run and been charged:\ncheck the usage before repeating a costly one.","type":"string"},{"const":"authorization_pending","description":"Device login: the user has not approved the code yet.","type":"string"},{"const":"slow_down","description":"Device login: poll more slowly.","type":"string"},{"const":"access_denied","description":"Device login: the user denied the request.","type":"string"},{"const":"expired_token","description":"Device login: the code expired; start again.","type":"string"}]},"EvidenceKind":{"description":"What the verdict rests on.","oneOf":[{"const":"identical","description":"The two are the same expression.","type":"string"},{"const":"canonical","description":"The two are the same in the engine's canonical form (a sum in another order).","type":"string"},{"const":"exact","description":"The engine proved the difference of the two zero, exactly.","type":"string"},{"const":"value","description":"The two have the same value once the integrals, derivatives and limits in them are carried out.","type":"string"},{"const":"equation","description":"Two equations were compared: the same relation, a term moved across, a constant\nmultiple, or equal solution sets of a polynomial equation.","type":"string"},{"const":"witness","description":"A point where a certified evaluation of the two differs: they are not the same.","type":"string"},{"const":"shape","description":"The two have different kinds (an equation and an expression), or different\nlengths.","type":"string"},{"const":"sampled","description":"The two agree at sample points (`points` says how many). Evidence, never a proof.","type":"string"},{"const":"unknown","description":"Evidence this client does not know yet.","type":"string"}]},"Explanation":{"description":"A step in words: the rule's template with the step's binds filled in.","properties":{"tex":{"description":"The same sentences with math as `$…$` (TeX). Present when TeX was requested.","type":["string","null"]},"text":{"description":"One or two plain English sentences; math is input syntax in backticks.","type":"string"},"why":{"anyOf":[{"$ref":"#/components/schemas/Why"},{"type":"null"}],"description":"Why a reader would choose this method: one sentence, rendered from the rule's `why`\ntemplate. Absent on bookkeeping rules, which make no choice."}},"required":["text"],"type":"object"},"ExportAccount":{"description":"The account row.","properties":{"created_at":{"type":"string"},"email":{"type":["string","null"]},"email_verified":{"type":"boolean"},"id":{"type":"string"},"period":{"anyOf":[{"$ref":"#/components/schemas/ExportPeriod"},{"type":"null"}],"description":"The subscription period; `null` without one."},"plan":{"$ref":"#/components/schemas/PlanId"},"plan_interval":{"anyOf":[{"$ref":"#/components/schemas/BillingInterval"},{"type":"null"}]},"plan_status":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatus"},{"type":"null"}]},"scheduled_change":{"anyOf":[{"$ref":"#/components/schemas/ScheduledChange"},{"type":"null"}],"description":"A plan change waiting for the end of the period."},"terms_accepted_at":{"type":["string","null"]},"terms_version":{"description":"The version of the Terms of Service accepted when the account was created.","type":["string","null"]}},"required":["id","email_verified","plan","created_at"],"type":"object"},"ExportAddress":{"properties":{"value":{"type":"string"},"verified":{"type":"boolean"},"verified_at":{"type":["string","null"]},"via":{"description":"How it is reached: `email`.","type":["string","null"]}},"required":["value","verified"],"type":"object"},"ExportDevice":{"properties":{"ip_address":{"type":["string","null"]},"user_agent":{"type":["string","null"]}},"type":"object"},"ExportEmailChange":{"description":"One change of the account's address.","properties":{"changed_at":{"type":"string"}},"required":["changed_at"],"type":"object"},"ExportGrant":{"description":"A block of credits the account received.","properties":{"amount":{"description":"Credits granted.","format":"double","type":"number"},"channels":{"description":"`interactive` or `api`: the channel that spends it.","type":"string"},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]},"external_ref":{"description":"What makes the grant unique within its source: a month, a Paddle transaction or a subscription's period.","type":["string","null"]},"id":{"type":"string"},"remaining":{"description":"Credits left.","format":"double","type":"number"},"source":{"description":"`free_monthly`, `subscription`, `purchase`, `promo`, `refund` or `adjustment`.","type":"string"}},"required":["id","source","channels","amount","remaining","created_at"],"type":"object"},"ExportIdentity":{"description":"What the sign-in service holds.","properties":{"created_at":{"type":["string","null"]},"credential_types":{"description":"Kinds of credential set (`password`, `code`…), never the credentials.","items":{"type":"string"},"type":"array"},"traits":{"description":"The identity's traits as the person entered them (email, name)."},"verifiable_addresses":{"items":{"$ref":"#/components/schemas/ExportAddress"},"type":"array"}},"required":["traits","verifiable_addresses","credential_types"],"type":"object"},"ExportKey":{"description":"An API key or CLI token, live or revoked. Never the secret.","properties":{"created_at":{"type":"string"},"credit_limit":{"description":"Credits the key may spend in total; `null` without a limit.","format":"double","type":["number","null"]},"credits_spent":{"description":"Credits charged to the key so far.","format":"double","type":"number"},"daily_limit":{"default":null,"description":"Credits a CLI sign-in may spend in a UTC day, as the person set it; `null` while the limit is the plan's, and for\nan API key, which has `credit_limit` instead. `None` for a payload that lacks it.","format":"double","type":["number","null"]},"expires_at":{"type":["string","null"]},"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/KeyKind"},"last_used_at":{"type":["string","null"]},"name":{"type":"string"},"no_daily_limit":{"default":false,"description":"The person removed the daily limit: the sign-in has none, whatever `daily_limit` says. `false` for a\npayload that lacks it.","type":"boolean"},"oauth":{"default":false,"description":"A CLI sign-in an OAuth client holds (a remote MCP client's), not a terminal's: it keeps the queries and refuses\nwhat changes the account or its billing. `false` for a payload that lacks it.","type":"boolean"},"prefix":{"type":"string"},"revoked_at":{"type":["string","null"]},"spent_on":{"default":null,"description":"The UTC day `spent_that_day` counts, `YYYY-MM-DD`; `null` until the key has spent anything.","type":["string","null"]},"spent_that_day":{"default":0.0,"description":"Credits charged to the key on `spent_on`. `0` for a payload that lacks it.","format":"double","type":"number"}},"required":["id","kind","name","prefix","created_at","credits_spent"],"type":"object"},"ExportLedgerEntry":{"description":"One movement of credits in or out of a grant.","properties":{"created_at":{"type":"string"},"day":{"description":"The day (UTC, `YYYY-MM-DD`) of a `usage` entry.","type":["string","null"]},"delta":{"description":"Credits added to the grant (positive) or taken from it (negative).","format":"double","type":"number"},"grant_id":{"type":"string"},"id":{"format":"int64","type":"integer"},"kind":{"description":"`grant`, `usage` (what the grant paid for in one day), `expire`, `refund` or `adjustment`.","type":"string"}},"required":["id","grant_id","kind","delta","created_at"],"type":"object"},"ExportMethod":{"properties":{"completed_at":{"type":["string","null"]},"method":{"description":"`password`, `code`…","type":"string"}},"required":["method"],"type":"object"},"ExportPeriod":{"properties":{"end":{"type":["string","null"]},"start":{"type":["string","null"]}},"type":"object"},"ExportPurchase":{"description":"A payment: prepaid credits or one invoice of a subscription.","properties":{"amount_cents":{"description":"Cents charged, tax included.","format":"int64","type":"integer"},"country":{"description":"The customer's country as Paddle had it for the tax, ISO 3166-1 alpha-2.","type":["string","null"]},"created_at":{"type":"string"},"currency":{"description":"ISO 4217, lowercase.","type":"string"},"disputed_cents":{"format":"int64","type":"integer"},"kind":{"description":"`credits` or `subscription`.","type":"string"},"period_end":{"type":["string","null"]},"period_start":{"type":["string","null"]},"plan":{"description":"A subscription's plan, interval and why its invoice was paid (`new`, `renewal`, `change`).","type":["string","null"]},"plan_interval":{"type":["string","null"]},"reason":{"type":["string","null"]},"refunded_cents":{"format":"int64","type":"integer"},"subscription_id":{"type":["string","null"]},"tax_cents":{"format":"int64","type":"integer"},"transaction_id":{"type":"string"}},"required":["transaction_id","kind","currency","amount_cents","tax_cents","refunded_cents","disputed_cents","created_at"],"type":"object"},"ExportRefundRequest":{"description":"A refund the account asked for (`POST /v1/billing/payments/{id}/refund`): the unused credits of\na pack (`credits`) or a consumer's withdrawal from a new subscription (`withdrawal`).","properties":{"adjustment_id":{"type":["string","null"]},"amount_cents":{"description":"Cents to refund.","format":"int64","type":"integer"},"canceled_at":{"description":"When the subscription was canceled for a withdrawal.","type":["string","null"]},"card_fingerprint":{"description":"A hash of the card's brand, last four digits and expiry (never the number), kept to detect repeated\nwithdrawals.","type":["string","null"]},"consumer":{"description":"Whether the person declared being a consumer, with a withdrawal; `null` for a pack.","type":["boolean","null"]},"created_at":{"type":"string"},"decided_at":{"type":["string","null"]},"declared_country":{"description":"The country declared with a withdrawal, ISO 3166-1 alpha-2; `null` for a pack.","type":["string","null"]},"id":{"type":"string"},"kind":{"description":"`credits` or `withdrawal`.","type":"string"},"last_error":{"type":["string","null"]},"operator_note":{"description":"What support wrote when it closed the request, if it did.","type":["string","null"]},"status":{"description":"`pending`, `succeeded`, `failed` or `review` (a person decides it and answers by email).","type":"string"},"transaction_id":{"description":"The payment the refund is of ([`ExportPurchase::transaction_id`]).","type":"string"}},"required":["id","transaction_id","kind","status","amount_cents","created_at"],"type":"object"},"ExportSession":{"description":"A sign-in session of the identity provider.","properties":{"active":{"type":"boolean"},"authenticated_at":{"type":["string","null"]},"devices":{"items":{"$ref":"#/components/schemas/ExportDevice"},"type":"array"},"expires_at":{"type":["string","null"]},"id":{"type":"string"},"issued_at":{"type":["string","null"]},"methods":{"description":"Authentication methods used.","items":{"$ref":"#/components/schemas/ExportMethod"},"type":"array"}},"required":["id","active","methods","devices"],"type":"object"},"ExportUsageTotal":{"description":"What the account spent in one period, on one channel, with one API key, on one kind of work\n([`UsageTotal`], with the first and the last time in it). `refused` counts the queries the\nengine could not take, which cost nothing.","properties":{"api_key_id":{"type":["string","null"]},"channel":{"$ref":"#/components/schemas/Channel"},"count":{"format":"uint32","minimum":0,"type":"integer"},"credits":{"description":"Credits charged.","format":"double","type":"number"},"date":{"description":"The period's first day, `YYYY-MM-DD` (UTC).","type":"string"},"first_at":{"type":"string"},"kind":{"description":"`query`, `ask`, `step_check` or `refused`.","type":"string"},"last_at":{"type":"string"},"period":{"$ref":"#/components/schemas/UsagePeriod"}},"required":["date","period","channel","kind","count","credits","first_at","last_at"],"type":"object"},"Fix":{"description":"A text edit that fixes a diagnostic.","properties":{"args":{"additionalProperties":{"type":"string"},"description":"The values of the slots of the sentence `code` names, by name.","type":"object"},"code":{"description":"Which sentence `title` is, so that a client can write it in another language\n(`use`, `remove_space`...): the id of the sentence in `hilberon-assist`'s tables, with\n`args` for its `{{name}}` slots. Absent when the title has no translation to offer.","type":["string","null"]},"replacement":{"type":"string"},"span":{"$ref":"#/components/schemas/Span"},"title":{"type":"string"}},"required":["title","span","replacement"],"type":"object"},"Footnote":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array"},"number":{"format":"uint32","minimum":0,"type":"integer"}},"required":["number","blocks"],"type":"object"},"Format":{"description":"A rendering of an expression.","oneOf":[{"const":"input","description":"The engine's surface syntax; it can be sent back as a query.","type":"string"},{"const":"tex","description":"LaTeX for display. Not accepted as input.","type":"string"}]},"FunctionAccepts":{"description":"One thing a parameter accepts, with a way to write it.","properties":{"example":{"description":"An argument of that kind written in the language: `x^2 - 4 = 0`.","type":"string"},"text":{"description":"What it is, as a phrase: `an equation`, `a list of variables`.","type":"string"}},"required":["text","example"],"type":"object"},"FunctionInfo":{"description":"One entry of `GET /v1/functions`: a builtin of the language, as\n`hilberon_assist::catalog` documents it.","properties":{"aliases":{"items":{"type":"string"},"type":"array"},"category":{"type":"string"},"described":{"default":false,"description":"The summary and the examples were written for this function. When it is\nfalse they are what the catalog could say from the name alone (a summary\nmay be empty), and a client may say the function has no description yet.","type":"boolean"},"examples":{"description":"One runnable example per variant that matters.","items":{"type":"string"},"type":"array"},"name":{"type":"string"},"signatures":{"description":"The label of each variant: the forms the function is called with.","items":{"type":"string"},"type":"array"},"steps":{"default":false,"description":"The head can return steps (it is in [`STEPS_HEADS`]).","type":"boolean"},"summary":{"type":"string"},"variants":{"default":[],"description":"Each form of a call with its parameters: what each one accepts and means.\n`signatures` is these labels, in order, and `examples` the examples of all of them.","items":{"$ref":"#/components/schemas/FunctionVariant"},"type":"array"},"visibility":{"$ref":"#/components/schemas/Visibility","default":"advanced","description":"How prominent the function is: a client suggests and lists `core` first,\nkeeps `advanced` one step behind and never offers `internal`."}},"required":["name","aliases","category","signatures","summary","examples"],"type":"object"},"FunctionParam":{"description":"A parameter of a [`FunctionVariant`].","properties":{"about":{"description":"What the argument means for this function, in one short sentence; empty\nwhen the catalog has nothing to say.","type":"string"},"accepts":{"description":"What it accepts, one entry for each alternative; empty when unknown.","items":{"$ref":"#/components/schemas/FunctionAccepts"},"type":"array"},"label":{"description":"As written in the label: `f`, `x = a..b`, `order = n`, `...`.","type":"string"}},"required":["label","about","accepts"],"type":"object"},"FunctionVariant":{"description":"One form of a call: `solve(equations, variables, domain = real|complex)`.","properties":{"about":{"description":"What this form does, in a few words; empty when the summary says it.","type":"string"},"examples":{"description":"Calls of this form that run, the one that shows it best first.","items":{"type":"string"},"type":"array"},"label":{"description":"The call written with its parameters, as the signature help shows it.","type":"string"},"params":{"description":"The parameters in order: one for each argument written in `label`.","items":{"$ref":"#/components/schemas/FunctionParam"},"type":"array"}},"required":["label","about","params","examples"],"type":"object"},"Image":{"description":"A processed image: what a `<picture>` needs. `width` and `height` are the image's own, after its orientation, so that\nthe page reserves its room; `placeholder` is a tiny blurred version (a `data:` URI) to show until it loads.","properties":{"alt":{"type":"string"},"formats":{"description":"Best first: AVIF, WebP, then the fallback every browser reads (JPEG for a photograph, PNG for a drawing or a\nscreenshot), which is the `<img>` itself. Each at the widths of 480, 960, 1600 and 2400 pixels up to the image's\nown, and at its own when it is narrower than 2400.","items":{"$ref":"#/components/schemas/Format"},"type":"array"},"height":{"format":"uint32","minimum":0,"type":"integer"},"placeholder":{"type":"string"},"width":{"format":"uint32","minimum":0,"type":"integer"}},"required":["alt","width","height","placeholder","formats"],"type":"object"},"Inline":{"oneOf":[{"description":"Text as written; a line break inside a paragraph is a `\\n`, which a page shows as a space.","properties":{"text":{"type":"string"},"type":{"const":"text","type":"string"}},"required":["type","text"],"type":"object"},{"properties":{"content":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"type":{"const":"strong","type":"string"}},"required":["type","content"],"type":"object"},{"properties":{"content":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"type":{"const":"emphasis","type":"string"}},"required":["type","content"],"type":"object"},{"properties":{"content":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"type":{"const":"strike","type":"string"}},"required":["type","content"],"type":"object"},{"properties":{"code":{"type":"string"},"type":{"const":"code","type":"string"}},"required":["type","code"],"type":"object"},{"description":"Mathematics inside a line (`$…$`).","properties":{"tex":{"type":"string"},"type":{"const":"math","type":"string"}},"required":["type","tex"],"type":"object"},{"description":"`href` is an `https:` or `mailto:` address, a path of the site (`/…`, a post of the same collection being\n`/blog/<collection>/<slug>`), or an anchor of this post (`#…`).","properties":{"content":{"items":{"$ref":"#/components/schemas/Inline"},"type":"array"},"href":{"type":"string"},"type":{"const":"link","type":"string"}},"required":["type","href","content"],"type":"object"},{"description":"A reference to `Body::footnotes[number - 1]`.","properties":{"number":{"format":"uint32","minimum":0,"type":"integer"},"type":{"const":"footnote","type":"string"}},"required":["type","number"],"type":"object"},{"description":"A hard line break.","properties":{"type":{"const":"break","type":"string"}},"required":["type"],"type":"object"}]},"KeyKind":{"oneOf":[{"enum":["unknown"],"type":"string"},{"const":"api","description":"`hbk_…`, channel `api`.","type":"string"},{"const":"cli","description":"`hbc_…` issued by `hilberon login`, channel `interactive`.","type":"string"}]},"LegacyPrice":{"description":"A price a subscription keeps after the plan's price changed: what it pays every `interval` for `plan`, for as long\nas it keeps both. Any change of plan or interval leaves it for the price offered then, and is made only when the\nrequest accepts that ([`PlanChangeRequest::accept_price_change`]).","properties":{"amount_cents":{"description":"What it bills each interval, tax included, in the minor unit of `currency` (cents; yen for `jpy`).","format":"int64","type":"integer"},"currency":{"default":"usd","description":"ISO 4217, lowercase: the currency the subscription is billed in (`eur` where the price's table for the\nbuyer's country is in euros). A server that did not send it meant US dollars.","type":"string"},"interval":{"$ref":"#/components/schemas/BillingInterval"},"plan":{"$ref":"#/components/schemas/PlanId"}},"required":["plan","interval","amount_cents"],"type":"object"},"LimitSource":{"description":"What set the limit a run or a refusal met ([`Usage::limited_by`], `details.limited_by`).","oneOf":[{"const":"effort","description":"The effort the request ran at: a level's credits, or the number it named.","type":"string"},{"const":"plan","description":"The most a question may spend on the plan or the API tier ([`crate::Limits::max_credits`]).","type":"string"},{"const":"surface","description":"The account's setting for the surface ([`crate::AccountSettings::efforts`]).","type":"string"},{"const":"day","description":"The daily limit of the sign-in.","type":"string"},{"const":"key","description":"The credit limit of the API key.","type":"string"},{"const":"balance","description":"What was left of the balance.","type":"string"},{"const":"unknown","description":"A limit this client does not know yet.","type":"string"}]},"Limits":{"description":"What a principal may do on one channel.","properties":{"concurrency":{"description":"The queries a principal may have under way at once: a query or a step check holds one slot, whatever its effort,\nan ask's model part none.","format":"uint32","minimum":0,"type":"integer"},"max_credits":{"description":"The most a question may spend on this plan or tier, in whole credits, whatever its effort.\nAlso read from `default_max_credits`, the name the field had.","format":"uint32","minimum":0,"type":"integer"},"max_effort":{"$ref":"#/components/schemas/Effort"},"requests_per_minute":{"description":"The requests a minute: `requests_per_second` times 60, for a client that counts in minutes. The server counts\nrequests in whole seconds; read [`Limits::per_second`].","format":"uint32","minimum":0,"type":"integer"},"requests_per_second":{"default":0,"description":"The most requests a second, counted in fixed one-second windows. 0 when a payload says only\n`requests_per_minute`: [`Limits::per_second`] reads either.","format":"uint32","minimum":0,"type":"integer"}},"required":["max_effort","requests_per_minute","concurrency","max_credits"],"type":"object"},"Me":{"description":"`GET /v1/me`","properties":{"allowed":{"anyOf":[{"$ref":"#/components/schemas/Allowed"},{"type":"null"}],"description":"What the account may do now, as the server decides it. `None` for a payload that lacks it."},"api_tier":{"description":"0 without purchases; grows with lifetime purchases (API rate limits).","format":"uint8","maximum":255,"minimum":0,"type":"integer"},"ask":{"default":false,"description":"This account may ask now (`POST /v1/ask`): its plan has the ask (Plus and Pro; Free and Lite\ndo not) and the server offers it. False when a payload lacks it. [`Allowed::ask`] says it too.","type":"boolean"},"balances":{"$ref":"#/components/schemas/Balances"},"caller":{"anyOf":[{"$ref":"#/components/schemas/CallerLimits"},{"type":"null"}],"description":"What the credential of this request may do now. `None` for a payload that lacks it."},"email":{"type":["string","null"]},"email_verified":{"type":"boolean"},"id":{"type":"string"},"limits":{"$ref":"#/components/schemas/ChannelLimits"},"plan":{"$ref":"#/components/schemas/PlanId"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionInfo"},{"type":"null"}]},"terms_accepted_at":{"type":["string","null"]},"terms_version":{"description":"The terms of service version the user accepted; absent before acceptance is recorded.","type":["string","null"]}},"required":["id","email_verified","plan","api_tier","balances","limits"],"type":"object"},"MethodInfo":{"properties":{"binds":{"description":"Keys this rule fills in a step's `bind`.","items":{"type":"string"},"type":"array"},"formula":{"description":"The rule's general formula in TeX, for example `\\int u\\,dv = uv - \\int v\\,du`.","type":["string","null"]},"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/MethodKind"},"kinds":{"description":"The kind of each bind. Every key of `binds` has one on a rule.","items":{"maxItems":2,"minItems":2,"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/BindKind"}],"type":"array"},"type":"array"},"name":{"type":"string"},"routine":{"description":"A routine rule: bookkeeping a textbook states without dwelling on it, so a client\nmay fold it at the brief and standard levels of detail and show it at the full one. The rule of thumb:\nthe step applies a law or a lookup, or tidies up, and takes no decision a student\nmust follow (linearity, a constant or a table lookup, the power rule, `simplify`,\ncollecting like terms or the result). A step that carries the method is not\nroutine: a technique, a choice, a row operation, a factoring, the solving of an\nequation, a check. Rule rows only; the engine's own rows are never routine.","type":"boolean"},"template":{"anyOf":[{"$ref":"#/components/schemas/Template"},{"type":"null"}],"description":"The sentence of the step; absent on engine algorithms and the fallback."},"why":{"anyOf":[{"$ref":"#/components/schemas/Template"},{"type":"null"}],"description":"Why a reader would choose this method: one sentence, in the syntax of `template`,\nfor the rules where a choice is made (a technique, a form of the answer, a case).\nAbsent on bookkeeping rules and on rules that only carry out a decision made before\nthem. It may use only binds that `template` needs, so it renders whenever the step does.\n`explain` renders it into `Explanation::why`."}},"required":["id","kind","name","binds"],"type":"object"},"MethodKind":{"oneOf":[{"const":"rule","description":"A textbook rule a person would write as a step.","type":"string"},{"const":"algorithm","description":"An engine algorithm with no hand-written counterpart (Risch, Hermite…).","type":"string"},{"const":"fallback","description":"A step the derivation could not narrate; the engine's value is shown as is.","type":"string"}]},"MethodRef":{"description":"A method or rule that contributed to the result; ids come from\n[`crate::catalog::METHODS`].","properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"Payment":{"description":"One line of `GET /v1/billing/payments`. Amounts are in cents of `currency`.","properties":{"amount_cents":{"description":"What was charged, tax included.","format":"int64","type":"integer"},"credits":{"description":"A pack's credits.","format":"double","type":["number","null"]},"currency":{"description":"ISO 4217, lowercase: `usd`.","type":"string"},"disputed_cents":{"description":"Taken back by a dispute the bank has not decided for us.","format":"int64","type":"integer"},"id":{"description":"Paddle's transaction, which `GET /v1/billing/payments/{id}/receipt` takes.","type":"string"},"interval":{"anyOf":[{"$ref":"#/components/schemas/BillingInterval"},{"type":"null"}]},"kind":{"$ref":"#/components/schemas/PaymentKind"},"paid_at":{"type":"string"},"period_end":{"type":["string","null"]},"period_start":{"description":"The subscription's period the invoice paid for.","type":["string","null"]},"plan":{"anyOf":[{"$ref":"#/components/schemas/PlanId"},{"type":"null"}],"description":"A subscription's plan and interval."},"reason":{"anyOf":[{"$ref":"#/components/schemas/PaymentReason"},{"type":"null"}]},"refunded_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"}},"required":["id","kind","paid_at","currency","amount_cents","tax_cents","refunded_cents","disputed_cents"],"type":"object"},"PaymentKind":{"description":"What a [`Payment`] paid for.","oneOf":[{"enum":["unknown"],"type":"string"},{"const":"credits","description":"A pack of prepaid credits.","type":"string"},{"const":"subscription","description":"An invoice of the subscription.","type":"string"}]},"PaymentLine":{"description":"A line of `GET /v1/billing/payments`: the payment, and what the account may do about it.","properties":{"amount_cents":{"description":"What was charged, tax included.","format":"int64","type":"integer"},"credits":{"description":"A pack's credits.","format":"double","type":["number","null"]},"currency":{"description":"ISO 4217, lowercase: `usd`.","type":"string"},"disputed_cents":{"description":"Taken back by a dispute the bank has not decided for us.","format":"int64","type":"integer"},"id":{"description":"Paddle's transaction, which `GET /v1/billing/payments/{id}/receipt` takes.","type":"string"},"interval":{"anyOf":[{"$ref":"#/components/schemas/BillingInterval"},{"type":"null"}]},"kind":{"$ref":"#/components/schemas/PaymentKind"},"paid_at":{"type":"string"},"period_end":{"type":["string","null"]},"period_start":{"description":"The subscription's period the invoice paid for.","type":["string","null"]},"plan":{"anyOf":[{"$ref":"#/components/schemas/PlanId"},{"type":"null"}],"description":"A subscription's plan and interval."},"reason":{"anyOf":[{"$ref":"#/components/schemas/PaymentReason"},{"type":"null"}]},"refund":{"anyOf":[{"$ref":"#/components/schemas/RefundOffer"},{"type":"null"}],"description":"`null` when nothing can be asked or was."},"refunded_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"}},"required":["id","kind","paid_at","currency","amount_cents","tax_cents","refunded_cents","disputed_cents"],"type":"object"},"PaymentMethodChange":{"additionalProperties":false,"description":"`PATCH /v1/billing/payment-methods/{id}`: make it the one the subscription renews with.","properties":{"default":{"description":"`true`; a default is replaced by another, never taken away.","type":"boolean"}},"required":["default"],"type":"object"},"PaymentReason":{"description":"Why a subscription's invoice was paid.","oneOf":[{"enum":["unknown"],"type":"string"},{"const":"new","description":"The subscription's first payment.","type":"string"},{"const":"renewal","description":"A new period.","type":"string"},{"const":"change","description":"A change of plan or interval, prorated.","type":"string"}]},"Plan":{"properties":{"id":{"$ref":"#/components/schemas/PlanId"},"limits":{"$ref":"#/components/schemas/Limits"},"monthly_credits":{"format":"uint64","minimum":0,"type":"integer"},"name":{"type":"string"},"price_month_cents":{"description":"USD cents; 0 for free.","format":"uint32","minimum":0,"type":"integer"},"price_year_cents":{"format":"uint32","minimum":0,"type":"integer"}},"required":["id","name","monthly_credits","price_month_cents","price_year_cents","limits"],"type":"object"},"PlanChangePreview":{"description":"`POST /v1/billing/plan/preview`: what a plan change would do.","properties":{"amount_due_cents":{"description":"Charged at once, tax included, in the minor unit of `currency` (cents; yen for `jpy`); 0 for a change at the\nend of the period.","format":"int64","type":"integer"},"currency":{"default":"usd","description":"ISO 4217, lowercase: the currency the subscription is billed in, which a change made now is charged in. A\nserver that did not send it meant US dollars.","type":"string"},"effective_at":{"description":"When the change takes effect.","type":"string"},"legacy_price":{"anyOf":[{"$ref":"#/components/schemas/LegacyPrice"},{"type":"null"}],"description":"The price no longer offered that this change leaves: the change needs\n[`PlanChangeRequest::accept_price_change`]. Absent when the subscription pays the price offered now."},"timing":{"$ref":"#/components/schemas/PlanChangeTiming"}},"required":["timing","amount_due_cents","effective_at"],"type":"object"},"PlanChangeRequest":{"additionalProperties":false,"description":"`POST /v1/billing/plan/preview` and `POST /v1/billing/plan`: move the subscription to `plan`\nbilled every `interval`.","properties":{"accept_price_change":{"description":"The person accepts leaving a price no longer offered ([`SubscriptionInfo::legacy_price`]) for the price offered\nnow. Required by `POST /v1/billing/plan` for any change from such a price, which is refused without it\n(`409`, `details.reason` `price_change_not_accepted`); the preview does not need it. Written only when set.","type":"boolean"},"interval":{"$ref":"#/components/schemas/BillingInterval"},"plan":{"$ref":"#/components/schemas/PlanId"}},"required":["plan","interval"],"type":"object"},"PlanChangeResult":{"description":"`POST /v1/billing/plan`","properties":{"timing":{"$ref":"#/components/schemas/PlanChangeTiming"}},"required":["timing"],"type":"object"},"PlanChangeTiming":{"description":"When a plan change takes effect: at once (a higher plan or a longer interval, the difference\ncharged now) or at the end of the paid period (a lower plan or a shorter interval).","enum":["now","period_end","unknown"],"type":"string"},"PlanId":{"oneOf":[{"enum":["free","plus","pro","unknown"],"type":"string"},{"const":"lite","description":"Engine only, for personal use: no ask.","type":"string"}]},"PolarCheckout":{"description":"What the page's own payment form needs to pay a checkout of Polar's: the checkout, the secret its public client\nendpoints take (`GET`/`PATCH {api_base}/v1/checkouts/client/{client_secret}`, `POST …/confirm`), and what Stripe's\nPayment Element is created with (Polar's processor is Stripe; the card goes to Stripe, never to this server). The\nanswer of every route that opens a payment.","properties":{"api_base":{"description":"Where those endpoints are: `https://sandbox-api.polar.sh` or `https://api.polar.sh`.","type":"string"},"checkout_id":{"description":"Polar's checkout id, which `GET /v1/billing/checkout/{checkout_id}` reopens.","type":"string"},"client_secret":{"description":"`polar_c_…`: the checkout's client secret, for Polar's public client endpoints only.","type":"string"},"stripe_customer_session":{"description":"The client secret of a Stripe customer session that shows the cards the customer saved\n(`payment_processor_metadata.customer_session_client_secret`); `null` for a customer with none.","type":["string","null"]},"stripe_key":{"description":"Stripe's publishable key the Payment Element is created with (the checkout's\n`payment_processor_metadata.publishable_key`).","type":"string"},"url":{"description":"Polar's own page for the checkout.","type":"string"}},"required":["checkout_id","client_secret","api_base","stripe_key","url"],"type":"object"},"Post":{"description":"`GET /v1/posts/{collection}/{slug}`: one post. `slug` is the post's own, which differs from the one asked for when\nthat was a former slug (`aliases`): the page then redirects to it.","properties":{"aliases":{"description":"The post's former slugs.","items":{"type":"string"},"type":"array"},"body":{"$ref":"#/components/schemas/Body"},"collection":{"type":"string"},"cover":{"anyOf":[{"$ref":"#/components/schemas/Image"},{"type":"null"}]},"date":{"description":"When it was first published and last changed, RFC 3339 in UTC.","type":"string"},"draft":{"description":"Only a development server keeps drafts; a page shows one as such and keeps it out of search engines.","type":"boolean"},"fallback":{"description":"The language asked for has no text of this post, so the original is sent (`language` says which).","type":"boolean"},"formula":{"description":"The post's formula, TeX of one line without `$`: the front matter's `formula`, else the first formula of the\ntext set on its own line (`$$…$$`). A page sets it large as the post's picture when the post has no cover. None\nwhen the post has neither, or was written before the API kept it.","type":["string","null"]},"language":{"description":"The language of the text sent.","type":"string"},"languages":{"description":"Every language the post is written in, the original first.","items":{"type":"string"},"type":"array"},"minutes":{"description":"Minutes to read, at least one. None for a post written before the API counted them.","format":"uint32","minimum":0,"type":["integer","null"]},"slug":{"type":"string"},"summary":{"description":"Plain text: the front matter's, or the first sentences of the first paragraph.","type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"title":{"description":"Plain text; it may hold `$…$` mathematics.","type":"string"},"translation":{"$ref":"#/components/schemas/Translation"},"updated":{"type":["string","null"]}},"required":["collection","slug","language","fallback","translation","languages","title","summary","date","tags","draft","aliases","body"],"type":"object"},"PostList":{"description":"`GET /v1/posts/{collection}`: its posts, newest first.","properties":{"collection":{"type":"string"},"language":{"description":"The language asked for (`Accept-Language`).","type":"string"},"posts":{"items":{"$ref":"#/components/schemas/PostSummary"},"type":"array"}},"required":["collection","language","posts"],"type":"object"},"PostSummary":{"description":"A post as a list shows it.","properties":{"collection":{"type":"string"},"cover":{"anyOf":[{"$ref":"#/components/schemas/Image"},{"type":"null"}]},"date":{"description":"When it was first published and last changed, RFC 3339 in UTC.","type":"string"},"draft":{"description":"Only a development server keeps drafts; a page shows one as such and keeps it out of search engines.","type":"boolean"},"fallback":{"description":"The language asked for has no text of this post, so the original is sent (`language` says which).","type":"boolean"},"formula":{"description":"The post's formula, TeX of one line without `$`: the front matter's `formula`, else the first formula of the\ntext set on its own line (`$$…$$`). A page sets it large as the post's picture when the post has no cover. None\nwhen the post has neither, or was written before the API kept it.","type":["string","null"]},"language":{"description":"The language of the text sent.","type":"string"},"languages":{"description":"Every language the post is written in, the original first.","items":{"type":"string"},"type":"array"},"minutes":{"description":"Minutes to read, at least one. None for a post written before the API counted them.","format":"uint32","minimum":0,"type":["integer","null"]},"slug":{"type":"string"},"summary":{"description":"Plain text: the front matter's, or the first sentences of the first paragraph.","type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"title":{"description":"Plain text; it may hold `$…$` mathematics.","type":"string"},"translation":{"$ref":"#/components/schemas/Translation"},"updated":{"type":["string","null"]}},"required":["collection","slug","language","fallback","translation","languages","title","summary","date","tags","draft"],"type":"object"},"PrepaidPack":{"description":"A pack of prepaid credits bought for API keys ([`Balances::packs`]). What is left of it on `expires_at` ends then and\ncannot be extended.","properties":{"amount":{"description":"Credits bought.","format":"double","type":"number"},"expires_at":{"type":"string"},"remaining":{"description":"Credits left.","format":"double","type":"number"}},"required":["amount","remaining","expires_at"],"type":"object"},"Pricing":{"description":"`GET /v1/billing/plans`","properties":{"credits":{"$ref":"#/components/schemas/CreditPricing"},"currency":{"type":"string"},"plans":{"items":{"$ref":"#/components/schemas/Plan"},"type":"array"}},"required":["currency","plans","credits"],"type":"object"},"QueryError":{"description":"Why the engine rejected a query (`status: error`).","properties":{"kind":{"type":"string"},"message":{"type":"string"}},"required":["kind","message"],"type":"object"},"QueryRequest":{"additionalProperties":false,"description":"`POST /v1/query` body.","properties":{"allow_unknown":{"description":"Run the query even when a function name looks like a misspelt builtin (`integrat` for\n`integrate`, `Sin` for `sin`), which is otherwise refused free of charge with the checker's\nsuggestion. Only for a function of the caller's own.","type":"boolean"},"alternatives":{"description":"How many other methods to derive besides the main one ([`Steps::alternatives`]). 0, or leaving\nit out, asks for none, with or without `steps`; 1 to [`MAX_ALTERNATIVES`] need `steps`, and\nwithout it, or above the most, the request is invalid. An anonymous request that asks for\nany is refused (`unauthenticated`). There may be fewer: only methods that apply and whose\nderivation is verified are listed. They are charged like the rest of the query, the attempt\nat half if the fuel cut it.","format":"uint8","maximum":2,"minimum":0,"type":["integer","null"]},"effort":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"description":"What the query may use: a level, for how far the engine searches and the credits it may\nspend ([`Effort::credits`]), or a whole number of credits, the limit, at the first level\nwhose credits reach it. `exhaustive` starts at `quick` and escalates while a bound cut the\nanswer. When absent, the account's setting for the surface runs, or the surface's default.\nThe plan's ceilings apply."},"format":{"description":"Renderings of every returned expression; `[\"input\"]` when absent.","items":{"$ref":"#/components/schemas/Format"},"type":"array"},"improve":{"description":"`false` keeps this query out of the samples Hilberon keeps to improve the engine,\nwhatever the account's settings say. It can only refuse: `true` or absent leaves the\ndecision to the account (signed in) or to the default (anonymous).","type":["boolean","null"]},"query":{"description":"The query in Hilberon syntax, e.g. `integrate(x*exp(x), x)`.","type":"string"},"steps":{"description":"Also return the verified derivation when the query supports it.","type":"boolean"}},"required":["query"],"type":"object"},"QueryResponse":{"description":"`POST /v1/query` response, `200` for every evaluated query whatever its status.","properties":{"check":{"anyOf":[{"$ref":"#/components/schemas/Check"},{"type":"null"}]},"effort":{"$ref":"#/components/schemas/EffortReport"},"error":{"anyOf":[{"$ref":"#/components/schemas/QueryError"},{"type":"null"}]},"id":{"description":"This answer's id, for support. The service keeps it nowhere: usage is kept as totals per day.","type":"string"},"messages":{"items":{"$ref":"#/components/schemas/EngineMessage"},"type":"array"},"methods":{"items":{"$ref":"#/components/schemas/MethodRef"},"type":"array"},"result":{"anyOf":[{"$ref":"#/components/schemas/Rendered"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/Status"},"steps":{"anyOf":[{"$ref":"#/components/schemas/Steps"},{"type":"null"}]},"steps_available":{"default":false,"description":"Whether the same query with `steps` gives a derivation: the engine narrates problems of\nthis shape (`solve` of one equation, not yet of a system). `FunctionInfo.steps` says it for\na head, this for the query. False when a payload lacks it.","type":"boolean"},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["id","status","effort","usage"],"type":"object"},"RedirectUrl":{"description":"A URL to send the browser to (a payment's receipt).","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"RefundAnswer":{"description":"The answer to a refund request.","properties":{"amount_cents":{"format":"int64","type":"integer"},"id":{"description":"The request's id.","type":"string"},"kind":{"$ref":"#/components/schemas/RefundKind"},"state":{"$ref":"#/components/schemas/RefundState","description":"`succeeded` (Polar approved the refund), `pending` (it waits for Polar's approval, or will be asked again until\nPolar answers) or `review` (a person decides; support replies by email). A refund Polar refuses is not an answer\nbut a `409`."}},"required":["id","kind","state","amount_cents"],"type":"object"},"RefundBody":{"additionalProperties":false,"description":"The body of `POST /v1/billing/payments/{id}/refund`: `{}` for a pack; for the first payment of a subscription the\nwithdrawal and what the person declares about it.","properties":{"consumer":{"default":null,"description":"Whether the person is a consumer, for a withdrawal.","type":["boolean","null"]},"country":{"default":null,"description":"The country the person lives in (ISO 3166-1 alpha-2), for a withdrawal.","type":["string","null"]},"withdraw":{"default":false,"description":"Withdraw from the subscription this is the first payment of.","type":"boolean"}},"type":"object"},"RefundKind":{"oneOf":[{"const":"credits","description":"A pack's unused credits.","type":"string"},{"const":"withdrawal","description":"A consumer's withdrawal from a new subscription.","type":"string"}]},"RefundOffer":{"description":"What the account may do about a payment, or has done: the `refund` of a line of `GET /v1/billing/payments`.","properties":{"amount_cents":{"description":"Cents: exactly what a pack's request refunds if made now; a withdrawal's as it would be now, less the value of\nthe credits used by then; the amount asked for, otherwise.","format":"int64","type":"integer"},"kind":{"$ref":"#/components/schemas/RefundKind"},"last_failed":{"description":"With `available`: the last request failed (Polar rejected its refund, or a person declined it), which the page\nsays beside the button that asks again.","type":"boolean"},"state":{"$ref":"#/components/schemas/RefundState"},"until":{"description":"Until when the refund can be asked for (RFC 3339), for `available`.","type":["string","null"]}},"required":["kind","state","amount_cents","last_failed"],"type":"object"},"RefundState":{"oneOf":[{"enum":["succeeded","failed"],"type":"string"},{"const":"available","description":"A refund can be asked for now.","type":"string"},{"const":"pending","description":"Asked, and Polar has not approved it yet.","type":"string"},{"const":"review","description":"A person decides; support replies by email.","type":"string"}]},"Rendered":{"description":"One expression in the renderings the request asked for.","properties":{"input":{"type":["string","null"]},"tex":{"type":["string","null"]}},"type":"object"},"SavedPaymentMethod":{"description":"A payment method saved for the account (`GET /v1/billing/payment-methods`): what the page shows of it, never more\nof a card than its brand, its last four digits and its expiry.","properties":{"brand":{"description":"A card's network (`visa`, `mastercard`, `amex`, `discover`, `diners`, `jcb`, `unionpay`, or `unknown`).","type":["string","null"]},"default":{"description":"The customer's default: the one the subscription renews with.","type":"boolean"},"exp_month":{"format":"uint8","maximum":255,"minimum":0,"type":["integer","null"]},"exp_year":{"format":"uint16","maximum":65535,"minimum":0,"type":["integer","null"]},"id":{"description":"Polar's id of the payment method (a UUID).","type":"string"},"kind":{"description":"`card`, or another kind Polar saved, which the page names as it is.","type":"string"},"last4":{"type":["string","null"]},"wallet":{"description":"The wallet that holds the card (`apple_pay`, `google_pay`).","type":["string","null"]}},"required":["id","kind","default"],"type":"object"},"ScheduledChange":{"description":"The plan and interval a subscription moves to at `at`, the end of its current period.","properties":{"at":{"type":"string"},"interval":{"$ref":"#/components/schemas/BillingInterval"},"plan":{"$ref":"#/components/schemas/PlanId"}},"required":["plan","interval","at"],"type":"object"},"Severity":{"oneOf":[{"enum":["hint","unknown"],"type":"string"},{"const":"error","description":"The engine would reject the query; sending it wastes credits.","type":"string"},{"const":"warning","description":"The query parses but probably does not mean what was intended.","type":"string"}]},"Span":{"description":"A byte range of the query text (UTF-8). Editors that index UTF-16 code\nunits convert at their boundary.","properties":{"end":{"format":"uint32","minimum":0,"type":"integer"},"start":{"format":"uint32","minimum":0,"type":"integer"}},"required":["start","end"],"type":"object"},"Status":{"description":"What happened to a query that reached the engine.","oneOf":[{"const":"solved","description":"A result was produced: a closed form or the engine's numeric/asymptotic fallback.","type":"string"},{"const":"cut","description":"No full answer, and an effort bound refused some search: retry at `effort.lifts_at`.","type":"string"},{"const":"partial","description":"The credits ran out ([`Usage::limited_by`] says which limit). At `exhaustive`, `result` is the\nlast completed effort's answer.","type":"string"},{"const":"unevaluated","description":"No closed form was found and nothing was cut.","type":"string"},{"const":"error","description":"The engine rejected the query; see `error`.","type":"string"},{"const":"unknown","description":"A status this client does not know yet.","type":"string"}]},"Step":{"description":"One step of a verified derivation. No prose: clients explain the step from\n`rule` and `bind`.","properties":{"bind":{"additionalProperties":{"$ref":"#/components/schemas/Rendered"},"description":"The rule's data: `u`, `dv`, `du`, `v` for parts; `u`, `du` for substitution…","type":"object"},"explanation":{"anyOf":[{"$ref":"#/components/schemas/Explanation"},{"type":"null"}],"description":"The step in words, rendered by the API from the rule's catalog template;\nthe engine never fills it."},"id":{"format":"uint32","minimum":0,"type":"integer"},"method":{"description":"For `engine` steps: the engine method that produced the value, when known.","type":["string","null"]},"on":{"$ref":"#/components/schemas/Rendered","description":"The expression the rule is applied to."},"parent":{"description":"The step whose sub-expression this one works on.","format":"uint32","minimum":0,"type":["integer","null"]},"rule":{"description":"A rule id from the catalog, or `engine` for a step the derivation could not narrate.","type":"string"},"state":{"anyOf":[{"$ref":"#/components/schemas/Rendered"},{"type":"null"}],"description":"The whole expression after this step, remaining integrals included."},"to":{"anyOf":[{"$ref":"#/components/schemas/Rendered"},{"type":"null"}],"description":"What `on` became."}},"required":["id","rule","on"],"type":"object"},"StepCheckDepth":{"description":"How far a check goes to match the candidate with a line.","oneOf":[{"const":"form","description":"Is the candidate written as a line of the derivation? Cheap. The default.","type":"string"},{"const":"value","description":"Also: when it is written as none, does it equal one? Proves and refutes, and can cost\nseveral times as much.","type":"string"}]},"StepCheckRequest":{"additionalProperties":false,"description":"`POST /v1/steps/check` body.","properties":{"candidate":{"description":"The line the student wrote, in the language's syntax: an expression or an equation.","type":"string"},"depth":{"anyOf":[{"$ref":"#/components/schemas/StepCheckDepth"},{"type":"null"}],"description":"How far to go to match the candidate; `form` when absent."},"effort":{"anyOf":[{"$ref":"#/components/schemas/EffortChoice"},{"type":"null"}],"description":"What the check may use, as [`crate::QueryRequest::effort`]: its level is the effort of the\nderivation the lines come from, so it must be the level the derivation was asked at. When\nabsent the level is `standard`, and the check may spend 50 credits for `form` and 100 for\n`value`, and 15 more for each other method it may pay for, under the same ceilings. It\nbounds the spending and not the charge: a check pays what it uses."},"format":{"description":"Renderings of the matched line; `[\"input\"]` when absent.","items":{"$ref":"#/components/schemas/Format"},"type":"array"},"method":{"description":"Compare with the lines of this method only, a rule id of the catalog (`Steps::method` of\nthe main derivation, or `Alternative::method` of one of its alternatives). Absent: the\nlines of every method the derivation has are compared, the main one first.","type":["string","null"]},"query":{"description":"The problem, as sent to `POST /v1/query` with `steps`: `integrate(x*exp(x), x)`.","type":"string"},"state":{"description":"The line the student is on, in the language's syntax. It is the query itself\nbefore the first step, and otherwise a line of the derivation as the response\nof `/v1/query` gives it (`Step.state`).","type":"string"}},"required":["query","state","candidate"],"type":"object"},"StepCheckResponse":{"description":"`POST /v1/steps/check` response.","properties":{"capped":{"description":"The check reached the credits of its `effort` before it could decide, so `result` is\n`undecided` and nothing is known of the candidate: the engine was not given enough to try,\nwhich is not the engine failing to prove or refute. The derivation is kept, so a retry with a\nhigher `effort` pays for the comparison only.","type":"boolean"},"cut":{"description":"The derivation had only the engine's one step (its budget ran out), so only `state` and\nthe answer could be compared.","type":"boolean"},"evidence":{"anyOf":[{"$ref":"#/components/schemas/EvidenceKind"},{"type":"null"}],"description":"The kind of evidence the verdict rests on: for `current` and `later` that the candidate is\nthe line's expression (`identical` or `canonical`); for `equivalent` the proof that it equals\nthe line; for `different` what told it from `state`; for `undecided` `sampled` when the two\nagreed at sample points, else absent."},"id":{"description":"This answer's id, for support. The service keeps it nowhere: usage is kept as totals per day.","type":"string"},"matched":{"anyOf":[{"$ref":"#/components/schemas/Rendered"},{"type":"null"}],"description":"The line the candidate matches or equals, as the derivation writes it (absent for `current`)."},"method":{"description":"The method whose line the candidate matches, when it is an alternative of the main\nderivation (`Alternative::method`). Absent for a line of the main derivation.","type":["string","null"]},"points":{"description":"For `sampled` evidence: the number of points at which the two agreed.","format":"uint32","minimum":0,"type":["integer","null"]},"result":{"$ref":"#/components/schemas/StepCheckResult"},"skipped":{"description":"For `later`: the lines of the derivation between `state` and the matched one, which the\ncandidate skips.","format":"uint32","minimum":0,"type":"integer"},"step":{"description":"The step whose line the candidate matches: `Step.id`. For `current`, the step that\nproduced `state` when `state` is one of its lines (absent for the problem itself); for\n`later` and `equivalent`, the step whose line it is.","format":"uint32","minimum":0,"type":["integer","null"]},"truncated":{"description":"Only the first steps of the derivation were compared (anonymous use).","type":"boolean"},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["id","result","usage"],"type":"object"},"StepCheckResult":{"description":"How the candidate relates to the derivation.","oneOf":[{"const":"current","description":"The candidate is `state` written again, or written in the same form (a sum in another\norder): no step was made.","type":"string"},{"const":"later","description":"The candidate is a later line of the derivation, in its form: `step` says which.","type":"string"},{"const":"equivalent","description":"The candidate is written as no line, but equals one in value (an expanded form of a\nfactored line, the answer with the integral carried out): `step` and `matched` say which.\nIt is a correct line that the derivation does not write. For an indefinite integral: the\ncandidate is an antiderivative, with any constant.","type":"string"},{"const":"unmatched","description":"With `depth: form`: the candidate is written as none of the lines. Nothing more is claimed.","type":"string"},{"const":"different","description":"With `depth: value`: the candidate matches no line and equals none, and every comparison was\ndecided: it is not equal to `state`, nor to a later line. For an indefinite integral: the\ncandidate is not an antiderivative.","type":"string"},{"const":"undecided","description":"The candidate matches no line, and the engine could not decide some comparison\n(it neither proved the two lines equal nor refuted it).","type":"string"},{"const":"unknown","description":"A result this client does not know yet.","type":"string"}]},"Steps":{"properties":{"alternatives":{"description":"Other methods that solve the same problem, each with its own verified derivation, when\n`QueryRequest::alternatives` asked for them. Empty when none was asked for or none applies.","items":{"$ref":"#/components/schemas/Alternative"},"type":"array"},"answer":{"anyOf":[{"$ref":"#/components/schemas/Rendered"},{"type":"null"}],"description":"The final answer, also when it is a list, a set or a matrix."},"assumptions":{"description":"Conditions the derivation relies on: `x > 0`, `x != 2`, `a != 0`…","items":{"$ref":"#/components/schemas/Rendered"},"type":"array"},"check":{"anyOf":[{"$ref":"#/components/schemas/Check"},{"type":"null"}]},"cut":{"description":"The narration ran out of its work budget; some sub-problems are `engine` steps.","type":"boolean"},"explanation_version":{"description":"The catalog template version (`TEMPLATE_VERSION`) the explanations were\nrendered with.","format":"uint32","minimum":0,"type":["integer","null"]},"items":{"items":{"$ref":"#/components/schemas/Step"},"type":"array"},"method":{"description":"The method of this derivation, as a rule id of the catalog (`integrate.parts`): the\ntechnique it took at the first choice point of the problem. It titles the main derivation\nbeside its [`alternatives`](Steps::alternatives). Absent when the problem splits before any\nchoice (a sum), has one route, or the derivation is not verified.","type":["string","null"]},"task":{"description":"What was asked: `diff`, `integrate.definite`, `limit`…","type":["string","null"]},"truncated":{"description":"Only a preview was returned (anonymous use).","type":"boolean"},"verified":{"description":"The derivation reproduces the engine's answer. When false, `items` is a\nsingle `engine` step carrying the answer.","type":"boolean"}},"required":["verified","items"],"type":"object"},"SubscriptionInfo":{"properties":{"cancel_at_period_end":{"type":"boolean"},"currency":{"description":"ISO 4217, lowercase: the currency the subscription is billed in (`eur` where the price's table for the\nbuyer's country is in euros). Absent while the server holds no price of the subscription, and from a server\nthat does not send it: neither means US dollars.","type":["string","null"]},"current_period_end":{"type":"string"},"interval":{"$ref":"#/components/schemas/BillingInterval"},"legacy_price":{"anyOf":[{"$ref":"#/components/schemas/LegacyPrice"},{"type":"null"}],"description":"The subscription pays a price that is no longer offered for its plan and interval. Absent on the price offered now."},"plan":{"$ref":"#/components/schemas/PlanId"},"scheduled_change":{"anyOf":[{"$ref":"#/components/schemas/ScheduledChange"},{"type":"null"}],"description":"A plan change that waits for the end of the current period."},"status":{"$ref":"#/components/schemas/SubscriptionStatus"}},"required":["plan","status","interval","current_period_end","cancel_at_period_end"],"type":"object"},"SubscriptionStatus":{"description":"Mirrors Paddle's subscription status.","enum":["active","trialing","past_due","canceled","paused","unknown"],"type":"string"},"SupportRequest":{"additionalProperties":false,"description":"A message to support from the account's console. The topic is the subject; a person's own topic (`other`) is named\nin `other_topic`, which no other topic takes.","properties":{"message":{"type":"string"},"other_topic":{"default":null,"type":["string","null"]},"topic":{"$ref":"#/components/schemas/SupportTopic"}},"required":["topic","message"],"type":"object"},"SupportTopic":{"description":"What a message to support is about: general support first (the menu opens on it), then a wrong answer, then the others, most urgent first, and something else last. The wire names are stable (the web's menu and the facts list them in this order).","enum":["general","results","billing","account","api_keys","other"],"type":"string"},"Surface":{"description":"Where a request came from, taken from the credential and the route, never from a client's word.","oneOf":[{"const":"web","description":"A visitor or a web session.","type":"string"},{"const":"cli","description":"A device `hbc_` token on REST.","type":"string"},{"const":"agents","description":"Anything on `/mcp`, and an OAuth `hbc_` token anywhere.","type":"string"},{"const":"api","description":"An `hbk_` key on REST.","type":"string"},{"const":"unknown","description":"A surface this client does not know yet.","type":"string"}]},"Tag":{"properties":{"id":{"type":"string"},"name":{"description":"In the language of the post's text, else in English.","type":"string"}},"required":["id","name"],"type":"object"},"Template":{"description":"The sentence of a rule. A slot is `{key}`, a bind of the rule; `{?key|text}`\nis `text` only when `key` is bound. [`crate::explain`] renders it.","properties":{"tex":{"description":"The sentence for `Explanation::tex`; the same slots.","type":"string"},"text":{"description":"The sentence for `Explanation::text`.","type":"string"}},"required":["text","tex"],"type":"object"},"Translation":{"description":"Whose text a post's language is.","oneOf":[{"const":"original","description":"The original, in English (`index.md`).","type":"string"},{"const":"author","description":"A translation a person wrote (`index.<language>.md`).","type":"string"},{"const":"machine","description":"A translation made by a machine (`[translation] status = \"machine\"`), which the page says.","type":"string"}]},"Usage":{"description":"What the query cost.","properties":{"balance":{"description":"Credits left for this channel after the charge (absent for anonymous use).","format":"double","type":["number","null"]},"credits":{"format":"double","type":"number"},"limit":{"description":"How many credits that limit allowed; absent when nothing stopped the run.","format":"double","type":["number","null"]},"limited_by":{"anyOf":[{"$ref":"#/components/schemas/LimitSource"},{"type":"null"}],"description":"What stopped the run; absent when nothing did."},"notice":{"anyOf":[{"$ref":"#/components/schemas/UsageNotice"},{"type":"null"}],"description":"Something to tell the person, carried by the one response whose charge crossed its mark; absent from every\nother. Only the web's and the CLI's credits (sessions and CLI sign-ins) have notices."}},"required":["credits"],"type":"object"},"UsageKind":{"description":"What a [`UsageTotal`] counts.","oneOf":[{"enum":["unknown"],"type":"string"},{"const":"query","description":"Engine queries, an ask's included.","type":"string"},{"const":"ask","description":"The model's part of the asks (`POST /v1/ask`).","type":"string"},{"const":"step_check","description":"Checks of a line written under a derivation (`POST /v1/steps/check`).","type":"string"}]},"UsageNotice":{"description":"A notice of a charge ([`Usage::notice`], [`crate::AskUsage::notice`]): each client words it itself. A mark is\ncrossed by exactly one charge of a period (charges of an account are settled one at a time), so a client shows what\nit is given and keeps nothing to show it only once.","oneOf":[{"description":"With this charge the month's credits of the plan, or the free month's, went under `below_percent` percent\nleft: 25, then 10 (a charge that passes both says 10).","properties":{"allowance":{"description":"The month's credits.","format":"double","type":"number"},"below_percent":{"format":"uint8","maximum":255,"minimum":0,"type":"integer"},"kind":{"const":"credits_low","type":"string"},"left":{"description":"What is left of them, in credits.","format":"double","type":"number"},"resets_at":{"description":"When they come back, as [`crate::Balances::next_reset`].","type":"string"}},"required":["kind","below_percent","left","allowance","resets_at"],"type":"object"},{"description":"With this charge the CLI sign-in's daily limit went under `below_percent` percent left (10).","properties":{"below_percent":{"format":"uint8","maximum":255,"minimum":0,"type":"integer"},"kind":{"const":"daily_limit_low","type":"string"},"left":{"description":"What is left of the limit today, in credits.","format":"double","type":"number"},"limit":{"format":"double","type":"number"},"resets_at":{"description":"The end of the UTC day, when it starts again (as `details.resets_at` of a refusal at the limit).","type":"string"}},"required":["kind","below_percent","left","limit","resets_at"],"type":"object"},{"description":"The subscription is past due: its renewal payment failed, and the plan's credits wait for it. The first\ncharge of each UTC day carries it while it lasts.","properties":{"kind":{"const":"renewal_failed","type":"string"},"url":{"description":"The page where the card is updated (`/account#payment-methods` on the site).","type":"string"}},"required":["kind","url"],"type":"object"},{"description":"A notice this client does not know yet.","properties":{"kind":{"const":"unknown","type":"string"}},"required":["kind"],"type":"object"}]},"UsagePeriod":{"description":"How long a [`UsageTotal`] covers.","oneOf":[{"enum":["unknown"],"type":"string"},{"const":"day","description":"A day, in UTC.","type":"string"},{"const":"month","description":"A calendar month, in UTC.","type":"string"}]},"UsageTotal":{"description":"One line of `GET /v1/usage`: what the account spent in one period, on one channel, with one\nAPI key, on one kind of work.","properties":{"channel":{"$ref":"#/components/schemas/Channel"},"count":{"description":"How many were charged.","format":"uint32","minimum":0,"type":"integer"},"credits":{"format":"double","type":"number"},"date":{"description":"The period's first day, `YYYY-MM-DD` (UTC).","type":"string"},"key_id":{"description":"The API key that spent it; absent for the web and the CLI.","type":["string","null"]},"kind":{"$ref":"#/components/schemas/UsageKind"},"period":{"$ref":"#/components/schemas/UsagePeriod"}},"required":["date","period","channel","kind","count","credits"],"type":"object"},"Variant":{"description":"One file of an image: its name (from its bytes, so it never changes: served as immutable) and its size.","properties":{"file":{"type":"string"},"height":{"format":"uint32","minimum":0,"type":"integer"},"width":{"format":"uint32","minimum":0,"type":"integer"}},"required":["file","width","height"],"type":"object"},"Visibility":{"description":"How prominent a function is.","oneOf":[{"const":"core","description":"What a student meets first: suggested and listed first.","type":"string"},{"const":"advanced","description":"A function for a narrower task: suggested after the core ones and listed\nbehind them.","type":"string"},{"const":"internal","description":"A helper of the engine: still read by the parser, never suggested or listed.","type":"string"},{"const":"unknown","description":"A visibility this client does not know yet.","type":"string"}]},"Why":{"description":"The reason for a method, in the two forms of an [`Explanation`].","properties":{"tex":{"description":"The same sentence with math as `$…$` (TeX). Present when TeX was requested.","type":["string","null"]},"text":{"description":"One plain English sentence; math is input syntax in backticks.","type":"string"}},"required":["text"],"type":"object"},"Width":{"description":"How wide a figure is set: within the text (`narrow`), the text's width (`normal`, the default) or wider (`wide`).","enum":["narrow","normal","wide"],"type":"string"}},"securitySchemes":{"bearer":{"description":"`Authorization: Bearer <token>` with an API key (`hbk_…`, created with `POST /v1/keys`) or a CLI token (`hbc_…`, issued by the device login, or by `POST /oauth/token` to an MCP client). A CLI token runs queries, step checks and asks, reads `GET /v1/me` and `GET /v1/usage`, and logs itself out; a device's also lists keys and revokes them, which the token of an MCP client does not. Every other route refuses it with `403`. It spends the plan's credits, the same as the web, up to a daily limit if the person set one, which only a web session changes (`PATCH /v1/keys/{id}`).","scheme":"bearer","type":"http"},"sessionCookie":{"description":"The browser session cookie set when signing in on the web app.","in":"cookie","name":"ory_kratos_session","type":"apiKey"},"sessionToken":{"description":"A web session token, for clients that cannot send the cookie.","in":"header","name":"X-Session-Token","type":"apiKey"}}},"info":{"description":"Evaluate mathematical queries such as `integrate(x*exp(x), x)` and get the result with its verification and, on request, the derivation. Also: accounts, API keys, credits and CLI login.\n\nBodies are JSON, and strict: an unknown field is `400 invalid_request`, and so is a query parameter a route does not take. Every non-2xx response carries an `ErrorBody`, except `503` from `/readyz`. Within v1 changes are additive: ignore unknown fields and unknown enum values.","title":"Hilberon API","version":"1"},"openapi":"3.1.0","paths":{"/healthz":{"get":{"description":"Answers `200` while the process runs. It checks no dependency; use `/readyz` for that.\n\nNo authentication.","operationId":"getHealth","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"enum":["ok"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"The process is up.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Liveness probe","tags":["Service"]}},"/openapi.json":{"get":{"description":"This document.\n\nNo authentication.","operationId":"getOpenApiDocument","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"An OpenAPI 3.1 document.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"OpenAPI document","tags":["Service"]}},"/readyz":{"get":{"description":"Pings the database (2 s timeout). The answer says ready or not, and nothing of versions or dependencies. `503` carries the same body shape, not an `ErrorBody`. Limited per client IP (`429`).\n\nNo authentication.","operationId":"getReadiness","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"enum":["ok","unavailable"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"The database answers.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"properties":{"status":{"enum":["ok","unavailable"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"Not ready: the database does not answer (`status` is `unavailable`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Readiness probe","tags":["Service"]}},"/v1/account":{"delete":{"description":"Erases the person behind the account, for good. The Polar subscription is revoked at once (a renewal charged after the request is refunded in full); from then on every credential of the account (session, CLI token, API key) is refused; the sign-in identity (and so every session) is deleted, and then the Polar customer (deleted and anonymized: its email and name hashed; Polar keeps the orders and invoices the law asks it to), API keys and device logins, the email and the IP addresses of the receipts, and the samples of the account's queries (found by the hash of their text). The credits left are zeroed: they end with the account. The billing records the tax law requires (grants, ledger, receipts, holds, refusals and purchases) are kept for 10 years under a new random account id, so the identity id no longer appears in the database, and are then deleted. The body must repeat the account's email. Nothing is changed when the request fails before the identity is deleted. If the Polar customer or the rows cannot be finished after it, the request still succeeds and the service retries until they are.\n\nOnly a web session that signed in within the last hour may.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"deleteAccount","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}},"description":"The account's email address, as confirmation.","required":true},"responses":{"204":{"description":"The account is deleted.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`confirm` is missing or is not the account's email (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used, or the web session signed in more than an hour ago (`forbidden` with `details.reason` set to `reauthenticate`): sign in again and retry.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account is already being deleted by another request (`conflict`); that one does the work.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A subscription has to be revoked and billing is not configured or Polar is unavailable (`billing_unavailable`), or the sign-in service is unavailable (`overloaded`); nothing was deleted.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Delete the account","tags":["Account"]}},"/v1/account/export":{"get":{"description":"A JSON document with everything held about the account: the account row, what the sign-in service holds about the identity (traits, addresses and the kinds of credential, never a credential; `identity` is `null` when the sign-in service no longer has it) and its sessions (time, method, IP address, user agent), the credit grants and ledger, the usage receipts with the IP address of each, the API keys and CLI tokens (metadata only), the purchases, the refunds the account asked for (`refund_requests`) and the `settings` about the use of queries. The query samples are not included: they are stored apart from the account and are not linked to it. Credits are in credits; times are RFC 3339; a value the service does not hold is `null`. Sent as a download: `Content-Disposition: attachment; filename=\"hilberon-data-YYYY-MM-DD.json\"`, streamed as the rows are read (no `Content-Length`; a download that fails midway ends before its closing brace). One export of an account runs at a time, and two in all; an account starts 10 an hour (`429`, `details.limit` `export`).\n\nOnly a web session may take it; nothing is read for anyone else.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"exportAccount","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExport"}}},"description":"The data.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`rate_limited` (wait `Retry-After` seconds), or `concurrency_limited`: an export of this account is under way.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The sign-in service, which holds the identity and its sessions, is unavailable, or two exports are running (`overloaded`, with `Retry-After`).","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Download the account's data","tags":["Account"]}},"/v1/account/settings":{"get":{"description":"What the person chose about the use of their queries to improve Hilberon: `improve_with_queries` (web and CLI; on by default). A query made with an API key is never kept as a sample, so no setting names it. An answered query of at most 2,000 characters is kept as a sample, apart from the account and without its IP address, key or exact time, only where the setting allows it; a request can refuse for itself with `improve: false`.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"getAccountSettings","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSettings"}}},"description":"The settings.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Account settings","tags":["Account"]},"patch":{"description":"Changes the settings whose fields are present and returns them as they are now. Samples already kept stay until their five years end or the account is deleted. A query made with an API key is never kept, so no field names it (`improve_with_api_queries` is an unknown field, `400`). An account makes 60 changes an hour (`429`, `details.limit` `settings`).\n\n`efforts` sets the effort of a surface (`web`, `cli`, `agents`, `api`) to a level or a whole number of credits (`web` to a level), and `null` clears it, as in `{\"efforts\": {\"cli\": \"deep\", \"agents\": null}}`; a surface left out does not change. A setting is what runs when a request names nothing there and the most a request may name, and a request above it is refused (`details.limited_by` `surface`), never lowered. Unset, the surface's default runs and a request may name up to the plan's or the tier's most. A setting that a downgrade left above those counts as them.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"changeAccountSettings","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSettingsChange"}}},"description":"The settings to change.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSettings"}}},"description":"The settings after the change.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_request`: an unknown field, or an effort above what the plan or the tier allows, with the most in `details.max_credits`.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`forbidden`: this route is for a web session; `efforts` on a Free account (`details.reason` `subscription_required`); `efforts.api` before a purchase of credits (`details.reason` `purchase_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Change the account settings","tags":["Account"]}},"/v1/ask":{"post":{"description":"Reads a problem written in words (`text`, at most 2,000 characters), a photo of it (`image`: a JPEG, PNG or WebP of at most 2 MiB once decoded, in base64), or both, with a language model, which solves it with the engine and writes a short summary. It is not a chat: one problem, one answer, no history. The model writes queries in the language's syntax and the API runs each as a query of the account, as `POST /v1/query` would (holds, fuel, receipts and samples; they run at the ask's level, and `improve: false` keeps them out of the samples). A query whose syntax is wrong is not run, and the model is told why. The queries and calls of the model an ask may make are its effort's (below), and 60 s in all.\n\nThe answer is a stream of Server-Sent Events (`text/event-stream`, never compressed), each `event: <type>` and `data: <the AskEvent as JSON>`, with a comment (`: keep-alive`) every 10 s that nothing else is said: `status` (what the service is doing: `reading`, `solving`, `writing`), `query` (the engine is asked this, `id` naming it in what follows), `answer` (its answer, a `QueryResponse`), `query_failed` (it did not run: a syntax error the model may correct, or a refusal), `text` (the next piece of the summary: Markdown with paragraphs, short lists, bold and TeX in `$…$` and `$$…$$`), then `done` (the id of the main answer, `primary`, when there is one, and what the ask cost, `usage`) or `error` (the ask stopped: the model declined the problem, `forbidden` with `details.reason` `refused`; its reply ran too long, `internal`; the provider is down or the ask took over 60 s, `overloaded`; its credits ran out, `insufficient_credits`; what was spent is charged and is in `usage`).\n\nThe model's tokens are charged in the account's credits, the same that queries spend (`usage.model_credits`), at the price of the model times the offering's cost multiple (2.5), valued at the account's own rate, fixed when the ask starts: the plan's monthly credits over the monthly price the account paid before tax, in US dollars. An account that paid less for its credits is charged more of them for the same model work. A charge is rounded up to a tenth of a credit, with a receipt of its own in `GET /v1/usage`; the queries are charged as queries (`usage.engine_credits`). `effort` is as for `POST /v1/query`, and is each query's: every query the model runs may spend what the effort gives a query on its own, a level's credits or the number named. It also sets how many queries the ask may run and how many calls of the model it may make, the same on every plan: at `standard` 2 queries and 3 calls, at `deep` 4 and 4, at `exhaustive` 6 and 10; `quick` is refused. The model's part costs at most 4,000 credits, at every level and on every plan. Before the stream starts, the most the model could cost is held of the account's credits, as a query's is; each query holds its own when it runs. An ask that the model's bound or a hold cut short says so in `usage.limited_by` (`effort` for the model's bound) and `usage.limit`. However the ask ends, the client gone included, it is charged what it spent and no more. One ask at a time per account; it counts as a request against the plan's requests a second, and so does each of its queries. Neither the text nor the image is kept or logged. The image is read as a file, never decoded: what is not the picture (EXIF and its GPS position, XMP, comments, thumbnails, colour profiles, anything after its end) is taken out before it is sent to the model, and a still picture of at most 8,000 pixels on a side is all that is taken.\n\nThe body is limited to 4.5 MiB (`413 payload_too_large`); it has 30 s to arrive.\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nRequires a web session or a CLI token (`hbc_…`); API keys (`hbk_…`) are refused with `403`.","operationId":"ask","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"description":"The problem: its text, a photo of it, or both.","required":true},"responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"},"x-itemSchema":{"$ref":"#/components/schemas/AskEvent"}}},"description":"The ask's events, as they come, until `done` or `error`.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_request`: an unknown field, no text and no image, an image that is not base64, not of its `media_type`, not a whole file, animated or with a side over 8,000 pixels, `max_credits` in the body, an `effort` that is no level or whole number, a number under 2 or above the most the plan allows (both bounds in `details`), an `effort` above what the account set for the surface (`details.limited_by` `surface`), an `effort` under `standard` (`details.min_effort`, the level to ask at), or a problem whose reading alone may cost more than the model's bound.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No credential, or one that is malformed or revoked (`unauthenticated`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`insufficient_credits`: the account's credits cannot hold what the model may cost (the engine's queries are checked as queries are), `key_limit_reached`: nor can the sign-in's day, or `effort_not_allowed` when `effort` is above what the plan allows. An `insufficient_credits` names its cause in its hint and `details`: when the credits come back (`resets_at`), and for a subscription past due `reason` `renewal_failed` with `url`, the account page's payment methods.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`forbidden`: an API key, an account on Free or Lite (`details.reason` set to `subscription_required`: the Plus and Pro plans may ask), or a subscription period a discount paid in full (`details.reason` set to `price`: with nothing paid there is no rate for a token).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is over 4.5 MiB, the text over 2,000 characters or the image over 2 MiB (`payload_too_large`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`rate_limited` (wait `Retry-After` seconds) or `concurrency_limited` (an ask of the account is already running, `details.limit` 1; or its queries at once are all running, as for `POST /v1/query`).","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`overloaded`: the server has no model configured, the provider is unavailable, or the authentication service is.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Solve a problem in words or a photo","tags":["Query"]}},"/v1/auth/device":{"post":{"description":"Begins the device login (RFC 8628 shape). The CLI shows `user_code` and `verification_uri_complete`, then polls `POST /v1/auth/device/token` no faster than `interval` seconds while the person approves the code in the browser (`POST /v1/auth/device/approve`). A client network starts 5 a minute and has at most 5 codes waiting for approval (an IPv6 /48 eight times both): past that it is `429` with `details.limit` `device` or `device_pending`. Codes are deleted once they expire.\n\nNo authentication.","operationId":"startDeviceLogin","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStartRequest"}}},"description":"Optional; names the device on the approval page and the token.","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorization"}}},"description":"The codes to show and poll with.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid JSON for this endpoint, has an unknown field or a bad value (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Start a CLI login","tags":["Auth"]}},"/v1/auth/device/approve":{"post":{"description":"The signed-in person confirms the code the CLI displayed; `approve: false` denies it. The code is matched ignoring case, spaces and the hyphen. Only a web session (the web's cookie, or `X-Session-Token`) may, never a CLI token; a sign-in from the last hour is not needed, as the token can do less than the session, and the account is mailed the moment a sign-in is approved. An account holds at most 20 CLI sign-ins (live `hbc_` tokens and codes approved but not yet collected). Limited per client IP.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"approveDeviceLogin","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceApproveRequest"}}},"description":"The `user_code` shown by the CLI and the decision.","required":true},"responses":{"204":{"description":"The decision is recorded.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid or `user_code` is malformed (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used, or the session signed in more than an hour ago (`forbidden`, with `details.reason` set to `reauthenticate`): sign in again and retry.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No pending login has this code: it is unknown, expired, already decided or used (`not_found`, one message for all of them).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has 20 CLI sign-ins (`conflict`); sign out of one and approve again. Denying is never refused.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Approve or deny a CLI login","tags":["Auth"]}},"/v1/auth/device/pending":{"get":{"description":"Shows who asked for the code: the client's name, the address it asked from and when. The approval page shows these so the person can tell their own terminal from someone else's. Limited per client IP.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"getPendingDeviceLogin","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The code the CLI displayed, matched ignoring case, spaces and the hyphen.","in":"query","name":"user_code","required":true,"schema":{"examples":["WDJB-MJHT"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePending"}}},"description":"The pending request.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`user_code` is missing or malformed (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No pending login has this code: it is unknown, expired, already decided or used (`not_found`, one message for all of them).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Look up a CLI login before approving it","tags":["Auth"]}},"/v1/auth/device/sign-out-all":{"post":{"description":"Revokes every CLI sign-in of the account, a device's or an OAuth client's, with the logins approved and not collected yet, as a change of password does. API keys stay. Answers the same when nothing was signed in. Only a web session may; no recent sign-in is asked.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"signOutAllDevices","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"204":{"description":"Nothing is signed in any more.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Sign out every device","tags":["Auth"]}},"/v1/auth/device/token":{"post":{"description":"Exchanges a `device_code` for a CLI token (`hbc_…`) once the person approved it. The token is returned once and the code is consumed. The token expires 30 days after its last use, and a year after this sign-in at the latest, however often it is used.\n\nUntil then the answer is a `400` whose error `code` is `authorization_pending` (not approved yet, keep polling), `slow_down` (polling too fast; `details.interval` is the new minimum in seconds), `access_denied` (the person denied it) or `expired_token` (the code is unknown, used or expired; start over).\n\nNo authentication.","operationId":"pollDeviceToken","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenRequest"}}},"description":"The `device_code` from `POST /v1/auth/device`.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceToken"}}},"description":"The CLI token.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Polling is not finished: `authorization_pending`, `slow_down`, `access_denied` or `expired_token`; or the body is not valid (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Poll for the CLI token","tags":["Auth"]}},"/v1/auth/logout":{"post":{"description":"Revokes the CLI token that made this request. Web sessions sign out through the web app; API keys are revoked with `DELETE /v1/keys/{id}`.\n\nRequires a CLI token (`hbc_…`) as the bearer; any other credential is refused with `403`.","operationId":"logout","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"204":{"description":"The token is revoked.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential is not a CLI token (`forbidden`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"bearer":[]}],"summary":"Revoke the current CLI token","tags":["Auth"]}},"/v1/billing/checkout":{"post":{"description":"Opens a Polar checkout for a subscription plan or a one-off purchase of credits, for the account's own customer at Polar, to be paid in your own page's form: Stripe's Payment Element created with `stripe_key` (and `stripe_customer_session`, which shows the cards the customer saved), and Polar's public client endpoints at `api_base` with `client_secret` (`GET`/`PATCH /v1/checkouts/client/{client_secret}` for the amounts and the buyer's country, `POST .../confirm` with a Stripe confirmation token, then `stripe.handleNextAction` when the bank asks for an authentication). The card goes to Stripe, never to this server. Polar is the merchant of record: it charges, works out the tax of the buyer's country inside the price (every price includes it: the total is the price shown) and issues the invoice and the receipt. Credits and plans arrive when Polar confirms the payment (a webhook), usually within seconds. A plan is priced in `currency`, the market of the prices the page shows (`usd`, `eur`, `mxn` or `jpy`), which the subscription keeps for as long as it lasts; credits are priced in US dollars (`usd`), the amount you choose being the total paid, tax included. A card pays the whole dollars from `credits.min_dollars` to `credits.max_dollars` in each payment, as many payments as you like; above that `400 invalid_request` has `details.reason` `above_card_maximum` and names the address to write to for an invoice (a bank transfer). The amount is the one recorded here: a paid order of another amount or currency grants nothing and is refunded in full. There are no discount codes. Needs the account's email verified and `agreed: true` (on your page, the person ticked the box that asks for the purchase to start at once, with the acknowledgement a withdrawal needs, and accepted the Terms of Service: the form asks no consent of its own, and the version accepted is kept with the purchase); 10 checkouts an hour per account (`429`, `details.limit` `checkout`). A checkout nobody pays expires and does nothing; one whose payment failed or whose authentication was abandoned is replaced by a new one.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"createCheckout","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBody"}}},"description":"A plan with its billing interval, or an amount of whole dollars within the range of `GET /v1/billing/plans`, the currency of the prices shown, and `agreed: true`.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolarCheckout"}}},"description":"What the payment form needs: the checkout, its client secret, where Polar's client endpoints are, and Stripe's key and customer session.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid, `agreed` is not `true`, the plan is not purchasable, the currency has no price, or the dollars are not a whole number within the range (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A plan was requested while the account has a subscription, or Polar has a live one for it that has not reached the account yet (`conflict`); change it with `POST /v1/billing/plan`.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured (no access token, credits product or Stripe key), the product is not on sale, or Polar is unavailable or refused the request (`billing_unavailable`, with `Retry-After`).","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Start a checkout","tags":["Billing"]}},"/v1/billing/checkout/{checkout_id}":{"get":{"description":"The same answer as `POST /v1/billing/checkout` for a checkout of the account's own customer that is still open (not paid, not expired), so that a page loaded again goes on with it. Any other checkout, another customer's included, is `404`. Counts toward the `billing_read` limit.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"getCheckout","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The checkout's id (`checkout_id` of the answer that opened it).","in":"path","name":"checkout_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolarCheckout"}}},"description":"What the payment form needs to go on with the checkout.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no open checkout with that id (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Reopen a checkout","tags":["Billing"]}},"/v1/billing/payment-methods":{"get":{"description":"The payment methods Polar keeps for the account's customer: the card a subscription was paid with and the ones added on the account page. The customer's default, which a subscription renews with, comes first and is the `default`; the others follow, newest first. A card is its brand (`visa`, `mastercard`, `amex`, `discover`, `diners`, `jcb`, `unionpay` or `unknown`), last four digits, expiry and the wallet that holds it (`apple_pay`, `google_pay`), never more; another kind is named by its `kind`, with no card fields. An account that never paid has none. Read from Polar each time; 120 reads of these an hour per account (`429`, `details.limit` `billing_read`).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"listPaymentMethods","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SavedPaymentMethod"},"type":"array"}}},"description":"The payment methods.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"The saved payment methods","tags":["Billing"]},"post":{"description":"Saves the card of a Stripe confirmation token for the account's customer at Polar, as its default when `set_default` is true: a subscription then renews with it, and a renewal that failed is charged again at once. When the bank asks for an authentication the answer is `requires_action`: the page makes it with `stripe.handleNextAction({ clientSecret })` and then sends `POST /v1/billing/payment-methods/confirm`. 20 changes of payment methods an hour per account (`429`, `details.limit` `payment_method`).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"addPaymentMethod","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardAdd"}}},"description":"The confirmation token and whether the card becomes the default.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardAdded"}}},"description":"The card is saved (`succeeded`), or waits for the bank's authentication (`requires_action`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid, or the card was refused (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Save a card","tags":["Billing"]}},"/v1/billing/payment-methods/confirm":{"post":{"description":"Finishes saving a card whose bank asked for an authentication, once the page has made it (`stripe.handleNextAction`). Counts toward the `payment_method` limit.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"confirmPaymentMethod","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardConfirm"}}},"description":"The setup intent of the `requires_action` answer and whether the card becomes the default.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardAdded"}}},"description":"The card is saved (`succeeded`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid, or the setup intent is not this account's or was not authenticated (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Finish saving a card","tags":["Billing"]}},"/v1/billing/payment-methods/setup":{"post":{"description":"What the page's card form is created with: Stripe's Payment Element in setup mode, with `stripe_key`, in `currency`. The card typed into it goes to Stripe, never to this server: the page makes a confirmation token of it (`stripe.createConfirmationToken`) and sends it to `POST /v1/billing/payment-methods`. Makes the account's customer at Polar if it has none. The body is not read. 20 changes of payment methods an hour per account (`429`, `details.limit` `payment_method`).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"setupPaymentMethod","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardSetup"}}},"description":"What the card form needs.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured, or no Stripe key is, or Polar is unavailable or refused the request (`billing_unavailable`, with `Retry-After`).","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Prepare the card form","tags":["Billing"]}},"/v1/billing/payment-methods/{id}":{"delete":{"description":"Polar forgets the saved payment method for good. The default, which a subscription that renews is charged to, stays (until another is made the default or the subscription is cancelled): a renewal with nothing to charge would fail. Counts toward the `payment_method` limit.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"removePaymentMethod","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The payment method's `id` from `GET /v1/billing/payment-methods`.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"It is removed.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no payment method with that id (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A subscription is charged to it, one set to end too (`conflict`, `details.reason` `default_payment_method`): make another card the default first.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Remove a payment method","tags":["Billing"]},"patch":{"description":"Makes a saved payment method the customer's default, which the subscription renews with; a renewal that failed is charged again at once. Counts toward the `payment_method` limit.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"setDefaultPaymentMethod","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The payment method's `id` from `GET /v1/billing/payment-methods`.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodChange"}}},"description":"`{\"default\": true}`.","required":true},"responses":{"204":{"description":"It is the default.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid or `default` is not `true` (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no payment method with that id (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Make a card the default","tags":["Billing"]}},"/v1/billing/payments":{"get":{"description":"Every payment of the account, newest first: packs of prepaid credits and the paid transactions of the subscription (its first, its renewals and its plan changes), with the tax, what was refunded and what a dispute took. Kept 10 years from the end of the year of the payment.\n\nEach line has a `refund`: `null` when nothing can be asked for and nothing was, else what the account may do about the payment (`state` `available`, until `until`, for `amount_cents` as it would be now: exactly what a pack refunds, and a withdrawal's less the value of the credits used by then) or what it has done (`pending`, `review`, `succeeded`, `failed`). The server decides: a client shows the button for `available` only and never works out the eligibility itself. A request that could be made again after one that ended is `available` again.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"listPayments","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"How many payments to return, 1 to 100.","in":"query","name":"limit","required":false,"schema":{"default":24,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentLine"},"type":"array"}}},"description":"The payments.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`limit` is outside its range (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"The account's payments","tags":["Billing"]}},"/v1/billing/payments/{id}/receipt":{"get":{"description":"Where Polar shows the payment's receipt, a PDF. The link is asked of Polar each time, since it expires; a receipt Polar is still writing is a `503` with `Retry-After`. A payment made before the move to Polar has none here (`404`).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"getPaymentReceipt","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The payment's `id` from `GET /v1/billing/payments`.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectUrl"}}},"description":"Where to send the browser.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No payment of this account has that id (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"A payment's receipt","tags":["Billing"]}},"/v1/billing/payments/{id}/refund":{"post":{"description":"The refunds of the Terms (section 5). With an empty body `{}`, on a credit pack bought less than 14 days ago (to the instant): its unused credits are taken away at once and refunded, at the price paid for them, rounded down to a cent (the credits taken are worth at least the cents refunded); credits that running queries hold are not refundable now and can be in a second request inside the 14 days. With `{\"withdraw\": true, \"country\": \"MX\", \"consumer\": true}`, on the first payment of a subscription: a consumer's withdrawal, which ends the subscription at once and refunds the payment less the value of the credits used (held ones counted as used), at the price per credit of that payment. It is automatic only when everything is certain: the person is a consumer, the declared country (the EU, the EEA and the UK within 14 days of the payment; Mexico within 5 business days of it, Monday to Friday, counted from the day after, in Mexico City's time) is the one Polar taxed the payment by (its billing address), there is no chargeback, the subscription is the account's live one, nothing else was paid for it, and the account has made no withdrawal before. Otherwise the request is stored as `review` with nothing moved, and support replies by email.\n\nThe refund is asked of Polar after the credits are taken, with the request named in its metadata (Polar takes no idempotency key); Polar works out the tax inside it. Until Polar says it succeeded the request is `pending`. A call Polar does not answer, or Polar's own limit of refunds an hour, leaves the request `pending`, and it is asked again every minute: first Polar's refunds of the order are listed, and the one carrying the request is read, never asked for again (two carrying it, or Polar's own total showing that somebody else refunded the payment meanwhile, is for a person: `review`). After 20 hours a person decides: `review`. A refund Polar refuses or that fails is `409 conflict` with `details.reason` `refused`: a pack's credits are restored from the payment's final state (what Polar has really refunded, plus disputes, so credits for money already returned stay taken); a withdrawal's plan has already ended and cannot be restored, so a person finishes the refund. At most three automatic pack refunds per account in 30 days; a fourth is `review` with nothing moved. A withdrawal needs a sign-in from the last hour (`403` with `details.reason` `reauthenticate`); a pack does not. The answer is `{\"id\", \"kind\", \"state\", \"amount_cents\"}`: `200` with `state` `succeeded` when Polar made the refund, `202` with `pending` or `review`; `GET /v1/billing/payments` shows the state. 5 requests an hour per account (`429`, `details.limit` `refund`).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"refundPayment","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The payment's `id` from `GET /v1/billing/payments`.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundBody"}}},"description":"`{}` for a pack; the withdrawal and what the person declares for a subscription's first payment.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundAnswer"}}},"description":"Polar made the refund (`succeeded`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundAnswer"}}},"description":"The refund waits for Polar or will be asked again (`pending`), or a person decides (`review`: support replies by email).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid for this endpoint (`invalid_request`): an unknown field, a withdrawal without `country` (two letters) or `consumer`, or `country` or `consumer` without `withdraw`.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. For a withdrawal (`withdraw`) the session must also have signed in within the last hour: otherwise `forbidden` with `details.reason` set to `reauthenticate`; sign in again and retry. A pack does not need it.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No payment of this account has that id (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`conflict`, with `details.reason`: `request_open` (another request for the payment is open), `window_closed` (a pack is past its 14 days), `disputed`, `already_refunded` (all of it is refunded), `nothing_to_refund` (the unused credits are worth less than a cent), `withdrawal_only` (a subscription payment without `withdraw`), `not_a_subscription` (`withdraw` on a pack), `not_first_payment` (a renewal or a plan change), or `refused` (Polar refused a pack's refund: the credits are back as the payment's final state says, and Polar's own reason, when it is that the payment is refunded already, is `already_refunded`; `details.state` is `failed`). A withdrawal whose refund Polar refuses after its plan ended is not a `409` but a `202` with `state` `review`.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A withdrawal with `consumer` false (`invalid_request`, status `422`): the right to withdraw is a consumer's; write to support.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Ask for a refund","tags":["Billing"]}},"/v1/billing/plan":{"post":{"description":"Moves the subscription to another plan or billing interval, by the rules of the preview, at the price offered now. From a price no longer offered (`GET /v1/me` `subscription.legacy_price`) the change is made only with `accept_price_change: true`, the person's acceptance that the old price ends and is not offered again; without it the answer is a `409` with `details.reason` `price_change_not_accepted` and `details.legacy_price`, and nothing changes. A change made now is charged at once to the card the subscription renews with and applies only if that charge is paid: a declined card is a `409` with `details.reason` `card_declined`, and a card whose bank asks for an authentication the server cannot make is a `409` with `details.reason` `payment_authentication_required` (make another card the default, or authenticate this one by saving it again); either way the change is dropped and nothing is charged. A change at the end of the period is held by Polar until then (it shows in `GET /v1/me` as `subscription.scheduled_change`): nothing is billed now and the renewal bills the new plan, in the offering version in force when it was asked for. A new change replaces a scheduled one, and a change made now drops it. Cancelling the subscription (`POST /v1/billing/subscription/cancel`) drops a scheduled change.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"changePlan","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeRequest"}}},"description":"The plan and interval to move to.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeResult"}}},"description":"When the change takes effect.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid, the plan is not `lite`, `plus` or `pro`, or the subscription is on that plan and interval already (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no subscription, it is not active or is set to end, the change leaves a price no longer offered and does not accept it (`details.reason` `price_change_not_accepted`, with `details.legacy_price`), the card was declined (`conflict`, `details.reason` `card_declined`), or the bank asks for an authentication (`details.reason` `payment_authentication_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Change the plan","tags":["Billing"]}},"/v1/billing/plan/preview":{"post":{"description":"What moving the subscription to another plan or billing interval would do. A change that lowers neither the plan nor the interval applies now and charges at once the difference for the rest of the period, tax included (a longer interval starts a new period at the change: the new price, less the unused part of the old one): `amount_due_cents` is that charge as Polar's rule prorates it at this second (the old price's unused seconds credited, the new price's charged; Polar prorates again when the change is made), in the minor unit of `currency`: the currency the subscription is billed in, the table of the buyer's country (US dollars, pesos, yen or euros). A lower plan or a shorter interval waits for the end of the paid period (`timing` `period_end`, nothing charged now). A subscription that pays a price no longer offered (`GET /v1/me` `subscription.legacy_price`) keeps it while it keeps its plan and interval; a change takes the new plan at the price offered now, and the preview names the price it leaves (`legacy_price`, its amount in the subscription's currency too), which the change needs accepted. Only an active subscription that is not set to end can change plans. Needs the account's email verified; with the change and keeping the plan, 30 an hour per account (`429`, `details.limit` `plan_change`).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"previewPlanChange","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeRequest"}}},"description":"The plan and interval to move to.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangePreview"}}},"description":"When the change would take effect and what it would charge now.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid, the plan is not `lite`, `plus` or `pro`, or the subscription is on that plan and interval already (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no subscription, or it is not active (a renewal is unpaid: update the payment method) or is set to end (renew it first) (`conflict`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Preview a plan change","tags":["Billing"]}},"/v1/billing/plan/scheduled":{"delete":{"description":"Drops the plan change scheduled for the end of the period: the subscription renews as it is, at the price it pays (a price no longer offered stays). Nothing to drop is not an error.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"keepPlan","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"204":{"description":"No change is scheduled.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no subscription (`conflict`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Keep the current plan","tags":["Billing"]}},"/v1/billing/plans":{"get":{"description":"The price list: plans with their monthly credits, USD prices in cents and limits, and how prepaid credits are sold (the range of dollars a card pays at once, quick picks and the anchors of the curve: between two anchors the rate in credits a dollar goes up in a straight line, and a purchase gets the whole credits of its dollars times it). `plans[].monthly_credits` are the math credits; the prices are the US dollar table's, tax included, and the per-minute limits are the offering's per-second ones times sixty.\n\nNo authentication.","operationId":"listPlans","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pricing"}}},"description":"The price list.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Plans and credit pricing","tags":["Billing"]}},"/v1/billing/subscription/cancel":{"delete":{"description":"A subscription set to end renews again at the end of its period, as before. One that renews already is not an error. Counts toward the `plan_change` limit.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"renewSubscription","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"204":{"description":"The subscription renews.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no subscription that still bills (`conflict`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Renew a cancelled subscription","tags":["Billing"]},"post":{"description":"The subscription ends when the period paid for does, with no further charge and no proration (the Terms, section 4); the plan and its credits stay until then, and `GET /v1/me` says `subscription.cancel_at_period_end`. A plan change scheduled for that moment is dropped. Asked again, nothing changes. The body is not read. Counts toward the `plan_change` limit.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"cancelSubscription","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"204":{"description":"The subscription is set to end.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may. Or the account's email is not verified (`details.reason` set to `email_unverified`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account has no subscription that still bills (`conflict`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Billing is not configured on this server, the product is not on sale, or the payment provider (Polar) is unavailable or refused the request (`billing_unavailable`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Cancel the subscription","tags":["Billing"]}},"/v1/captcha":{"post":{"description":"The web's own: its pages solve a challenge of the site's captcha in the background and send the token they are given here, for a pass, which `POST /v1/query` and `POST /v1/steps/check` ask of an anonymous call or a web session on the Free plan while this server asks for one (`403 captcha_required` without it), and the site's edge of a password sign-in and of a request for a recovery or verification email. The pass is the cookie `hilberon_pass` (`HttpOnly`, `SameSite=Strict`, `Secure` over https, `Path=/`, `Max-Age` 900), for the network of the caller's address (an IPv4 address or an IPv6 /64) and for 15 minutes; a credential sent is checked, and the pass is not its account's. A token is good once. Limited per client IP (20 a minute). A server that asks for no captcha answers `404`. Paid plans, CLI tokens and API keys never need a pass for the engine.\n\nAuthentication is optional; a credential, when sent, must be valid.","operationId":"getCaptchaPass","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptchaRequest"}}},"description":"The token the captcha gave.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptchaPass"}}},"description":"The pass is set (`Set-Cookie`); `expires_at` says when it ends.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid JSON for this endpoint, has an unknown field or a bad value (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A credential was sent but is malformed or revoked (`unauthenticated`), or the key expired (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The token was refused (`captcha_required`): not one the captcha gave, used already or expired. Solve it again.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"This server asks for no captcha (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`overloaded`: the captcha cannot be checked now; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{},{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Trade a solved captcha for a pass","tags":["Query"]}},"/v1/check":{"post":{"description":"Syntax diagnostics for a query without running the engine. Free, and limited per client IP. At most 50 are sent, the errors kept first (`ok` is decided on all of them). These are the diagnostics `POST /v1/query` runs before it reserves credits: `ok` is false exactly when one of them is an error, and the query would then be refused with `syntax_error`, uncharged (a misspelt builtin runs when the query sets `allow_unknown`). A plain `=` between statements and an unknown function close to no builtin are warnings and do not block a query; a function name that looks like a misspelt builtin (`integrat(x^2, x)`, `Sin(x)`: `unknown_function` or `capitalized_function` with the builtin as a fix) is an error, as `POST /v1/query` refuses it without `allow_unknown`; input that reads as words is an error (`reads_as_words`: `Solve the cubic equation x^3 - 1 = 0`, `lim x->0 sin(x)/x`, `Solve x^2 = 4`); and notation from other systems that the engine cannot read is an error with a fix: `Integrate[f, x]` (`square_bracket_call`), `integrate(f, x, 0, 1)` (`integrate_bounds`), `limit(f, x, 0)` (`limit_point`) and `d/dx f` (`derivative_notation`).\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nNo authentication.","operationId":"checkQuery","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}},"description":"The query to check.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResponse"}}},"description":"The diagnostics; `ok` is false when any is an error.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is not valid (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The query is too long (`payload_too_large`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Check a query's syntax","tags":["Query"]}},"/v1/contact":{"post":{"description":"The web's own business form (`/business`): the message is mailed to the company's contact inbox, with `email` as its `Reply-To`, and nothing is ever sent to `email`. Nothing of it is kept but the day's counts. Every field is trimmed and has a cap in characters (`first_name` and `last_name` 80, `email` 254, `company` 120, `phone` 32, `message` 2,000, `source` 200), and no field takes a control character but a line break or a tab in `message`. While this server asks for a captcha, `captcha` is a token of the site's captcha, good once, checked before anything else. A network sends 5 a day and everyone together 200 (`429`, `details.limit` `contact` or `contact_all`, which the form tells apart in plain words). A credential sent is not read.\n\nNo authentication.","operationId":"contactSales","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"description":"The message, and the captcha's token.","required":true},"responses":{"204":{"description":"The message was taken by the mail server.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_request`: not valid JSON for this endpoint or an unknown field, or a field refused, named in `details.field`, with `details.reason` `required`, `too_long` (and `details.max_chars`), `characters` or `invalid` (an `email` mail cannot be written to).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`captcha_required`: no captcha's token, or one the captcha refused (used already, expired). Solve it again.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`overloaded`: the captcha cannot be checked now, or the message could not be mailed (`details.reason` `mail_unavailable`: nothing was sent and nothing counted); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Write to the company about a business's needs","tags":["Contact"]}},"/v1/functions":{"get":{"description":"The functions the query syntax accepts, with their signatures and examples: the same catalog the CLI embeds. `steps` marks the heads that can return a derivation.\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nNo authentication.","operationId":"listFunctions","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FunctionInfo"},"type":"array"}}},"description":"The functions.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Function catalog","tags":["Catalog"]}},"/v1/keys":{"get":{"description":"The live API keys and CLI tokens of the account, newest first. Secrets are never listed. A CLI token has `today`: what it spent in the UTC day and its daily limit, in credits.\n\nRequires a web session or a device's CLI token (`hbc_…`); API keys (`hbk_…`) and the tokens of MCP clients are refused with `403`.","operationId":"listKeys","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"properties":{"today":{"description":"On a CLI token only: what it spent in the UTC day and may spend in it, in credits. `limit` absent: no limit.","properties":{"limit":{"type":"number"},"max_limit":{"description":"Largest custom daily limit from the account's effective subscription version, in credits.","type":"number"},"spent":{"type":"number"}},"required":["spent","max_limit"],"type":"object"}},"type":"object"}]},"type":"array"}}},"description":"The keys.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"An API key or the token of an MCP client was used (`forbidden`); use a web session or a device's CLI token.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"List API keys and CLI tokens","tags":["Keys"]},"post":{"description":"Creates an API key (`hbk_…`) that never expires and has no credit limit unless `expires_in` or `credit_limit` say otherwise. The `secret` is in this response and never again. Only a web session may create a key, of an account that holds prepaid credits a key can spend now (`balances.api` above 0), on any plan: spent, expired or refunded ones do not count, nor a promotion's web half, and a subscription is none (`403` with `details.reason` `purchase_required`). An account holds at most 50 live API keys (CLI logins do not count) and creates 20 an hour (`429`, `details.limit` `key`). A key that has been revoked or has expired is deleted 90 days after its end, and an account keeps at most the 50 that ended last.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"createKey","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"description":"A name of 1 to 64 printable characters, optionally with a lifetime and a credit limit no greater than the available prepaid balance (or 10,000,000 credits).","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedKey"}}},"description":"The key and its secret.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The name is empty, too long or has control characters (invisible and bidirectional-control characters are removed, but for the joiners U+200C and U+200D), `expires_in` or `credit_limit` is out of range, or the body is not valid (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account already has 50 live API keys (`conflict`); revoke one first.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Create an API key","tags":["Keys"]}},"/v1/keys/{id}":{"delete":{"description":"Revokes a key of the account; it stops working at once.\n\nRequires a web session or a device's CLI token (`hbc_…`); API keys (`hbk_…`) and the tokens of MCP clients are refused with `403`.","operationId":"revokeKey","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The key id from `GET /v1/keys`.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"The key is revoked.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"An API key or the token of an MCP client was used (`forbidden`); use a web session or a device's CLI token.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No live key with that id in this account, or the id is not a UUID (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Revoke an API key or CLI token","tags":["Keys"]},"patch":{"description":"Sets what a CLI token, a device's or an MCP client's, may spend in a UTC day: `daily_limit` in credits, from 1 to 10,000,000, or `null` for no limit. By default there is no additional daily limit. A custom limit cannot exceed the monthly credits of the effective subscription version (or 10,000,000 credits); GET /v1/keys reports this as today.max_limit. A limit below what the day has spent stops the token until the day ends. Changes count with the settings' (60 an hour).\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"changeDailyLimit","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The token's id from `GET /v1/keys`.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"daily_limit":{"type":["number","null"]}},"required":["daily_limit"],"type":"object"}}},"description":"The limit in credits, or `null`.","required":true},"responses":{"204":{"description":"The limit is changed.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`daily_limit` is missing or out of range, or the body is not valid (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No live CLI token with that id in this account, or the id is not a UUID (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Change the daily limit of a CLI token","tags":["Keys"]}},"/v1/me":{"get":{"description":"The caller's account, plan, subscription, credit balances (with the prepaid packs that have credits left and the date each ends, `balances.packs`) and limits, and the version of the Terms of Service the account accepted when it was created (`terms_version`, `terms_accepted_at`; absent for accounts older than the record). `subscription.currency` is the currency the subscription is billed in (ISO 4217, lower case: the table of the buyer's country), the one a plan change charges in; it is absent until a price of the subscription is held, which does not mean US dollars. `caller` is what this credential may do now: its `surface`, the level that runs when a request names none (`effort`), the most a request may name (`max_credits`), and for a sign-in what it spent and may spend in the UTC day (`today`). The plan's credits are the web's, the CLI's and MCP's alike: no cap counts what the sign-ins spend apart. The ask has no meter of its own: its model spends the credits above. `limits` say the rate as `requests_per_second` (`requests_per_minute` is that times 60) and `concurrency` in queries at once. `allowed` says what the account may do now (`ask`, `mcp`, `cli_queries`, `api_keys`): clients read it, never the plan's name.\n\nRequires a web session, a CLI token (`hbc_…`) or an API key (`hbk_…`).","operationId":"getMe","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"The account.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Current account","tags":["Account"]}},"/v1/methods":{"get":{"description":"The method and step-rule ids that `methods[].id` and `steps.items[].rule` refer to in query responses. Ids are stable and never reused. A rule row also carries its sentence (`template`, with `{key}` and `{?key|text}` slots), the kind of each bind (`kinds`) and its general formula in TeX (`formula`).\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nNo authentication.","operationId":"listMethods","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MethodInfo"},"type":"array"}}},"description":"The catalog.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Method catalog","tags":["Catalog"]}},"/v1/oauth/authorize":{"get":{"description":"What the consent page `/oauth/authorize` calls with the query string it was opened with, as it came: the parameters of an OAuth authorization request (`response_type`, `client_id`, `redirect_uri`, `code_challenge`, `code_challenge_method`, `resource`, `scope`, `state`). Any other parameter is ignored, and one of these sent twice is refused. A refused request ends on the page, with no redirect to the client. Limited per client IP.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"getOAuthAuthorization","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"client_name":{"type":"string"},"redirect_host":{"type":"string"},"redirect_kind":{"enum":["https","loopback","app"],"type":"string"},"runs_queries":{"type":"boolean"}},"required":["client_name","redirect_host","redirect_kind","runs_queries"],"type":"object"}}},"description":"Who asks and where the code would go. `client_name` is what the client calls itself; `redirect_host` is the host of its redirect, or the name of the application for a private-use scheme; `redirect_kind` is `https`, `loopback` or `app`; `runs_queries` is whether a sign-in of this account runs queries, which on the Free plan it does not.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request cannot be approved (`invalid_request`, with the OAuth error in `details.reason`: `invalid_client`, `invalid_redirect_uri`, `unsupported_response_type`, `invalid_request` or `invalid_target`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Check an OAuth client's request before approving it","tags":["Auth"]},"post":{"description":"The signed-in person answers the request in the query string, which is checked as `GET /v1/oauth/authorize` checks it. An approval makes a short-lived, single-use code, which counts among the account's 20 CLI sign-ins until the client trades it, and mails the account as a device approval does; a sign-in from the last hour is not needed. The answer holds where to send the browser: the client's `redirect_uri` with `code`, `state` and `iss`, or with `error=access_denied` for a denial. The token itself goes out only from `POST /oauth/token`.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"decideOAuthAuthorization","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"approve":{"type":"boolean"}},"required":["approve"],"type":"object"}}},"description":"The decision.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"redirect_to":{"type":"string"}},"required":["redirect_to"],"type":"object"}}},"description":"Where the page sends the browser.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request cannot be approved, as for `GET /v1/oauth/authorize`, or the body is not valid (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The account already holds 20 CLI sign-ins (`conflict`). Denying is never refused.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Approve or deny an OAuth client","tags":["Auth"]}},"/v1/posts/{collection}":{"get":{"description":"The live posts of one of the blog's collections, newest first, without their bodies. Each is in the request's language when it has a text in it, and otherwise in its English original, with `fallback` set and `language` naming it. Images are named by their files, served at `/media/{file}` (on the site's hosts `/api/media/{file}`).\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nNo authentication.","operationId":"listPosts","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"},{"description":"`news` or `guides`.","in":"path","name":"collection","required":true,"schema":{"enum":["news","guides"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostList"}}},"description":"The posts.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such collection (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"A collection's posts","tags":["Posts"]}},"/v1/posts/{collection}/{slug}":{"get":{"description":"One live post with its body, a typed tree of blocks and inlines in which text is text and mathematics is TeX (`body.schema` is its version). A former slug of the post answers it too, with its own `slug`. In the request's language, or else in its English original with `fallback` set.\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nNo authentication.","operationId":"getPost","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"},{"description":"`news` or `guides`.","in":"path","name":"collection","required":true,"schema":{"enum":["news","guides"],"type":"string"}},{"description":"The post's slug, or one of its former ones (`aliases`).","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}},"description":"The post.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such collection, or no such post in its live version (`not_found`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"A post","tags":["Posts"]}},"/v1/query":{"post":{"description":"Evaluates a query and returns the result, the methods that contributed, optionally the verified derivation (`steps: true`, for the heads that `GET /v1/functions` marks with `steps`; every step has an `explanation` written from the catalog's template, with its `tex` variant when `format` asks for `tex`), and what it cost. A derivation that did not finish within its fuel allowance is not returned: the answer is complete and `steps` is a single unverified `engine` step with `cut` set; a higher `effort` gives a longer attempt. With `steps`, `alternatives` (1 to 2; 0, or leaving it out, asks for none, with or without `steps`; for a signed-in caller, an anonymous call that asks for any is refused with `401 unauthenticated`) also derives other methods of the same problem: `steps.method` names the method of the main derivation, and `steps.alternatives` lists up to that many others, each a verified derivation of its own (`method`, `items` explained like the main ones, `answer`, `check`, `assumptions`). There may be fewer, or none, when the problem has no other method that applies. The derivation an earlier request kept for the same `query`, `effort` and `format` (fifteen minutes) is reused, so asking for the other methods of a derivation just shown is charged for them and not for the derivation again. They run under an allowance of fuel of their own: if they do not finish within it, the answer is the main derivation with no `alternatives`, charged in full for the plain answer and the derivation and at half for the attempt, and asking the same again is charged without the attempt. Every evaluated query is a `200`, whatever its `status` (`solved`, `cut`, `partial`, `unevaluated`, `error`); a non-2xx answer means the service refused the request or could not finish it.\n\n`effort` is what the query may use: a level, which sets the search bounds and the most it may spend (`quick` 30 credits, `standard` 300, `deep` 1,000, `exhaustive` 5,000), or a whole number of credits, at least 2, which is the limit and runs at the first level that reaches it. `exhaustive` always runs progressive: it evaluates at `quick` and walks up while a bound cut the answer. A level's credits are a ceiling, not a price, and are lowered to the plan's or the API tier's most when that is less (a visitor's `standard` is 100). Left out, what the account set for the surface runs (`efforts`, `PATCH /v1/account/settings`), or else the surface's default: `standard`, the same on every surface. A `partial` answer says what stopped it in `usage.limited_by` (`effort`, `plan`, `surface`, `day`, `key` or `balance`) and at how many credits in `usage.limit`, a hold that a low balance, the day or a key made smaller included. A `syntax_error` is never charged: the query is checked with the same diagnostics as `POST /v1/check` before any credit is reserved.\n\nThe request body is limited to 64 KiB (`413 payload_too_large`). Anonymous calls are limited per client IP and return a derivation without its steps (`truncated`, and no `items` in any method). So does a web session on the Free plan, since steps are for Lite, Plus and Pro; the query is charged what it ran, and what an API key bought is shown whole. API keys spend the `api` channel; sessions and CLI tokens the `interactive` channel. A query costs a multiple of a tenth of a credit; an API key with a `credit_limit` is never charged beyond it, nor a CLI token beyond its daily limit.\n\nAn answered query of at most 2,000 characters may be kept, apart from the account and without its IP address, key or exact time, as a sample to improve Hilberon: for sessions and CLI tokens unless the account turned `improve_with_queries` off, for anonymous calls always, and never for API keys, whatever the account or the request says. `improve: false` in the body refuses it for this request (see `PATCH /v1/account/settings`).\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nAuthentication is optional; a credential, when sent, must be valid.","operationId":"runQuery","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"description":"The query and how to run it.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}},"description":"The query was evaluated; `status` says how it went.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_request` (empty query, unknown field, `max_credits` or `progressive` in the body, an `effort` that is no level or whole number, a number under 2 or above the most the plan or tier allows, with both bounds in `details` (`min_credits`, `max_credits`), an `effort` above what the account set for the surface, with `details.limited_by` `surface` and `details.max_credits`, `alternatives` of 1 or more without `steps`, or above 2) or `syntax_error` (see `details.diagnostics`, at most 50 with the errors kept first, and `details.diagnostics_omitted` when there were more; this includes the habits of other systems, such as `Integrate[f, x]`, `integrate(f, x, 0, 1)` and `d/dx f`, each with a fix, input that reads as words (`reads_as_words`: `Solve the cubic equation x^3 - 1 = 0`, `lim x->0 sin(x)/x`), and a function name that looks like a misspelt builtin (`integrat(x^2, x)`, `Sin(x)`) unless `allow_unknown` is set).","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A credential was sent but is malformed or revoked (`unauthenticated`), or the key expired (`key_expired`); omit it to query anonymously. `alternatives` of 1 or more without a credential is also `unauthenticated`, with a hint to sign in; nothing is charged.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`insufficient_credits`, `key_limit_reached` when the API key has spent its `credit_limit` or the CLI token its limit for the UTC day (`details` has the `limit`, what it `spent` and what running queries hold, `held`, and for a CLI token `resets_at`), or `effort_not_allowed` when `effort` is above what the plan allows. An `insufficient_credits` names its cause in its hint and `details`: when the credits come back (`resets_at`), and for a subscription past due `reason` `renewal_failed` with `url`, the account page's payment methods.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`forbidden` with `details.reason` set to `subscription_required`: a CLI token on the Free plan, or a number of credits named by an anonymous call or a web session on the Free plan (name a level, or leave `effort` out); nothing is charged. `captcha_required`: an anonymous call, or a web session on the Free plan, without a valid pass from `POST /v1/captcha`, while this server asks for one; nothing is counted or charged. Get a pass and retry. Paid plans, CLI tokens and API keys are never asked.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is over 64 KiB or the query text over 60 KiB (`payload_too_large`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`rate_limited` (the plan's requests a second; wait `Retry-After` seconds) or `concurrency_limited` (the plan's queries at once are all running, whatever their effort; or the credits are on hold for that many running queries; `details.limit` is the queries at once, and `details.held` in credits for the second case; `Retry-After` 1. One at a time without an account). Nothing is charged.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`overloaded`: the engine is busy (nothing is charged), the query ran over 60 s (it still finishes and is billed at its actual cost), or the authentication service is unavailable.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{},{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Evaluate one query","tags":["Query"]}},"/v1/steps/check":{"post":{"description":"Tells a student whether the line they wrote is a line of the verified derivation of a problem. The request names the problem (`query`, as sent to `POST /v1/query` with `steps`), the line the student is on (`state`: the query itself before the first step, then a `state` of the derivation) and the line they wrote (`candidate`), each in the language's syntax, at most 4 KiB, one expression or equation.\n\nThe lines of a derivation are the problem and the line each step with no `parent` leaves behind (its `state`, or its `to` where the engine keeps the problem in a call of its own: `solve(…)`, `solve_all(…)`, `union(…)`, `inverse(…)`, `eigenvalues(…)`, `eigenvectors(…)`, `linear_solve(…)`). Every line of a correct derivation equals the one before it, so the match is made on the form first. With `depth: form` (the default) the candidate is compared with `state` and then with each later line, and the first line it is the same expression as wins: `current` (the line the student is on, written again or in the same form) or `later` (a later line: the `step` it matches, the line as the derivation writes it in `matched`, and the lines it `skipped`). The same expression, the same canonical form and an equation with its sides exchanged or a term moved across the sign are the same form. An operator the line has not carried out (`integrate(…)`, `diff(…)`, `limit(…)`) is part of its form and is not evaluated. A candidate written as no line is `unmatched`, which does not say it is wrong: a derivation is one route among others. With `depth: value` the engine also proves or refutes: a candidate that equals a line without being written as one is `equivalent` (with the `step` and `matched` line it equals), one that equals none is `different` when every comparison was decided and `undecided` when one was not. `evidence` names what the verdict rests on: `identical`, `canonical`, `equation`, `exact`, `value` (the integrals, derivatives and limits had to be carried out), `witness` (a point where the two differ), `shape` or `sampled` (agreement at `points` sample points, which is never a match).\n\nThe derivation is the one `POST /v1/query` has just returned for the same `query`, `effort` and `format`: the API keeps it for fifteen minutes, with the other methods it found (`steps.alternatives`), so a check pays for the comparison only. When it is not kept the check derives it again and pays for that too. The lines of every method the derivation has are compared, the main derivation's first, and `method` in the response names the alternative whose line the candidate matches (absent for a line of the main derivation). `method` in the request, a rule id (the main derivation's own `steps.method`, or an alternative's), compares with the lines of that method only; a name that is not a rule of the catalog is `invalid_request`, free; a method the kept derivation has not derived is derived with the other methods by a signed-in check, which pays for them, and one that is still not among them is `invalid_request`, with that work charged. A check is charged like a small query: a multiple of a tenth of a credit, from a hold of at most what `effort` allows, on the channel of the credential. A check that names no `effort` runs at the level a query that names none runs at, where its derivation was kept, under credits of its own (50, or 100 with `depth: value`, and 15 for each other method it may pay for), never above what the account set for the surface or the plan's most. Finding a line of the derivation costs about a query; `depth: value` costs several times as much. A `syntax_error` in the query, the state or the candidate is never charged, and the diagnostics' spans are those of the text that has the error. As for a query, a refusal of the engine is free and what the engine answered is charged, also when the check is refused afterwards: a derivation it had to make, or one its fuel ran out on (`invalid_request`, charged the fuel used). The candidate is not kept as a sample. Anonymous calls count as a query of the day once the engine ran for them, and compare with the problem only, since a visitor is shown no step (`truncated`).\n\nThe query must be one of the heads that `GET /v1/functions` marks with `steps`.\n\nThe text of the answer is in the language of `Accept-Language` (`Content-Language` says which): the step explanations and the diagnostics, the notes of the engine under an answer (`messages`), the names of the methods, the summaries of the functions. Names of functions, rule ids, codes and an error's `message` and `hint` are the same in every language.\n\nAuthentication is optional; a credential, when sent, must be valid.","operationId":"checkStep","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCheckRequest"}}},"description":"The problem, the line the student is on and the line they wrote.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCheckResponse"}}},"description":"The candidate was compared; `result` says how it relates to the derivation.","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_request` (an empty or compound line, a query with no derivation, an `effort` refused as for `POST /v1/query`, a `method` the derivation does not have) or `syntax_error` (see `details.diagnostics`; nothing is charged).","headers":{"Content-Language":{"$ref":"#/components/headers/ContentLanguage"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A credential was sent but is malformed or revoked (`unauthenticated`), or the key expired (`key_expired`); omit it to check anonymously.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`insufficient_credits`, `key_limit_reached` or `effort_not_allowed` when `effort` is above what the plan allows. An `insufficient_credits` names its cause in its hint and `details`: when the credits come back (`resets_at`), and for a subscription past due `reason` `renewal_failed` with `url`, the account page's payment methods.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`forbidden` (`subscription_required`) and `captcha_required`, as for `POST /v1/query`.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The body is over 64 KiB, the query text over 60 KiB or a line over 4 KiB (`payload_too_large`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`rate_limited` (wait `Retry-After` seconds) or `concurrency_limited`, as for `POST /v1/query`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`overloaded`: the engine is busy (nothing is charged), the check ran over 60 s (it still finishes and is billed at its actual cost), or the authentication service is unavailable.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{},{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Check a line of a derivation","tags":["Query"]}},"/v1/support":{"post":{"description":"The account console's support form: the message is mailed to the company's support inbox with the account's id, address and plan, and its address as the `Reply-To`; the account is the session's. Nothing of it is kept but the day's counts. The topic is the subject (the mail's subject is `Support: ` and the topic's English name): one of `general` (general support, the form's first choice), `results`, `billing`, `account`, `api_keys` or `other`, and with `other` a required `other_topic` of 80 characters at most that names it (`Support: Other — <name>`), which no other topic takes. `message` has 4,000 characters at most; both are trimmed, and neither takes a control character but a line break or a tab in `message`. An account sends 5 a day and every account together 500 (`429`, `details.limit` `support` or `support_all`: the first is the account's own day, the second the inbox's, for everyone); each refusal leaves one line in the log naming the form and the limit and nothing else.\n\nRequires a web session; CLI tokens (`hbc_…`) and API keys (`hbk_…`) are refused with `403`.","operationId":"writeToSupport","parameters":[{"$ref":"#/components/parameters/HilberonClient"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequest"}}},"description":"The topic (with its own name when it is `other`) and the message.","required":true},"responses":{"204":{"description":"The message was taken by the mail server.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_request`: not valid JSON for this endpoint, an unknown field or topic, or a field refused, named in `details.field`, with `details.reason` `required`, `too_long` (and `details.max_chars`), `characters` or `not_allowed` (`other_topic` with another topic).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A CLI token or an API key was used (`forbidden`); only a web session may.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`overloaded`: the message could not be mailed (`details.reason` `mail_unavailable`: nothing was sent and nothing counted), or a dependency is unavailable; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"sessionCookie":[]},{"sessionToken":[]}],"summary":"Write to support","tags":["Contact"]}},"/v1/usage":{"get":{"description":"Totals of the account, newest first: per day (UTC) or per month, by channel, API key (on the `api` channel) and kind (`query`, `ask` for the model's part of an ask, `step_check`). No row is kept per query. Days are kept for the current month and the 12 before it; older months are one total each. The months answered sum the recent days.\n\nRequires a web session, a CLI token (`hbc_…`) or an API key (`hbk_…`).","operationId":"listUsage","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"`day` (the default) or `month`.","in":"query","name":"period","required":false,"schema":{"default":"day","enum":["day","month"],"type":"string"}},{"description":"How many days (1 to 400, 30 by default) or months (1 to 120, 12 by default) back, the current one included.","in":"query","name":"limit","required":false,"schema":{"maximum":400,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UsageTotal"},"type":"array"}}},"description":"The totals.","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`period` is neither `day` nor `month`, or `limit` is outside its range (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Missing, malformed or revoked credentials (`unauthenticated`; a session credential that is no longer valid has `details.reason` set to `session`), or a key past its expiry (`key_expired`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"426":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The CLI named by `x-hilberon-client` is older than the minimum in `x-hilberon-min-cli` (`upgrade_required`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests from this client (`rate_limited`); wait `Retry-After` seconds. `details.limit` names the limit that was hit: `ip` (all endpoints, per client network), `query` (requests that run the engine, per second), `anonymous_day`, `check`, `auth`, `device`, `device_pending`, `device_code`, `session` (session credentials the sign-in service has not accepted lately, per client network), `checkout`, `payment_method`, `billing_read`, `plan_change`, `refund`, `key`, `settings`, `export`, `captcha`, `contact`, `contact_all`, `support`, `support_all` or `ready`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request timed out or a dependency is unavailable (`overloaded`); retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[{"bearer":[]},{"sessionCookie":[]},{"sessionToken":[]}],"summary":"What the account spent, per day or month","tags":["Account"]}},"/v1/webhooks/polar":{"post":{"description":"Receives Polar's events; for Polar only. Authenticated by the Standard Webhooks headers (`webhook-id`, `webhook-timestamp`, `webhook-signature`), not by a credential. An event is applied once per `webhook-id`; one that changes nothing answers `ignored`.\n\nNo authentication.","operationId":"receivePolarWebhook","parameters":[{"$ref":"#/components/parameters/HilberonClient"},{"description":"The event's id, the same on every delivery of it.","in":"header","name":"webhook-id","required":true,"schema":{"type":"string"}},{"description":"When it was signed, in Unix seconds; refused more than 5 minutes away from the server's clock.","in":"header","name":"webhook-timestamp","required":true,"schema":{"type":"string"}},{"description":"`v1,<base64>` (several, separated by spaces): the HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the endpoint's secret.","in":"header","name":"webhook-signature","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"A Polar event (`{type, timestamp, data}`), exactly as received.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"outcome":{"enum":["applied","duplicate","ignored"],"type":"string"},"received":{"type":"boolean"}},"required":["received","outcome"],"type":"object"}}},"description":"The event was applied, was already applied (`duplicate`) or changed nothing (`ignored`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The signature is missing, wrong or stale, or the body is not an event (`invalid_request`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unexpected server failure (`internal`).","headers":{"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Webhooks are not configured or Polar is unavailable (`billing_unavailable`); Polar retries.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"x-hilberon-min-cli":{"$ref":"#/components/headers/MinCli"}}}},"security":[],"summary":"Polar webhook","tags":["Billing"]}}},"servers":[{"url":"https://api.hilberon.com"}],"tags":[{"description":"Health probes and this document.","name":"Service"},{"description":"Evaluate and check queries.","name":"Query"},{"description":"Functions and methods the engine knows.","name":"Catalog"},{"description":"The caller's account, balances and usage, and the right to export and erase them.","name":"Account"},{"description":"API keys and CLI tokens.","name":"Keys"},{"description":"CLI device login and logout, and the consent of an OAuth client.","name":"Auth"},{"description":"Plans, prepaid credits and payments.","name":"Billing"},{"description":"The blog's collections and their posts, as the site shows them.","name":"Posts"},{"description":"Messages to the company: the business form and support.","name":"Contact"}]}