Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

API reference

Generated from the API's own OpenAPI document, version 1. Base URL: https://api.hilberon.com

Conventions and versioning

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.

Bodies 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.

Request headers

Request headers
NameDescription
Accept-LanguageThe 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.
x-hilberon-clientIdentifies the CLI, as hilberon-cli/<semver>. A CLI older than the server's minimum is refused with 426 upgrade_required.

Authentication

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}).

Each endpoint below says which credentials it takes:

  • none: anonymous calls are accepted, limited per client network
  • bearer: Authorization: Bearer with an API key (hbk_…) or a sign-in token (hbc_…)
  • web session: the web app's own sign-in, which programs do not use

Endpoints

POST /v1/query

Evaluate one query

Credentials: none, bearer, web session

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.

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.

The 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.

An 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).

The 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.

Authentication is optional; a credential, when sent, must be valid.

Request body

POST /v1/query · Request body
FieldTypeDescription
allow_unknownbooleanRun the query even when a function name looks like a misspelt builtin (integrat for integrate, Sin for sin), which is otherwise refused free of charge with the checker's suggestion. Only for a function of the caller's own.
alternativesinteger or nullHow many other methods to derive besides the main one (Steps::alternatives). 0, or leaving it out, asks for none, with or without steps; 1 to MAX_ALTERNATIVES need steps, and without it, or above the most, the request is invalid. An anonymous request that asks for any is refused (unauthenticated). There may be fewer: only methods that apply and whose derivation is verified are listed. They are charged like the rest of the query, the attempt at half if the fuel cut it.
effortEffortChoice or nullWhat the query may use: a level, for how far the engine searches and the credits it may spend (Effort::credits), or a whole number of credits, the limit, at the first level whose credits reach it. exhaustive starts at quick and escalates while a bound cut the answer. When absent, the account's setting for the surface runs, or the surface's default. The plan's ceilings apply.
formatarray of FormatRenderings of every returned expression; ["input"] when absent.
improveboolean or nullfalse keeps this query out of the samples Hilberon keeps to improve the engine, whatever the account's settings say. It can only refuse: true or absent leaves the decision to the account (signed in) or to the default (anonymous).
queryrequiredstringThe query in Hilberon syntax, e.g. integrate(x*exp(x), x).
stepsbooleanAlso return the verified derivation when the query supports it.

Responses

POST /v1/query · Responses
StatusBodyDescription
200application/json QueryResponseThe query was evaluated; status says how it went.
400application/json ErrorBodyinvalid_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).
401application/json ErrorBodyA 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.
402application/json ErrorBodyinsufficient_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.
403application/json ErrorBodyforbidden 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.
413application/json ErrorBodyThe body is over 64 KiB or the query text over 60 KiB (payload_too_large).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyrate_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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyoverloaded: 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.

POST /v1/check

Check a query's syntax

Credentials:

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).

The 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.

No authentication.

Request body

POST /v1/check · Request body
FieldTypeDescription
queryrequiredstring

Responses

POST /v1/check · Responses
StatusBodyDescription
200application/json CheckResponseThe diagnostics; ok is false when any is an error.
400application/json ErrorBodyThe body is not valid (invalid_request).
413application/json ErrorBodyThe query is too long (payload_too_large).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.

POST /v1/steps/check

Check a line of a derivation

Credentials: none, bearer, web session

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.

The 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).

The 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).

The query must be one of the heads that GET /v1/functions marks with steps.

The 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.

Authentication is optional; a credential, when sent, must be valid.

Request body

POST /v1/steps/check · Request body
FieldTypeDescription
candidaterequiredstringThe line the student wrote, in the language's syntax: an expression or an equation.
depthStepCheckDepth or nullHow far to go to match the candidate; form when absent.
effortEffortChoice or nullWhat the check may use, as crate::QueryRequest::effort: its level is the effort of the derivation the lines come from, so it must be the level the derivation was asked at. When absent the level is standard, and the check may spend 50 credits for form and 100 for value, and 15 more for each other method it may pay for, under the same ceilings. It bounds the spending and not the charge: a check pays what it uses.
formatarray of FormatRenderings of the matched line; ["input"] when absent.
methodstring or nullCompare with the lines of this method only, a rule id of the catalog (Steps::method of the main derivation, or Alternative::method of one of its alternatives). Absent: the lines of every method the derivation has are compared, the main one first.
queryrequiredstringThe problem, as sent to POST /v1/query with steps: integrate(x*exp(x), x).
staterequiredstringThe line the student is on, in the language's syntax. It is the query itself before the first step, and otherwise a line of the derivation as the response of /v1/query gives it (Step.state).

Responses

POST /v1/steps/check · Responses
StatusBodyDescription
200application/json StepCheckResponseThe candidate was compared; result says how it relates to the derivation.
400application/json ErrorBodyinvalid_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).
401application/json ErrorBodyA credential was sent but is malformed or revoked (unauthenticated), or the key expired (key_expired); omit it to check anonymously.
402application/json ErrorBodyinsufficient_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.
403application/json ErrorBodyforbidden (subscription_required) and captcha_required, as for POST /v1/query.
413application/json ErrorBodyThe body is over 64 KiB, the query text over 60 KiB or a line over 4 KiB (payload_too_large).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyrate_limited (wait Retry-After seconds) or concurrency_limited, as for POST /v1/query.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyoverloaded: 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.

POST /v1/ask

Solve a problem in words or a photo

Credentials: bearer, web session

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.

The 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).

The 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.

The body is limited to 4.5 MiB (413 payload_too_large); it has 30 s to arrive.

The 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.

Requires a web session or a CLI token (hbc_…); API keys (hbk_…) are refused with 403.

Request body

POST /v1/ask · Request body
FieldTypeDescription
effortEffortChoice or nullWhat the whole question may use, the model and its queries in one pool, as crate::QueryRequest::effort; the same default and ceilings. Below what the first model call needs the ask is refused, and details.min_effort names the level that is enough.
imageAskImage or null
improveboolean or nullfalse keeps the ask's engine queries out of the samples. It can only refuse, as crate::QueryRequest::improve.
textrequiredstringWhat the person wrote; may be empty when there is an image. At most MAX_ASK_TEXT_CHARS characters.

Responses

POST /v1/ask · Responses
StatusBodyDescription
200text/event-stream AskEventThe ask's events, as they come, until done or error.
400application/json ErrorBodyinvalid_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.
401application/json ErrorBodyNo credential, or one that is malformed or revoked (unauthenticated).
402application/json ErrorBodyinsufficient_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.
403application/json ErrorBodyforbidden: 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).
413application/json ErrorBodyThe body is over 4.5 MiB, the text over 2,000 characters or the image over 2 MiB (payload_too_large).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyrate_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).
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyoverloaded: the server has no model configured, the provider is unavailable, or the authentication service is.

GET /v1/functions

Function catalog

Credentials:

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.

The 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.

No authentication.

Responses

GET /v1/functions · Responses
StatusBodyDescription
200application/json array of FunctionInfoThe functions.
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.

GET /v1/methods

Method catalog

Credentials:

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).

The 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.

No authentication.

Responses

GET /v1/methods · Responses
StatusBodyDescription
200application/json array of MethodInfoThe catalog.
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.

GET /v1/me

Current account

Credentials: bearer, web session

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.

Requires a web session, a CLI token (hbc_…) or an API key (hbk_…).

Responses

GET /v1/me · Responses
StatusBodyDescription
200application/json MeThe account.
401application/json ErrorBodyMissing, 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).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyThe request timed out or a dependency is unavailable (overloaded); retry after Retry-After seconds.

GET /v1/usage

What the account spent, per day or month

Credentials: bearer, web session

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.

Requires a web session, a CLI token (hbc_…) or an API key (hbk_…).

Query parameters

GET /v1/usage · Query parameters
NameTypeDescription
period"day" or "month"day (the default) or month.
limitintegerHow many days (1 to 400, 30 by default) or months (1 to 120, 12 by default) back, the current one included.

Responses

GET /v1/usage · Responses
StatusBodyDescription
200application/json array of UsageTotalThe totals.
400application/json ErrorBodyperiod is neither day nor month, or limit is outside its range (invalid_request).
401application/json ErrorBodyMissing, 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).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyThe request timed out or a dependency is unavailable (overloaded); retry after Retry-After seconds.

GET /v1/keys

List API keys and CLI tokens

Credentials: bearer, web session

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.

Requires a web session or a device's CLI token (hbc_…); API keys (hbk_…) and the tokens of MCP clients are refused with 403.

Responses

GET /v1/keys · Responses
StatusBodyDescription
200application/json array of ApiKey and objectThe keys.
401application/json ErrorBodyMissing, 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).
403application/json ErrorBodyAn API key or the token of an MCP client was used (forbidden); use a web session or a device's CLI token.
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyThe request timed out or a dependency is unavailable (overloaded); retry after Retry-After seconds.

POST /v1/keys

Create an API key

Credentials: web session

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.

Requires a web session; CLI tokens (hbc_…) and API keys (hbk_…) are refused with 403.

Request body

POST /v1/keys · Request body
FieldTypeDescription
credit_limitnumber or nullMost credits the key may spend in total, from 1 to 10,000,000. Absent: no limit.
expires_ininteger or nullSeconds until the key expires, from 3,600 (one hour) to 31,622,400 (366 days). Absent: the key never expires.
namerequiredstring

Responses

POST /v1/keys · Responses
StatusBodyDescription
201application/json CreatedKeyThe key and its secret.
400application/json ErrorBodyThe 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).
401application/json ErrorBodyMissing, 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).
403application/json ErrorBodyA CLI token or an API key was used (forbidden); only a web session may.
409application/json ErrorBodyThe account already has 50 live API keys (conflict); revoke one first.
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyThe request timed out or a dependency is unavailable (overloaded); retry after Retry-After seconds.

PATCH /v1/keys/{id}

Change the daily limit of a CLI token

Credentials: web session

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).

Requires a web session; CLI tokens (hbc_…) and API keys (hbk_…) are refused with 403.

Request body

PATCH /v1/keys/{id} · Request body
FieldTypeDescription
daily_limitrequirednumber or null

Query parameters

PATCH /v1/keys/{id} · Query parameters
NameTypeDescription
idstringThe token's id from GET /v1/keys.

Responses

PATCH /v1/keys/{id} · Responses
StatusBodyDescription
204The limit is changed.
400application/json ErrorBodydaily_limit is missing or out of range, or the body is not valid (invalid_request).
401application/json ErrorBodyMissing, 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).
403application/json ErrorBodyA CLI token or an API key was used (forbidden); only a web session may.
404application/json ErrorBodyNo live CLI token with that id in this account, or the id is not a UUID (not_found).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyThe request timed out or a dependency is unavailable (overloaded); retry after Retry-After seconds.

DELETE /v1/keys/{id}

Revoke an API key or CLI token

Credentials: bearer, web session

Revokes a key of the account; it stops working at once.

Requires a web session or a device's CLI token (hbc_…); API keys (hbk_…) and the tokens of MCP clients are refused with 403.

Query parameters

DELETE /v1/keys/{id} · Query parameters
NameTypeDescription
idstringThe key id from GET /v1/keys.

Responses

DELETE /v1/keys/{id} · Responses
StatusBodyDescription
204The key is revoked.
401application/json ErrorBodyMissing, 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).
403application/json ErrorBodyAn API key or the token of an MCP client was used (forbidden); use a web session or a device's CLI token.
404application/json ErrorBodyNo live key with that id in this account, or the id is not a UUID (not_found).
426application/json ErrorBodyThe CLI named by x-hilberon-client is older than the minimum in x-hilberon-min-cli (upgrade_required).
429application/json ErrorBodyToo 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.
500application/json ErrorBodyUnexpected server failure (internal).
503application/json ErrorBodyThe request timed out or a dependency is unavailable (overloaded); retry after Retry-After seconds.

Errors

Every answer that is not a 2xx carries this body:

Errors
FieldTypeDescription
coderequiredErrorCode
detailsany
hintstring or nullWhat to do next, written for a person or an agent.
messagerequiredstring

Codes

Codes
CodeHTTPChargedWhat to do
syntax_error400NoFix the query. details.diagnostics lists each problem with its place and, often, a fix. POST /v1/check gives the same diagnostics.
invalid_request400NoFix the request: message names the field or value. An effort outside what the credential may name comes with the bounds in details.
payload_too_large413NoSend a smaller body. Each endpoint below says its limit.
unauthenticated401NoSend a valid credential: Authorization: Bearer with an API key or a sign-in token. A revoked or unknown token is refused the same way.
key_expired401NoThe key is past its expires_at. Create a new key, or sign in again with hilberon login.
forbidden403NoThis credential may not do this. details.reason, when there is one, says why (see the reasons below).
captcha_required403NoOnly anonymous calls and the Free plan on the web are asked: get a pass from POST /v1/captcha and retry. API keys and sign-in tokens are never asked.
insufficient_credits402NoAdd credits, or name a lower effort. An account whose email is not verified has no credits until it is.
key_limit_reached402NoThe API key spent its credit_limit, or the sign-in its daily limit: details has limit, spent, held and resets_at. Wait for resets_at, create a key with a higher limit, or raise the sign-in's limit in Settings → Devices.
effort_not_allowed402NoThe plan does not reach this effort (details.max_effort). Name a lower one, or move to a plan that has it.
upgrade_required426NoUpdate the CLI: it is older than the version in X-Hilberon-Min-Cli.
rate_limited429NoWait Retry-After seconds. details.limit names the limit.
concurrency_limited429NoToo much is running at once for this account: wait for a request in flight to finish, then retry. There is no Retry-After.
overloaded503Only a run cut at its deadline, for the fuel it usedRetry after Retry-After seconds.
billing_unavailable503NoBilling is not available now. Retry after Retry-After seconds.
upstream_unavailable502, 503Perhaps: check GET /v1/usageThe service is not reachable. Retry later, waiting longer each time: there is no Retry-After.
upstream_timeout504Perhaps: the request may have runCheck GET /v1/usage before you repeat a costly request.
not_found404NoNo such endpoint, key or code. Check the path and the id.
conflict409NoThe account's state does not allow it now, such as a key past the most an account may hold. details.reason, when there is one, says why.
internal500Perhaps: check GET /v1/usageRetry once. If it fails again, write to support@hilberon.com with the time and the request.
authorization_pending400NoDevice login: the person has not approved the code yet. Keep polling at the interval.
slow_down400NoDevice login: poll more slowly, every details.interval seconds.
access_denied400NoDevice login: the person denied the request. Stop polling.
expired_token400NoDevice login: the code expired. Start again.
unknownanyAs its statusNever sent: it is how a client built for this version reads a code a later server adds. Act on the HTTP status.

Reasons

forbidden, unauthenticated and conflict may name a reason in details.reason:

Reasons
ReasonCodeWhat to do
sessionunauthenticatedThe web session is no longer valid. Sign in again.
subscription_requiredforbiddenThe Free plan does not include it: asks, and the queries of a CLI sign-in, need Plus or Pro. On Free, name an effort level, not a number of credits.
purchase_requiredforbiddenAPI keys need prepaid credits held now: buy credits, then retry. A subscription's credits do not count.
priceforbiddenAsks need a subscription period that was paid for; one a discount paid in full cannot ask. Queries still run.
refusedforbiddenIn an ask's error event: the model declined the problem. Put it another way, or write it as a query.
ran_outconflictMCP only: the same query came back partial and was sent again with no more credits. Nothing was charged; a higher effort is a new run, and it is charged.

What is charged

  • A query that runs is charged for the work the engine did, whatever its answer's status: solved, cut, partial, unevaluated or error. A step check is charged the same way.
  • POST /v1/check, the catalogs and the account's own routes cost nothing.
  • A refusal costs nothing: a 400, 401, 402, 403, 404, 409, 413, 426 or 429 comes before any credit is held.
  • A run cut short is charged the fuel it used until it stopped: one past its deadline (503 overloaded), or one whose client closed the connection.
  • An ask is charged what it spent, however it ends: its model's tokens and its queries, each with a receipt in GET /v1/usage.
  • After a 504 upstream_timeout the request may have run and been charged: check GET /v1/usage before you repeat a costly one.

Retries and idempotency

  • The API takes no idempotency key: a request sent again runs again.
  • A query sent again is charged again, as if it ran, even when its answer comes from a result kept from an earlier run.
  • 429 rate_limited and every 503 of the API carry Retry-After: wait that many seconds.
  • 429 concurrency_limited carries Retry-After too: a request in flight must finish first, so wait at least that long.
  • 502 and 503 upstream_unavailable come from in front of the API, without Retry-After: retry later, waiting longer each time.
  • A broken ask or MCP stream cannot be resumed: a retry is a new call, with its own charge.
  • GET requests change nothing and can be repeated.

MCP

POST https://api.hilberon.com/mcp is a remote MCP server over Streamable HTTP. It keeps nothing between two requests, and has tools only.

Every request needs Authorization: Bearer: an API key (hbk_, prepaid credits), or a sign-in token (hbc_) of the CLI or of an MCP client, which signs in with OAuth in the browser (the plan's credits, on Plus and Pro).

A tool call is the endpoint it names: the same limits, holds, charges and errors. A call that names no effort runs at standard.

A failure is a tool result, not a protocol error: isError: true, the error as text in content, and the error body below in structuredContent. Only a tool that does not exist is a protocol error.

How to connect each MCP client is on the developers page.

Tools

Tools
ToolRunsSpends
hilberon_queryPOST /v1/querycredits
hilberon_checkPOST /v1/checknothing
hilberon_check_stepPOST /v1/steps/checkcredits
hilberon_functionsthe catalog of GET /v1/functions, searchednothing
hilberon_guidethe language guide: what a query looks like, what it costs and what it answersnothing
hilberon_accountGET /v1/menothing

Types

The schemas the endpoints above send and answer, from the document.

Allowed

What the account may do now, as the server decides it (Me::allowed). A client reads these and never the plan's name: what each plan allows is the offering's, and changes without a client.

Allowed
FieldTypeDescription
api_keysrequiredbooleanThe account can make API keys now: it holds prepaid credits.
askrequiredbooleanThe credential of the request may ask (POST /v1/ask): the same as Me::ask. An API key never does.
cli_queriesrequiredbooleanA CLI sign-in (hilberon login) runs queries and step checks, not only reads the account.
mcprequiredbooleanAn MCP client signs in with this account and runs queries (/mcp, hbc_ tokens of an OAuth client).

Alternative

Another way to solve the problem of a Steps: a method and the derivation it gives. It is listed only when its derivation is verified, so it has no verified of its own.

Alternative
FieldTypeDescription
answerRendered or nullThis method's answer. It can be written differently from the main one: two antiderivatives can differ by a constant.
assumptionsarray of RenderedConditions this derivation relies on.
checkCheck or null
itemsrequiredarray of StepThe steps of this method, numbered and linked by parent like the main derivation's.
methodrequiredstringThe method, as a rule id of the catalog (integrate.substitution): the first choice where this derivation differs from the main one. Its catalog name titles it.

ApiError

ApiError
FieldTypeDescription
coderequiredErrorCode
detailsany
hintstring or nullWhat to do next, written for a person or an agent.
messagerequiredstring

ApiKey

ApiKey
FieldTypeDescription
created_atrequiredstring
credit_limitnumber or nullCredits the key may spend in total; at the limit queries are refused with key_limit_reached. Absent: no limit (CLI tokens have none).
credits_spentnumberCredits queries made with this key have been charged so far.
expires_atstring or nullFrom then on the key is refused with key_expired. Absent: it never expires.
idrequiredstring
kindrequiredKeyKind
last_used_atstring or null
namerequiredstring
prefixrequiredstringThe visible start of the secret, e.g. hbk_3fA9.

AskEvent

One event of an ask's stream: event: <type> and data: <this, as JSON>.

One of:

What the service is doing now.

AskEvent
FieldTypeDescription
phaserequiredAskPhase
typerequired"status"

The engine is asked query (Hilberon syntax); id names it in the events that follow.

AskEvent
FieldTypeDescription
idrequiredinteger
queryrequiredstring
typerequired"query"

The answer to query id, as POST /v1/query gives it.

AskEvent
FieldTypeDescription
idrequiredinteger
responserequiredQueryResponse
typerequired"answer"

Query id did not run (the model may send a corrected one).

AskEvent
FieldTypeDescription
errorrequiredApiError
idrequiredinteger
typerequired"query_failed"

The next piece of the summary, as it is written.

AskEvent
FieldTypeDescription
deltarequiredstring
typerequired"text"

The ask ended: the id of the main answer, when there is one, and what it cost.

AskEvent
FieldTypeDescription
primaryinteger or null
typerequired"done"
usagerequiredAskUsage

The ask stopped; what was spent is charged.

AskEvent
FieldTypeDescription
errorrequiredApiError
typerequired"error"
usageAskUsage or null

An event this client does not know yet.

AskEvent
FieldTypeDescription
typerequired"unknown"

AskImage

A picture of the problem, at most MAX_ASK_IMAGE_BYTES once decoded.

AskImage
FieldTypeDescription
datarequiredstringThe image's bytes in base64, without a data: prefix.
media_typerequiredAskImageType

AskImageType

The format of an AskImage, as its media type.

"image/jpeg" or "image/png" or "image/webp"

AskPhase

What the service is doing while it answers an ask.

AskPhase
ValueDescription
"unknown"
"reading"The model reads the text and the image.
"solving"The engine is asked.
"writing"The model writes the summary.

AskRequest

POST /v1/ask body (web sessions on Plus and Pro; Lite has no ask): a problem in words, a picture of it, or both.

AskRequest
FieldTypeDescription
effortEffortChoice or nullWhat the whole question may use, the model and its queries in one pool, as crate::QueryRequest::effort; the same default and ceilings. Below what the first model call needs the ask is refused, and details.min_effort names the level that is enough.
imageAskImage or null
improveboolean or nullfalse keeps the ask's engine queries out of the samples. It can only refuse, as crate::QueryRequest::improve.
textrequiredstringWhat the person wrote; may be empty when there is an image. At most MAX_ASK_TEXT_CHARS characters.

AskUsage

What an ask cost, in credits: the model's part and the engine's queries.

AskUsage
FieldTypeDescription
balancenumber or nullCredits left for this channel after the charge.
creditsrequirednumbermodel_credits and engine_credits together.
engine_creditsrequirednumber
limitnumber or nullHow many credits that limit allowed; absent when nothing stopped the ask.
limited_byLimitSource or nullWhat stopped the ask; absent when nothing did.
model_creditsrequirednumber
noticeUsageNotice or nullThe notice of a charge of this ask, its model's or one of its queries' (whose Answer events never carry one): the last when several crossed a mark.

Balances

Spendable credits by source. interactive and api are what each channel can spend right now.

Balances
FieldTypeDescription
apirequirednumber
freerequirednumber
free_claimed_elsewherebooleanThis month's free credits went to another account at the same mailbox (one account a mailbox a month: an account deleted and made again, or one at an alias of the address), so free stays 0 until next_reset.
grantednumber or nullWhat the plan's month and the month's free credits granted, spent or not: interactive is what is left of them (with any other credits the web and the CLI spend). After a plan changed within the month it is less than a month of the new plan. None for a payload that lacks it.
interactiverequirednumber
next_resetstring or nullWhen the plan's credits come back: the end of the subscription's month where there is one, else of the month's free credits.
packsarray of PrepaidPackThe prepaid packs with credits left, the first to end first: prepaid is theirs, and each ends on its own date. Absent when there are none.
prepaidrequirednumber
subscriptionrequirednumber

BillingInterval

"month" or "year" or "unknown"

BindKind

What a bind of a step holds, so a client knows how to show it.

BindKind
ValueDescription
"expression"
"symbol"
"equation"
"matrix"
"number"
"form"A form named by the rule: an indeterminate form such as 0/0, a trigonometric identity…
"direction"The side of a one-sided limit, as a word: right or left. It is not math, so the explanation sets it in running text without delimiters ("on the right side").
"list"A list of values. A list that is a math span of its own in a sentence is written as an enumeration, each item in a span (2 and 3): see crate::explain.
"unknown"A kind this client does not know yet.

CallerLimits

What a credential may do now: its plan's or tier's limits with the account's setting for the surface it is on, as the API decides them (Me::caller).

CallerLimits
FieldTypeDescription
effortrequiredEffortThe highest level a request may name.
max_creditsrequiredintegerThe most a question may spend, in whole credits.
surfacerequiredSurface
todayCallerToday or nullWhat it spent today, for a credential with a day to count.

CallerToday

What a credential spent today and what it may, in credits.

CallerToday
FieldTypeDescription
limitnumber or nullAbsent when the day has no limit.
spentrequirednumber

Channel

Which product pays for a request: interactive (web session or CLI token) spends subscription and free credits only; api (API key) spends prepaid credits only.

"interactive" or "api" or "unknown"

ChannelLimits

ChannelLimits
FieldTypeDescription
apirequiredLimitsAPI keys.
interactiverequiredLimitsWeb session and CLI login.

Check

Check
FieldTypeDescription
kindrequiredCheckKind
pointsinteger or null

CheckKind

How strongly an answer was verified, strongest first.

CheckKind
ValueDescription
"unknown"
"exact_residual"Substituting the answer left exactly zero.
"pullback_identity"A chain-rule identity.
"numeric"Passed a sampled numeric check (points says how many).
"by_construction"A named theorem was applied without recomputation.

CheckRequest

POST /v1/check body.

CheckRequest
FieldTypeDescription
queryrequiredstring

CheckResponse

POST /v1/check response. ok is false when any diagnostic is an error.

CheckResponse
FieldTypeDescription
diagnosticsrequiredarray of Diagnostic
okrequiredboolean

CreateKeyRequest

POST /v1/keys

CreateKeyRequest
FieldTypeDescription
credit_limitnumber or nullMost credits the key may spend in total, from 1 to 10,000,000. Absent: no limit.
expires_ininteger or nullSeconds until the key expires, from 3,600 (one hour) to 31,622,400 (366 days). Absent: the key never expires.
namerequiredstring

CreatedKey

The only response that ever contains the secret.

CreatedKey
FieldTypeDescription
keyrequiredApiKey
secretrequiredstring

Diagnostic

Diagnostic
FieldTypeDescription
argsobjectThe values of the slots of the sentences id names, by name.
coderequiredstringStable machine code, e.g. unknown_function, arity, unclosed_bracket.
fixesarray of Fix
hintstring or nullHow to fix it, written for a person or an agent.
idstring or nullWhich sentences message and hint are, so that a client can write them in another language: the id of the pair in hilberon-assist's tables, which is code or code and a variant (arity.primed), with args for their {{name}} slots. message and hint stay English. Absent when the diagnostic has no translation to offer.
messagerequiredstring
severityrequiredSeverity
spanrequiredSpan

Effort

How far the engine's searches may go, and with Effort::credits what a question may spend. The credits stay the only runtime limit; effort bounds the shape of the searches (degrees, candidates, dimensions).

Effort
ValueDescription
"quick"
"standard"
"deep"
"exhaustive"
"unknown"An effort this client does not know yet. Only responses carry it: a request that names one is refused.

EffortChoice

A level, or a whole number of credits: the limit, at the first level whose credits reach it.

EffortChoice
ValueDescription
"quick"
"standard"
"deep"
"exhaustive"

EffortReport

The effort an answer was computed at and whether more effort could change it.

EffortReport
FieldTypeDescription
cutrequiredbooleanA bound refused some search, so a larger effort may answer more.
levelrequiredEffort
lifts_atEffort or nullThe cheapest effort at which the answer could change.

EngineMessage

EngineMessage
FieldTypeDescription
headrequiredstring
textrequiredstring

ErrorBody

{"error": {...}}

ErrorBody
FieldTypeDescription
errorrequiredApiError

ErrorCode

Stable machine-readable error codes.

ErrorCode
ValueDescription
"invalid_request"
"payload_too_large"
"unauthenticated"
"forbidden"
"insufficient_credits"
"effort_not_allowed"
"upgrade_required"
"rate_limited"
"concurrency_limited"
"overloaded"
"not_found"
"conflict"
"internal"
"unknown"
"syntax_error"details.diagnostics holds crate::Diagnostics. Nothing was charged.
"captcha_required"The request needs a fresh pass from POST /v1/captcha (the engine, anonymous or on the Free plan, from the web). Nothing was charged.
"key_expired"The API key or CLI token is past its expires_at. Create a new key or run hilberon login.
"key_limit_reached"The API key has spent its credit_limit. details holds limit and spent, in credits. Nothing was charged.
"billing_unavailable"Billing is not set up on this server, or the product is not on sale. Not a temporary overload: retrying does not help until the operator configures it.
"upstream_unavailable"The API, or the identity service behind it, is down or not reachable. Only the edge answers it (with a 503 or a 502), never the API itself. Retry later.
"upstream_timeout"The API, or the identity service behind it, took too long to answer. Only the edge answers it (504), never the API itself. The request may still have run and been charged: check the usage before repeating a costly one.
"authorization_pending"Device login: the user has not approved the code yet.
"slow_down"Device login: poll more slowly.
"access_denied"Device login: the user denied the request.
"expired_token"Device login: the code expired; start again.

EvidenceKind

What the verdict rests on.

EvidenceKind
ValueDescription
"identical"The two are the same expression.
"canonical"The two are the same in the engine's canonical form (a sum in another order).
"exact"The engine proved the difference of the two zero, exactly.
"value"The two have the same value once the integrals, derivatives and limits in them are carried out.
"equation"Two equations were compared: the same relation, a term moved across, a constant multiple, or equal solution sets of a polynomial equation.
"witness"A point where a certified evaluation of the two differs: they are not the same.
"shape"The two have different kinds (an equation and an expression), or different lengths.
"sampled"The two agree at sample points (points says how many). Evidence, never a proof.
"unknown"Evidence this client does not know yet.

Explanation

A step in words: the rule's template with the step's binds filled in.

Explanation
FieldTypeDescription
texstring or nullThe same sentences with math as $…$ (TeX). Present when TeX was requested.
textrequiredstringOne or two plain English sentences; math is input syntax in backticks.
whyWhy or nullWhy a reader would choose this method: one sentence, rendered from the rule's why template. Absent on bookkeeping rules, which make no choice.

Fix

A text edit that fixes a diagnostic.

Fix
FieldTypeDescription
argsobjectThe values of the slots of the sentence code names, by name.
codestring or nullWhich sentence title is, so that a client can write it in another language (use, remove_space...): the id of the sentence in hilberon-assist's tables, with args for its {{name}} slots. Absent when the title has no translation to offer.
replacementrequiredstring
spanrequiredSpan
titlerequiredstring

Format

A rendering of an expression.

Format
ValueDescription
"input"The engine's surface syntax; it can be sent back as a query.
"tex"LaTeX for display. Not accepted as input.

FunctionAccepts

One thing a parameter accepts, with a way to write it.

FunctionAccepts
FieldTypeDescription
examplerequiredstringAn argument of that kind written in the language: x^2 - 4 = 0.
textrequiredstringWhat it is, as a phrase: an equation, a list of variables.

FunctionInfo

One entry of GET /v1/functions: a builtin of the language, as hilberon_assist::catalog documents it.

FunctionInfo
FieldTypeDescription
aliasesrequiredarray of string
categoryrequiredstring
describedbooleanThe summary and the examples were written for this function. When it is false they are what the catalog could say from the name alone (a summary may be empty), and a client may say the function has no description yet.
examplesrequiredarray of stringOne runnable example per variant that matters.
namerequiredstring
signaturesrequiredarray of stringThe label of each variant: the forms the function is called with.
stepsbooleanThe head can return steps (it is in STEPS_HEADS).
summaryrequiredstring
variantsarray of FunctionVariantEach form of a call with its parameters: what each one accepts and means. signatures is these labels, in order, and examples the examples of all of them.
visibilityVisibilityHow prominent the function is: a client suggests and lists core first, keeps advanced one step behind and never offers internal.

FunctionParam

A parameter of a FunctionVariant.

FunctionParam
FieldTypeDescription
aboutrequiredstringWhat the argument means for this function, in one short sentence; empty when the catalog has nothing to say.
acceptsrequiredarray of FunctionAcceptsWhat it accepts, one entry for each alternative; empty when unknown.
labelrequiredstringAs written in the label: f, x = a..b, order = n, ....

FunctionVariant

One form of a call: solve(equations, variables, domain = real|complex).

FunctionVariant
FieldTypeDescription
aboutrequiredstringWhat this form does, in a few words; empty when the summary says it.
examplesrequiredarray of stringCalls of this form that run, the one that shows it best first.
labelrequiredstringThe call written with its parameters, as the signature help shows it.
paramsrequiredarray of FunctionParamThe parameters in order: one for each argument written in label.

KeyKind

KeyKind
ValueDescription
"unknown"
"api"hbk_…, channel api.
"cli"hbc_… issued by hilberon login, channel interactive.

LegacyPrice

A price a subscription keeps after the plan's price changed: what it pays every interval for plan, for as long as it keeps both. Any change of plan or interval leaves it for the price offered then, and is made only when the request accepts that (PlanChangeRequest::accept_price_change).

LegacyPrice
FieldTypeDescription
amount_centsrequiredintegerWhat it bills each interval, tax included, in the minor unit of currency (cents; yen for jpy).
currencystringISO 4217, lowercase: the currency the subscription is billed in (eur where the price's table for the buyer's country is in euros). A server that did not send it meant US dollars.
intervalrequiredBillingInterval
planrequiredPlanId

LimitSource

What set the limit a run or a refusal met (Usage::limited_by, details.limited_by).

LimitSource
ValueDescription
"effort"The effort the request ran at: a level's credits, or the number it named.
"plan"The most a question may spend on the plan or the API tier (crate::Limits::max_credits).
"surface"The account's setting for the surface (crate::AccountSettings::efforts).
"day"The daily limit of the sign-in.
"key"The credit limit of the API key.
"balance"What was left of the balance.
"unknown"A limit this client does not know yet.

Limits

What a principal may do on one channel.

Limits
FieldTypeDescription
concurrencyrequiredintegerThe queries a principal may have under way at once: a query or a step check holds one slot, whatever its effort, an ask's model part none.
max_creditsrequiredintegerThe most a question may spend on this plan or tier, in whole credits, whatever its effort. Also read from default_max_credits, the name the field had.
max_effortrequiredEffort
requests_per_minuterequiredintegerThe requests a minute: requests_per_second times 60, for a client that counts in minutes. The server counts requests in whole seconds; read Limits::per_second.
requests_per_secondintegerThe most requests a second, counted in fixed one-second windows. 0 when a payload says only requests_per_minute: Limits::per_second reads either.

Me

GET /v1/me

Me
FieldTypeDescription
allowedAllowed or nullWhat the account may do now, as the server decides it. None for a payload that lacks it.
api_tierrequiredinteger0 without purchases; grows with lifetime purchases (API rate limits).
askbooleanThis account may ask now (POST /v1/ask): its plan has the ask (Plus and Pro; Free and Lite do not) and the server offers it. False when a payload lacks it. Allowed::ask says it too.
balancesrequiredBalances
callerCallerLimits or nullWhat the credential of this request may do now. None for a payload that lacks it.
emailstring or null
email_verifiedrequiredboolean
idrequiredstring
limitsrequiredChannelLimits
planrequiredPlanId
subscriptionSubscriptionInfo or null
terms_accepted_atstring or null
terms_versionstring or nullThe terms of service version the user accepted; absent before acceptance is recorded.

MethodInfo

MethodInfo
FieldTypeDescription
bindsrequiredarray of stringKeys this rule fills in a step's bind.
formulastring or nullThe rule's general formula in TeX, for example \int u\,dv = uv - \int v\,du.
idrequiredstring
kindrequiredMethodKind
kindsarray of array of anyThe kind of each bind. Every key of binds has one on a rule.
namerequiredstring
routinebooleanA routine rule: bookkeeping a textbook states without dwelling on it, so a client may fold it at the brief and standard levels of detail and show it at the full one. The rule of thumb: the step applies a law or a lookup, or tidies up, and takes no decision a student must follow (linearity, a constant or a table lookup, the power rule, simplify, collecting like terms or the result). A step that carries the method is not routine: a technique, a choice, a row operation, a factoring, the solving of an equation, a check. Rule rows only; the engine's own rows are never routine.
templateTemplate or nullThe sentence of the step; absent on engine algorithms and the fallback.
whyTemplate or nullWhy a reader would choose this method: one sentence, in the syntax of template, for the rules where a choice is made (a technique, a form of the answer, a case). Absent on bookkeeping rules and on rules that only carry out a decision made before them. It may use only binds that template needs, so it renders whenever the step does. explain renders it into Explanation::why.

MethodKind

MethodKind
ValueDescription
"rule"A textbook rule a person would write as a step.
"algorithm"An engine algorithm with no hand-written counterpart (Risch, Hermite…).
"fallback"A step the derivation could not narrate; the engine's value is shown as is.

MethodRef

A method or rule that contributed to the result; ids come from crate::catalog::METHODS.

MethodRef
FieldTypeDescription
idrequiredstring

PlanId

PlanId
ValueDescription
"free"
"plus"
"pro"
"unknown"
"lite"Engine only, for personal use: no ask.

PrepaidPack

A pack of prepaid credits bought for API keys (Balances::packs). What is left of it on expires_at ends then and cannot be extended.

PrepaidPack
FieldTypeDescription
amountrequirednumberCredits bought.
expires_atrequiredstring
remainingrequirednumberCredits left.

QueryError

Why the engine rejected a query (status: error).

QueryError
FieldTypeDescription
kindrequiredstring
messagerequiredstring

QueryRequest

POST /v1/query body.

QueryRequest
FieldTypeDescription
allow_unknownbooleanRun the query even when a function name looks like a misspelt builtin (integrat for integrate, Sin for sin), which is otherwise refused free of charge with the checker's suggestion. Only for a function of the caller's own.
alternativesinteger or nullHow many other methods to derive besides the main one (Steps::alternatives). 0, or leaving it out, asks for none, with or without steps; 1 to MAX_ALTERNATIVES need steps, and without it, or above the most, the request is invalid. An anonymous request that asks for any is refused (unauthenticated). There may be fewer: only methods that apply and whose derivation is verified are listed. They are charged like the rest of the query, the attempt at half if the fuel cut it.
effortEffortChoice or nullWhat the query may use: a level, for how far the engine searches and the credits it may spend (Effort::credits), or a whole number of credits, the limit, at the first level whose credits reach it. exhaustive starts at quick and escalates while a bound cut the answer. When absent, the account's setting for the surface runs, or the surface's default. The plan's ceilings apply.
formatarray of FormatRenderings of every returned expression; ["input"] when absent.
improveboolean or nullfalse keeps this query out of the samples Hilberon keeps to improve the engine, whatever the account's settings say. It can only refuse: true or absent leaves the decision to the account (signed in) or to the default (anonymous).
queryrequiredstringThe query in Hilberon syntax, e.g. integrate(x*exp(x), x).
stepsbooleanAlso return the verified derivation when the query supports it.

QueryResponse

POST /v1/query response, 200 for every evaluated query whatever its status.

QueryResponse
FieldTypeDescription
checkCheck or null
effortrequiredEffortReport
errorQueryError or null
idrequiredstringThis answer's id, for support. The service keeps it nowhere: usage is kept as totals per day.
messagesarray of EngineMessage
methodsarray of MethodRef
resultRendered or null
statusrequiredStatus
stepsSteps or null
steps_availablebooleanWhether the same query with steps gives a derivation: the engine narrates problems of this shape (solve of one equation, not yet of a system). FunctionInfo.steps says it for a head, this for the query. False when a payload lacks it.
usagerequiredUsage

Rendered

One expression in the renderings the request asked for.

Rendered
FieldTypeDescription
inputstring or null
texstring or null

ScheduledChange

The plan and interval a subscription moves to at at, the end of its current period.

ScheduledChange
FieldTypeDescription
atrequiredstring
intervalrequiredBillingInterval
planrequiredPlanId

Severity

Severity
ValueDescription
"hint"
"unknown"
"error"The engine would reject the query; sending it wastes credits.
"warning"The query parses but probably does not mean what was intended.

Span

A byte range of the query text (UTF-8). Editors that index UTF-16 code units convert at their boundary.

Span
FieldTypeDescription
endrequiredinteger
startrequiredinteger

Status

What happened to a query that reached the engine.

Status
ValueDescription
"solved"A result was produced: a closed form or the engine's numeric/asymptotic fallback.
"cut"No full answer, and an effort bound refused some search: retry at effort.lifts_at.
"partial"The credits ran out (Usage::limited_by says which limit). At exhaustive, result is the last completed effort's answer.
"unevaluated"No closed form was found and nothing was cut.
"error"The engine rejected the query; see error.
"unknown"A status this client does not know yet.

Step

One step of a verified derivation. No prose: clients explain the step from rule and bind.

Step
FieldTypeDescription
bindobjectThe rule's data: u, dv, du, v for parts; u, du for substitution…
explanationExplanation or nullThe step in words, rendered by the API from the rule's catalog template; the engine never fills it.
idrequiredinteger
methodstring or nullFor engine steps: the engine method that produced the value, when known.
onrequiredRenderedThe expression the rule is applied to.
parentinteger or nullThe step whose sub-expression this one works on.
rulerequiredstringA rule id from the catalog, or engine for a step the derivation could not narrate.
stateRendered or nullThe whole expression after this step, remaining integrals included.
toRendered or nullWhat on became.

StepCheckDepth

How far a check goes to match the candidate with a line.

StepCheckDepth
ValueDescription
"form"Is the candidate written as a line of the derivation? Cheap. The default.
"value"Also: when it is written as none, does it equal one? Proves and refutes, and can cost several times as much.

StepCheckRequest

POST /v1/steps/check body.

StepCheckRequest
FieldTypeDescription
candidaterequiredstringThe line the student wrote, in the language's syntax: an expression or an equation.
depthStepCheckDepth or nullHow far to go to match the candidate; form when absent.
effortEffortChoice or nullWhat the check may use, as crate::QueryRequest::effort: its level is the effort of the derivation the lines come from, so it must be the level the derivation was asked at. When absent the level is standard, and the check may spend 50 credits for form and 100 for value, and 15 more for each other method it may pay for, under the same ceilings. It bounds the spending and not the charge: a check pays what it uses.
formatarray of FormatRenderings of the matched line; ["input"] when absent.
methodstring or nullCompare with the lines of this method only, a rule id of the catalog (Steps::method of the main derivation, or Alternative::method of one of its alternatives). Absent: the lines of every method the derivation has are compared, the main one first.
queryrequiredstringThe problem, as sent to POST /v1/query with steps: integrate(x*exp(x), x).
staterequiredstringThe line the student is on, in the language's syntax. It is the query itself before the first step, and otherwise a line of the derivation as the response of /v1/query gives it (Step.state).

StepCheckResponse

POST /v1/steps/check response.

StepCheckResponse
FieldTypeDescription
cappedbooleanThe check reached the credits of its effort before it could decide, so result is undecided and nothing is known of the candidate: the engine was not given enough to try, which is not the engine failing to prove or refute. The derivation is kept, so a retry with a higher effort pays for the comparison only.
cutbooleanThe derivation had only the engine's one step (its budget ran out), so only state and the answer could be compared.
evidenceEvidenceKind or nullThe kind of evidence the verdict rests on: for current and later that the candidate is the line's expression (identical or canonical); for equivalent the proof that it equals the line; for different what told it from state; for undecided sampled when the two agreed at sample points, else absent.
idrequiredstringThis answer's id, for support. The service keeps it nowhere: usage is kept as totals per day.
matchedRendered or nullThe line the candidate matches or equals, as the derivation writes it (absent for current).
methodstring or nullThe method whose line the candidate matches, when it is an alternative of the main derivation (Alternative::method). Absent for a line of the main derivation.
pointsinteger or nullFor sampled evidence: the number of points at which the two agreed.
resultrequiredStepCheckResult
skippedintegerFor later: the lines of the derivation between state and the matched one, which the candidate skips.
stepinteger or nullThe step whose line the candidate matches: Step.id. For current, the step that produced state when state is one of its lines (absent for the problem itself); for later and equivalent, the step whose line it is.
truncatedbooleanOnly the first steps of the derivation were compared (anonymous use).
usagerequiredUsage

StepCheckResult

How the candidate relates to the derivation.

StepCheckResult
ValueDescription
"current"The candidate is state written again, or written in the same form (a sum in another order): no step was made.
"later"The candidate is a later line of the derivation, in its form: step says which.
"equivalent"The candidate is written as no line, but equals one in value (an expanded form of a factored line, the answer with the integral carried out): step and matched say which. It is a correct line that the derivation does not write. For an indefinite integral: the candidate is an antiderivative, with any constant.
"unmatched"With depth: form: the candidate is written as none of the lines. Nothing more is claimed.
"different"With depth: value: the candidate matches no line and equals none, and every comparison was decided: it is not equal to state, nor to a later line. For an indefinite integral: the candidate is not an antiderivative.
"undecided"The candidate matches no line, and the engine could not decide some comparison (it neither proved the two lines equal nor refuted it).
"unknown"A result this client does not know yet.

Steps

Steps
FieldTypeDescription
alternativesarray of AlternativeOther methods that solve the same problem, each with its own verified derivation, when QueryRequest::alternatives asked for them. Empty when none was asked for or none applies.
answerRendered or nullThe final answer, also when it is a list, a set or a matrix.
assumptionsarray of RenderedConditions the derivation relies on: x > 0, x != 2, a != 0…
checkCheck or null
cutbooleanThe narration ran out of its work budget; some sub-problems are engine steps.
explanation_versioninteger or nullThe catalog template version (TEMPLATE_VERSION) the explanations were rendered with.
itemsrequiredarray of Step
methodstring or nullThe method of this derivation, as a rule id of the catalog (integrate.parts): the technique it took at the first choice point of the problem. It titles the main derivation beside its [alternatives](Steps::alternatives). Absent when the problem splits before any choice (a sum), has one route, or the derivation is not verified.
taskstring or nullWhat was asked: diff, integrate.definite, limit…
truncatedbooleanOnly a preview was returned (anonymous use).
verifiedrequiredbooleanThe derivation reproduces the engine's answer. When false, items is a single engine step carrying the answer.

SubscriptionInfo

SubscriptionInfo
FieldTypeDescription
cancel_at_period_endrequiredboolean
currencystring or nullISO 4217, lowercase: the currency the subscription is billed in (eur where the price's table for the buyer's country is in euros). Absent while the server holds no price of the subscription, and from a server that does not send it: neither means US dollars.
current_period_endrequiredstring
intervalrequiredBillingInterval
legacy_priceLegacyPrice or nullThe subscription pays a price that is no longer offered for its plan and interval. Absent on the price offered now.
planrequiredPlanId
scheduled_changeScheduledChange or nullA plan change that waits for the end of the current period.
statusrequiredSubscriptionStatus

SubscriptionStatus

Mirrors Paddle's subscription status.

"active" or "trialing" or "past_due" or "canceled" or "paused" or "unknown"

Surface

Where a request came from, taken from the credential and the route, never from a client's word.

Surface
ValueDescription
"web"A visitor or a web session.
"cli"A device hbc_ token on REST.
"agents"Anything on /mcp, and an OAuth hbc_ token anywhere.
"api"An hbk_ key on REST.
"unknown"A surface this client does not know yet.

Template

The sentence of a rule. A slot is {key}, a bind of the rule; {?key|text} is text only when key is bound. crate::explain renders it.

Template
FieldTypeDescription
texrequiredstringThe sentence for Explanation::tex; the same slots.
textrequiredstringThe sentence for Explanation::text.

Usage

What the query cost.

Usage
FieldTypeDescription
balancenumber or nullCredits left for this channel after the charge (absent for anonymous use).
creditsrequirednumber
limitnumber or nullHow many credits that limit allowed; absent when nothing stopped the run.
limited_byLimitSource or nullWhat stopped the run; absent when nothing did.
noticeUsageNotice or nullSomething to tell the person, carried by the one response whose charge crossed its mark; absent from every other. Only the web's and the CLI's credits (sessions and CLI sign-ins) have notices.

UsageKind

What a UsageTotal counts.

UsageKind
ValueDescription
"unknown"
"query"Engine queries, an ask's included.
"ask"The model's part of the asks (POST /v1/ask).
"step_check"Checks of a line written under a derivation (POST /v1/steps/check).

UsageNotice

A notice of a charge (Usage::notice, crate::AskUsage::notice): each client words it itself. A mark is crossed by exactly one charge of a period (charges of an account are settled one at a time), so a client shows what it is given and keeps nothing to show it only once.

One of:

With this charge the month's credits of the plan, or the free month's, went under below_percent percent left: 25, then 10 (a charge that passes both says 10).

UsageNotice
FieldTypeDescription
allowancerequirednumberThe month's credits.
below_percentrequiredinteger
kindrequired"credits_low"
leftrequirednumberWhat is left of them, in credits.
resets_atrequiredstringWhen they come back, as crate::Balances::next_reset.

With this charge the CLI sign-in's daily limit went under below_percent percent left (10).

UsageNotice
FieldTypeDescription
below_percentrequiredinteger
kindrequired"daily_limit_low"
leftrequirednumberWhat is left of the limit today, in credits.
limitrequirednumber
resets_atrequiredstringThe end of the UTC day, when it starts again (as details.resets_at of a refusal at the limit).

The subscription is past due: its renewal payment failed, and the plan's credits wait for it. The first charge of each UTC day carries it while it lasts.

UsageNotice
FieldTypeDescription
kindrequired"renewal_failed"
urlrequiredstringThe page where the card is updated (/account#payment-methods on the site).

A notice this client does not know yet.

UsageNotice
FieldTypeDescription
kindrequired"unknown"

UsagePeriod

How long a UsageTotal covers.

UsagePeriod
ValueDescription
"unknown"
"day"A day, in UTC.
"month"A calendar month, in UTC.

UsageTotal

One line of GET /v1/usage: what the account spent in one period, on one channel, with one API key, on one kind of work.

UsageTotal
FieldTypeDescription
channelrequiredChannel
countrequiredintegerHow many were charged.
creditsrequirednumber
daterequiredstringThe period's first day, YYYY-MM-DD (UTC).
key_idstring or nullThe API key that spent it; absent for the web and the CLI.
kindrequiredUsageKind
periodrequiredUsagePeriod

Visibility

How prominent a function is.

Visibility
ValueDescription
"core"What a student meets first: suggested and listed first.
"advanced"A function for a narrower task: suggested after the core ones and listed behind them.
"internal"A helper of the engine: still read by the parser, never suggested or listed.
"unknown"A visibility this client does not know yet.

Why

The reason for a method, in the two forms of an Explanation.

Why
FieldTypeDescription
texstring or nullThe same sentence with math as $…$ (TeX). Present when TeX was requested.
textrequiredstringOne plain English sentence; math is input syntax in backticks.