Choices
POST /v1/choices asks a face for its view of a situation. Describe the situation, ask a
question, and the face proposes the options it would weigh, strongest first: each a short
name and a sentence, in the face’s own terms. Leave the question out, and the face proposes
the question it would ask instead.
model is the upstream model alone: the face and its maestro, @alice:maestro-1. On this
endpoint our model generates the answer, so no downstream model follows. See
Naming a model. To have a face steer another model’s reply, use
chat or decisions.
Ask
max_choices, and may propose only one.
Each name is the option itself in plain words, and names are unique, so the list can go
straight into a choice question on decisions to ask how the face, or
a decision model, would choose between them.
Request
A request needs a situation:
state, state_id, or both.
Response
No question
Leaveinstructions out, and the face reads the situation and proposes the question it
would ask about it.
instructions to get the options.
A state as the situation
Prose is limited to 3,000 tokens. For more, or for a situation your agent keeps building, put it in a state: each fact a premise, with its status and what it depends on, and the decisions already made. Then send the state’s id.state beside a state_id is an addendum for this one call: the face reads
it with the state, and it is never saved to the state. Anything that should persist must be
written to the state yourself, as premises through /v1/states.
The face reads each premise with its status, so it can tell a verified fact from an
assumption, or from one that no longer holds. A state must hold at least one premise or
decision.
With a question, the options are added to the state. Each comes back with an id, and the
list with a choices_item: name an option in a premise’s or decision’s depends_on, and a
decision resting on it is shown why the face proposed it. See
Options in a state.
Send depends_on to name what the options rest on: the premises, decisions and earlier
options the face must read. Each is shown to the face in full, with the premises it directly
depends on. The options added to the state keep the list, and they are marked invalidated,
with because, when an item they name is. An option never invalidates anything itself.
Options as premises
Withinto, each option is also written into the state as a premise of its own, and the
premise named in into rests on each of them through an edge of kind (see
And, or and weights):
assumed, has origin: agent and the face that proposed it, and
its key is the option’s name (followed by the premise’s key in parentheses when the state
already has that key). into.side_node is the record of this call. into naming no premise of
the state is a 422, and nothing is charged.
An option that proposes again, in the same or nearly the same words, a premise the into
premise already rests on is not written twice. It comes back with matched: true and premise
set to the key of the premise already there, and the call’s side node records it as a
re-proposal:
Your own options
To choose which options go in, ask withpremise first: the options come back and nothing is
written as a premise. Then send the ones you keep with into and options, each
{name, description}, at most 32. No face is asked and nothing is charged; each option goes
through the same check as above, against the premises already there and the options before it,
so a near copy is matched and not written twice:
An option that is already in the state
An option whose name and description are exactly those of a premise elsewhere in the state is not copied. That premise is linked underinto as well, so it now rests under two premises,
and its name comes back in linked. It keeps what it is: a fact you stated stays your fact, and
a goal or a test is still the same one to prove. Only the same text is linked; an option that
is merely close to a premise elsewhere is written as a new one. To link it instead, send that
premise’s own name and description.
So the two differ in where they look and how close a match must be. matched is a close
rewording of an option already under into, or of one before it in the same call, and nothing
new is written. linked is the exact text of a premise anywhere else in the state, now placed
under into too.
into rests on it, since
linking it would make a loop. It comes back in refused with why, and nothing is written for it:
or option under a premise that rests on and
children, or the reverse, is a 422 that says why. So is an option under a test, or under a
fact you stated.
Maestros
maestro-1-flash costs 10 times more only when a question is asked. Without instructions
it runs as maestro-1 does, and is billed the same. Both are listed, with their prices, by
GET /v1/models?kind=upstream: see Listing the models.
Cost
A call is billed onusage: the tokens the face processed to answer it, input and output.
Nothing else is added, and a refused call is not charged.
- Free plan:
input_tokensandoutput_tokensare paid from credits at the model’s price. - Connect and Pro:
input_tokenscount against the plan’s allowance, the one chat and decisions use too. Onmaestro-1-flashwith a question, they count 10 times. Past the allowance, withapi_fallbackon, input and output are paid from credits at the model’s price; with it off, the call is refused with429.
Errors
detail is a string. Nothing is charged for any of them.