Faces
A face is a causal model compiled from source texts. Prompted, it works out a cause that steers any model you pair it with: see Naming a model. Faces are identified by a uniquealias within your account.
Create a face
There is no limit on how many faces an account can create.Alias rules
- Lowercase letters, numbers, and dashes only:
^[a-z0-9-]+$ - Maximum 32 characters
- Must be unique within your account
- Cannot be changed once created
meis reserved for yourmeface, which every account already has (400)
specialty
The mode the face brings to a model, named the way a program is named: a
face of Michael Levin might be “Biological Platonism”, not “Biologist”. It is the
one line a card shows under the name. Optional, 80 characters maximum, single
line.
Metadata only. A specialty is not compiled into the face and does not change its causes.
- The cap is enforced by the server: 81 characters is a
422. - Newlines and tabs collapse to spaces rather than being rejected. The length is measured after that cleaning, so trailing whitespace never costs you characters.
- Returned on every face, in both the list and the detail route, without
?include=. - Searched by
?q=and ranked by?for=; see Finding faces. - Send
"specialty": ""to clear it. Omit the field on PATCH to leave it alone.
description
The face’s “use me for” line: like an agent skill’s description, it tells an
agent when to ask this face. Write one or two sentences that name the tasks,
questions or decisions the face is right for:
- Plain text. HTML is stored verbatim; if you render it, escape it yourself.
- Server strips ASCII control characters and normalizes line endings.
- Send
"description": ""to clear it. Omit the field on PATCH to leave it unchanged.
Drafted cards
If you leavedescription or specialty empty, Faces drafts them for you once the
face has compiled enough material, and keeps a drafted card current as the face
grows. A face with little compiled stays blank until it has more.
A card you write is yours. Setting description or specialty on create or PATCH,
even saving a draft back unchanged or clearing it with "", means Faces never drafts
that face’s card again.
basic_facts
A key:value object for census-like facts: three fields and nine keys.
Fields hold bare values, at most 100 characters:
Keys hold one or two short sentences:
Write a plain string; it comes back as an object:
identity. A sentence like
"identity": "Age: 45. Gender: woman." is stored as written, but a form reading age will not
find it there.
Any other key is refused. A 422 names the unknown key and lists the valid ones, and nothing
in that request is written, including the valid keys next to it. Keys such as
spouse_name or education_level are refused: put the value in the matching key as a sentence
(relationships, education).
Compiling can update them. Decompiling a source leaves them as they are.
You are the authority. A value you set replaces the current one; set {"operation": "delete"} on a key or field to clear it. A later compile can still refine it, so check them after
a big upload.
profile_addendum
A saved system prompt fragment stored on the face. It is sent to the downstream model on each chat request with the face; choices and decisions do not use it. Only the owner can read it.
Use it for durable behavioral instructions: output format rules, guardrails, tone constraints, tool-use conventions.
-
Maximum 100,000 characters. Over the limit returns
422. Formatting (blank lines, indentation) is preserved; ASCII control characters are stripped. -
Send
"profile_addendum": ""to clear it. Omit the field on PATCH to leave it unchanged. -
Returned on
GET /v1/faces/{alias}only for the face’s owner. It is never exposed on cross-user or published face listings. -
For synthetic faces: a persisted composite uses its own
profile_addendum; a run-time composite borrows the first operand’s.
List supported attributes
basic_facts key and field. No authentication required. format is
"sentence" for a key and "value" for a field; core marks the core attributes.
List faces
description. By default, tags, groups, and the compiled-profile fields are returned as null; opt in with ?include= (repeatable or comma-separated). Recognized values: tags, groups, profile, sharing, avatar, usage, owner_avatar, owner_follow.
?include=profile populates the compiled-profile fields in one round-trip. The same field names appear on GET /v1/faces/stats for high-frequency polling, and on GET /v1/faces/{alias}?include=profile for single-face reads.
These are written after a compile finishes, so they can trail a source’s own
synced state by a minute or two. Read them again before treating a zero as final,
and wait for them to settle before regenerating an avatar:
one drawn in that window is marked stale as soon as they land.
The list endpoint also accepts filter parameters that compose:
?tag=: repeatable. Multiple tags use AND (face must carry every listed tag). Values are lowercased before match.?group_id=: repeatable. Multiple group_ids use OR (face must be a member of any listed group).?owner=: repeatable. Multiple owners use OR. Case-insensitive. Filters by the account that owns the face.?following=true: restrict to faces owned by accounts you follow.
(tag1 AND tag2) ∩ (group1 OR group2):
?group_id= values that don’t exist (or that match a group with no members) return zero matches without an error. Unknown values in ?include= are silently ignored.
Filters narrow published faces too. With include_published=true, ?group_id=
returns the published faces a group holds as well as your own. This applies only to
groups you can read; any other group narrows the published rows to nothing. ?tag= never matches someone else’s face.
Filter by owner
?owner= returns one account’s faces.
?include_published=true gives you. So reading someone else’s wall means passing
both.
An unknown username is an empty list, not a 404: a creator with nothing
published and a username that does not exist look the same from here. Use
GET /v1/users/{username} when you need to tell
them apart.
?following=true is the same filter over everyone you follow; see
the following feed.
Who owns it, and do you follow them
Two per-row answers for walls that show a creator on every badge:owner_avatar: whether the owner’smeface has a real picture rather than the placeholder, so you fetch/v1/faces/{owned_by}:me/avatar?prefer=uploadedonly for the creators who have one and draw the placeholder locally for the rest. Keepprefer=uploaded: without it the route serves the generated portrait or, if there is none, the placeholder.owner_followed: whether you follow the owner.nullon your own faces.
Include published (system) faces
By default the list returns only faces you own. Pass?include_published=true to also include faces published system-wide: the system faces under the head account, and any face another account has chosen to publish. Each published item has published: true and an owned_by you combine into the handle owned_by:alias (e.g. head:socrates).
To see faces made available to you specifically rather than to everybody, pass ?include_shared=true. The two are independent and neither implies the other; see Sharing Faces.
?owner=, they apply to every row, your own included, so ?from_users=head returns head’s faces and none of yours:
?from_users=: allowlist, repeatable or comma-separated. Only faces owned by these accounts are returned.?not_from_users=: blocklist, repeatable or comma-separated. Faces owned by these accounts are excluded.
from_users and not_from_users are mutually exclusive; passing both returns 400. ?tag= matches only your own faces; ?group_id= narrows published faces too, as described above.
Finding faces
The list endpoint is also the discovery surface.?include_published=true adds
every face published platform-wide, and these parameters make that set usable.
Search
alias, name, specialty or description,
case-insensitively: a phrase from the middle of a description works, not just
the first word.
With sort=relevance, the best matches come first.
Rank by fit for a task
?for= takes a task or question in plain words and ranks the faces by how well
their description and specialty fit it, by meaning, best fit first. Each
face carries a fit from 0 to 1:
- It ranks and never filters: every face the other parameters let through comes
back. Combine it with
q,tag,include_publishedand the rest to narrow first. - It sets the order (
sort=fit). Sending anothersortwith it is a422, and so issort=fitwithout it.order=ascreads worst fit first. fitcompares faces within one response; it is not a threshold.fitisnullwithoutfor. A face with no description and no specialty fits0.- Up to 1,000 characters. Pages like any other sort.
Sort
?order=asc|desc reverses any of them. Leave it out and nothing changes: each
field keeps the direction in the table, and those are not all the same direction.
direction, sort_dir, sort_order, asc, desc and reverse are not
accepted: each returns a 422 naming order.
Usage
Your own use of your own face is not counted in any of the three.
Paging a feed
limit and cursor work across owned, shared and published faces together.
Keep going while next_cursor is present.
Faces you do not own
A published face, or one shared with you, carries the same card fields as your own:specialty, basic_facts, avatar_status, avatar_version, updated_at,
usage, and the compiled-profile fields under ?include=profile.
You can also open it (GET /v1/faces/{alias}) and fetch its portrait
(GET /v1/faces/{alias}/avatar). Read access follows the list: if a face appears
in your list, you can read it.
What stays closed is everything else. Writing to the face, regenerating its
avatar, and its source material (compile/documents, compile/threads) are the
owner’s alone, and shared_with is never populated on someone else’s face.
Naming a face you do not own
An alias is unique per owner, not globally.alice names one face on an
account that owns an alice and a different one everywhere else, and me
names a different face on every account there has ever been. So an alias on its
own is not an address.
Say the owner, either way: the handle in the path, or ?owner=. They are one
request:
<owner>:<alias> is the same handle you ask the face with, print on a card and put on
a roster. It works on all four read routes:
Every one of these routes tells you which face answered:
Naming the owner does not grant access. A face that is neither published,
nor shared with you, nor yours returns
404 however correctly you address it,
404 and never 403.
Saying it twice and disagreeing is a
422.
/v1/faces/head:socrates?owner=alice names two different faces. Send one.Get a face
description, tags and compiled are always populated. groups and the other compiled-profile fields (compile_tokens_synced, last_synced_at) are null unless requested via ?include=:
Update a face
default_model
The face’s preferred chat model, stored for clients to read. The API never fills it in: model always names the downstream model (@alice:maestro-1/<model>), and a client can put this one there. Accepts any model name from the models list.
PATCH also accepts name, specialty, description, profile_addendum, formula, basic_facts and default_tools. For the text fields (specialty, description, profile_addendum) an empty string clears the field and omitting it leaves it unchanged.
Fields with their own route are refused with a 422 naming it: published (/publish), shared_with (/share), read_only (/lock) and internal (/internal). So are alias and username. Other unknown fields are ignored.
Lock a face
Locking a face freezes it. While locked, the face and everything it owns can still be read and asked, but nothing can be changed; every write is refused. Use it to protect a face you don’t want edited. Toggle the lock with a single call (owner only):read_only boolean, defaulting to false. On a face you do not own it is null. affected lists the aliases whose state changed; everything belonging to the face freezes and thaws together.
What a lock blocks
When a face is locked, any write to it or to anything it owns is refused with409:
To delete a locked face, unlock it first; unlocking is the one change a locked face always accepts.
Delete a face
403.
Deleting a face removes everything compiled from it, and it stops appearing in centroid index results. Documents compiled exclusively for this face are also removed.
Tags
Lightweight lowercase labels attached directly to a face. Use them for quick grouping and filtered search, for exampleclient:acme, status:active, or release-candidate.
Rules
- Pattern:
^[a-z0-9][a-z0-9:\-_.]{0,63}$ - Lowercase only, max 64 chars, no spaces. An uppercase tag is rejected, not lowercased for you
- Namespacing via
:is encouraged (client:acme,team:platform) - Max 32 tags per face
- Duplicates are collapsed silently
- An invalid tag, or a write that would take the face past 32, returns
400and changes nothing
Tags are a face-level concept. In
/v1/iam/{id}/tags, {id} is the UID or the alias of a face you own. Anything else (a user account, someone else’s face, or an id that does not exist) returns 404 (“No face you own found with id/alias …”), never 403.Replace all tags
Add one or more tags (idempotent)
Remove a single tag
URL-encode the tag in the path (: becomes %3A):
List tags on a face
List all tags across your faces
For tag-picker overlays and similar UIs, fetch the union of every tag across the faces you own:Filter the face list by tags
GET /v1/faces accepts a repeated ?tag= query parameter. Multiple tags are combined with AND: only faces that carry every listed tag are returned. See List faces for composition with ?group_id= and the ?include= enrichment flag.
Group membership
Replace a face’s group-membership list in one call. Idempotent: sending the same body twice is a no-op.group_ids becomes the face’s complete membership list: extras get added, missing ones get removed. Send {"group_ids": []} to clear all memberships.
Authorization
The asymmetry on removals mirrors
DELETE /v1/groups/{id}/members/{iam}: a member’s owner can take their face out of any group they’re in, but adding to a group always requires the group’s manager.
Upload source texts
Upload the face’s own writing as a document, and any exchange between speakers (an interview, transcript or dialogue) as a thread withface_speaker, so only the
face’s turns are used. A labelled dialogue uploaded as a document is read as entirely the
face’s own words, other speakers included.
type, medium, perspective and face_speaker are query parameters; only the
file goes in the form. type defaults to document, so a type sent as a form field
is not read and the upload is treated as a document.
medium is required for type=document: say what the file is (essay,
conversation, email, …). Without it the upload is refused with 422 and nothing is
saved. It is refused, also with 422, on type=thread, where each message carries its
own. See Declaring what a document is
for the accepted values.
A document upload returns warnings. If it holds
looks_like_transcript, the file reads as a conversation: upload it again as a thread.
Supported file types
Word (
.docx) and PDF files have their text extracted for you; upload the file as
it is, no conversion needed.
Audio and video files are transcribed asynchronously: the upload returns 202 with status: "transcribing". Poll the thread or document GET endpoint until status becomes not_compiled (ready to review) or failed. A failed transcription is final: upload the file again. If transcription or PDF reading is unavailable when you upload, the upload answers 503 at once and nothing is charged: try again later. Text, PDF, and Word uploads return 200 synchronously.
To get the raw transcript without creating a compile thread/document, use the /transcribe endpoint instead.
Word documents
Paragraph order is preserved, along with the blank lines between paragraphs and any tabs or line breaks inside one. Table cells are read in document order. Only document text is read. Images and text boxes are ignored, so a.docx that is
just a scanned page arrives empty and is rejected with 422.
A
400 means the file itself is wrong and a different file is needed. A 422 means
the file was read fine and had nothing in it. Neither is worth retrying as-is.
Import
Import a YouTube video: the audio is fetched, transcribed, and stored as a document or thread. Returns 202 immediately; transcription runs in the background. Only YouTube URLs are accepted; any other URL returns400.
not_compiled (ready) or failed. A failed import is final: import the
URL again.
The body also takes type (document, the default, or thread), perspective
(third-person by default, or first-person) and face_speaker. As with uploads,
medium is required when type is document and refused when it is thread.
A recording of the face alone, such as a talk, is a document. An interview or any
recording with more than one speaker is a thread: send "type": "thread" and
face_speaker.
Transcribe audio/video
Transcribe without compiling. Accepts audio and video only. Returns the raw text and the speaker-labelled turns:Avatars
An avatar is a face’s picture, drawn from what the face has compiled. A grid of grey dots, head and shoulders, square to the camera on a plain white wall, in a 4:5 frame. Compile changes the face, that makes its avatar stale, and you regenerate it once when you are ready. There is no way to re-roll a face you simply do not like; compile more into it instead. If that is not the picture you want, you can upload your own. It sits alongside the generated one rather than replacing it, and the client chooses between them per request. Every face that exists returns an image. Before a face has a generated or an uploaded picture, the avatar route serves the Faces logo through the same dot matrix (same grid, same three sizes, sameETag), so a client needs no branch
and no local placeholder. X-Avatar-Source says which you got: organic,
uploaded or default.
avatar_status stays "none" while the placeholder is being served. Use the header to tell a real picture from the
placeholder, and avatar_status to decide whether to offer to generate one. See
People → Nobody has a broken picture.
Knowing when it is out of date
Three ways, depending on what you are rendering:avatar_status is opt-in. Ask for it when you are rendering a refresh affordance;
leave it off when you are not.
Regenerate when stale
Batching a compile run
Nothing regenerates on its own, so a run of twenty uploads costs one avatar, not twenty: compile everything, then regenerate once at the end. There is no batch API to call and no state to close; stale simply stays stale until you ask.What a save returns
amount_charged_usd.
Subscribers are not charged; amount_charged_usd
comes back 0.0.
Fetch one
Content-Type, not base64.
size and width are not the same thing
size is how many dots. width is how many pixels they are drawn across.
Leave width alone unless you have a reason. It defaults to nine pixels per
dot. Below about that the picture pales: a lg grid
squeezed into 320px comes out grey and washed. If you want a specific pixel size, pick the size
whose default width is nearest it.
Each response tells you what it actually drew, in
X-Avatar-Cols and
X-Avatar-Width.
Caching: the two URLs differ on purpose
You do not need a cache-busting query string. The bare URL is stable and
revalidates against an
ETag, so send If-None-Match and you get a 304 with
an empty body when nothing changed, and the new image when it did. Pin ?v=N when
you want a URL that can be cached indefinitely, for example in an email, or
anywhere you cannot revalidate.
The response also carries X-Avatar-Version and X-Avatar-Source, which says
whether the bytes are the generated portrait or a picture the owner uploaded.
List the versions
?v=N. A face with no generated avatar returns
"current_version": null and an empty versions list.
Keeping versions
A face keeps its most recent 50 versions. The generated image itself is not kept. It is turned into the grid and discarded in the same request, which is also true of an uploaded picture.Uploading your own picture
A face can also carry a picture its owner supplied, instead of a generated portrait.POST and PUT both work and do the same thing. Owner only.
It does not replace the generated avatar. The two are stored separately and
both remain fetchable. Generating a new avatar does not disturb the upload either.
One upload per face. There are no versions and no ?v=: uploading again
replaces what was there, and replaced tells you which happened.
prefer=uploaded means “the uploaded picture if there is one”, not “the
uploaded picture or a 404”. Check X-Avatar-Source to see which you got. DELETE returns
204 whether or not there was anything to remove.