Chat
Name a face and the model that answers in onemodel, @alice:maestro-1/gpt-5.4, and the face
steers the model’s reply. The three chat endpoints are drop-in replacements for the OpenAI and
Anthropic APIs: point a client at https://api.faces.sh/v1 and change nothing else.
Basic usage
model is the upstream model (@alice:maestro-1, the face and its maestro) over the
downstream model that writes the reply (gpt-5.4-mini): see Naming a model.
The reply’s model echoes it as sent. Each endpoint answers in its standard shape, and nothing
else is added: the face’s cause steers the reply and is never returned. Nor is a reasoning model’s own
reasoning on a face request: there is no reasoning field on /v1/chat/completions, no
reasoning item on /v1/responses, and a /v1/messages thinking block comes back empty.
view, cause and causes in a request are each a 422.
Any model
GET /v1/models lists as kind: "chat" can follow the /. A plain model with no
face, and the upstream model alone, are each a 422 that shows the form to use.
How a face steers
For each turn, the face works out its cause from the conversation and gives the downstream model what it needs to answer as the face: the face’s name, the identity details relevant to the request, itsprofile_addendum, and the face’s style for what
the request is.
The style is chosen for each request. We read what is being asked for (one of the
media: an email, an essay, a speech, and so on; or none of these) and apply the face’s built
style for that medium when it has one. There is nothing to send: style,
medium, kind and register on a request are each a 422.
A face with nothing compiled yet still answers, from its name, its attributes and its
profile_addendum. Compile a source to have it steer.
Streaming
Add"stream": true for SSE streaming:
/v1/chat/completions,
data: {"choices":[{"delta":{"content":"..."}}]}.
A streamed request with a face waits for the steering, however long it takes. Most turns
start streaming within 20 seconds, and a refusal arrives with its real status code. If the
steering takes longer, the response starts with 200 and the stream carries SSE comment lines
(: keep-alive) until the answer begins. Comments are part of the SSE format and every SDK
skips them. A refusal after that point arrives as one error event in the endpoint’s own format,
and still nothing is charged:
status is always the real HTTP status. When the refusal has a code of its own, such as
oauth_rejected, code carries it (error.code on /v1/messages); otherwise code repeats
the status.
Requests that are not streamed
A face request that is not streamed waits for its answer too. Past about 40 seconds, the response starts with200 and the header X-Headwaters-Held: 1, then whitespace, then the JSON.
JSON parsers skip leading whitespace, so parse the body as usual. On a held response:
- A refusal comes back inside the
200:detail, plus anerrorobject carrying the realstatus. On/v1/messagesit is Anthropic’s{"type": "error", "error": {...}}. WhenX-Headwaters-Heldis set, check forerrorbefore reading the answer. X-Headwaters-Cost-USDis not sent. The charge is in usage history.
504: retry. The OpenAI and
Anthropic SDKs default to 600 seconds, which is enough.
Multi-turn conversations
Pass the full message history as you would with any OpenAI-compatible client:conversation with each turn, with any new premises; then send only the new message. All three
endpoints take conversation, premises and compaction.
Limits on a face
A request to a face takes at most 30,000 tokens per message, on all three endpoints. Per request, it takes up to the downstream model’s own input limit, less the most a face adds: 5,000 tokens.GET /v1/models lists the figure for each model as
max_request_tokens_with_face, and GET /v1/rates gives the most a face adds as
limits.chat.face_block_tokens. A model with no listed limit takes at most 62,000 tokens per
request. The face’s profile addendum is not part of that figure: leave room for it on a
request near the limit. Over any limit is a 422 naming the size, before any work, so nothing
is charged.
What the steering reads. It reads the message it answers and the turns before it, most
recent first, within 30,000 tokens (limits.chat.steering_reads_at_most_tokens in
GET /v1/rates); on Connect and Pro, within 10,000
(subscription_steering_reads_at_most_tokens). The message being answered is never cut. Earlier
turns are not read and not billed.
Images aren’t supported with a face. A request to a face that includes an image is a 422:
“Images aren’t supported with a face yet. Send the situation as text.”
Cost
A chat turn has two parts, each priced on its own:- The steering (the upstream model): $0.42 per million input tokens it processes, plus a
fixed **$0.00042 per call** in place of output tokens, since the steering’s output is never
returned.
maestro-1-flashis 10 times both. On Connect and Pro it counts against the plan’s allowance first. - The downstream model: its listed price plus 5%, on every plan.
GET /v1/rates. A refused request is
never charged.
Response headers
When a parameter did not take effect
If your account is linked to a ChatGPT subscription, some requests are routed through it. That route does not accept every parameter, and we remove the ones it rejects: todaymax_output_tokens and temperature. When that happens the response says so:
Using with the OpenAI SDK
/v1/messages, with
model="@alice:maestro-1/claude-sonnet-4-6".
Running on a linked ChatGPT plan
On Connect and Pro, with a ChatGPT account linked, a Codex-eligible downstream model (codex_eligible: true in /v1/models) runs on the
ChatGPT plan, only at POST /v1/responses. The steering is billed as usual. Calling a
Codex-eligible model at /v1/chat/completions as a connected Connect or Pro user is a 409,
use_responses_for_free_oauth. Pass "oauth_only": true to fail rather than pay from credits
when the ChatGPT route is unavailable; on Free it is a 422, oauth_only_unavailable.