Skip to main content

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 unique alias 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
  • me is reserved for your me face, 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.
Set it on create or update:

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:
Optional, plain text, up to 1500 characters. Agents choose faces by the description and the specialty, so a face with neither is hard to pick. Metadata only. A description is not compiled into the face and does not change its causes.
  • 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 leave description 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:
Put age, gender and location in their fields, not in 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

Returns every 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

Each face item always includes 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.
Tags and groups combine as (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.
It ANDs with every other filter and keeps the paging guarantee. It narrows what you can already see and never widens it. Asking for another account’s faces returns their published ones and nothing more, the same visibility ?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’s me face has a real picture rather than the placeholder, so you fetch /v1/faces/{owned_by}:me/avatar?prefer=uploaded only for the creators who have one and draw the placeholder locally for the rest. Keep prefer=uploaded: without it the route serves the generated portrait or, if there is none, the placeholder.
  • owner_followed: whether you follow the owner. null on your own faces.
One query per page, not one per row. Full detail in People → Drawing a wall.

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.
Two optional owner filters narrow the results by who owns each face. Like ?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.
Matches anywhere in 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_published and the rest to narrow first.
  • It sets the order (sort=fit). Sending another sort with it is a 422, and so is sort=fit without it. order=asc reads worst fit first.
  • fit compares faces within one response; it is not a threshold. fit is null without for. A face with no description and no specialty fits 0.
  • 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.
A reversed sort pages like any other, so this really is the least-used of everything, not the bottom of the first page reversed. Ties are broken on alias and then on the face’s id, and the tiebreak is never reversed. 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:
A bare alias means your own face first. If you own a socrates and so does head, then GET /v1/faces/socrates is yours: a 200, a real face, and not the one on the wall you clicked. There is no error to notice, so name the owner whenever you are acting on a row that came from somebody else’s listing.If you own nothing by that name it falls through to the published and shared faces, oldest first.
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

Works for any face you can read: your own, one shared with you, or a published one. 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):
Every response for a face you own (single and list) includes a 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 with 409: To delete a locked face, unlock it first; unlocking is the one change a locked face always accepts.

Delete a face

This takes a signed-in session: an API key answers 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 example client: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 400 and changes nothing
Only the face’s owner can edit its tags.
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:
Sorted, deduped, lowercase.

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.
The body’s 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 with face_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 returns 400.
The import ends as 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:
Transcription is billed separately from compile quota. See Billing guide.

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, same ETag), 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

Takes about 10 seconds, so set your client timeout accordingly. Returns 409 if the avatar is already current:
A face with no avatar counts as stale, so the first one can always be made.

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

Every call adds a version (it never replaces what is there), and the newest is the face’s current avatar. Billing: free accounts are charged per image at amount_charged_usd. Subscribers are not charged; amount_charged_usd comes back 0.0.

Fetch one

Returns the image bytes with the right 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

Metadata only. Fetch any of them at ?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.

What happens to the file

It is decoded, turned upright by its EXIF orientation, centre-cropped to the 4:5 avatar frame, reduced to the dot grid and discarded before the request returns. Nothing stores the image, the same as for a generated portrait. Cropping takes from the long side and never scales, so a landscape photograph loses its sides rather than being squashed. There is no face detection; the crop is centred.

Errors