Account

Sort a user's unsorted notes into proposed changes to a world: new elements, text to add, links to make, and questions where the notes are ambiguous. Body: world_id, notes (a list of notes: text, or a photographed note uploaded to this world's media, with optional text) and slice (the elements the client's own search found for them: id, type, name and an optional anchor, a short phrase that tells two same-named elements apart). The answer only proposes; the client applies what the user accepts. A sort spends its tokens from the account's daily token rating, as ask does. An account credential (Bearer ow_a_, a signed-in session, or a phone's X-Session-Token).

post/api/v2/account/sort

Request

  • Base URL
    https://www.onlyworlds.com
  • Auth
    • HTTP bearer
    • or API key in header X-Session-Token

Headers

X-OW-Client, string

The client's own name for itself (atlas, lantern, sdk): lower case letters, digits and hyphens, 1 to 32 characters, after a trim. It is stored on the element as changed_client (a delete's tombstone as deleted_client), beside the door; it changes no door and no permission. A value outside the rule is ignored (stored as null), never refused.

Request body

object required
world_id, string uuid required

A world this account owns or is a member of.

notes, union[] required

16000 characters of text in all, at most 4 images.

slice, object[]

Response

The proposed changes: rows, each one of four kinds (make a new element; add_to text appended to a field of a slice element; link one slice element to another through a field; ask a question with candidates when a name matches several slice elements or the sorter is unsure, and optionally then, the add_to or link row it stands for without its target), each with the source_line it came from; not_proposed (lines not placed, each with a reason); model, stop_reason, usage {input_tokens, output_tokens}, remaining (how many more calls of this one's size fit in what this account has left today), tokens_remaining (the account's tokens left today after this call), token_rating (the account's daily token rating) and paid_by (rating, or own_key when the sort ran on the account's own AI key). Every id in a row is an id from the request's slice; a row naming any other id is moved to not_proposed. Names, types and anchors of the elements a row points at are the slice's own. Nothing is written to the world.

object required
rows, object[] required
not_proposed, object[] required
model, string required
stop_reason, string required
usage, object required
remaining, integer required

How many more calls of this one's size fit in what this account has left today.

tokens_remaining, integer required

The account's tokens left today after this call.

token_rating, integer required

The account's daily token rating.

paid_by, 'rating' | 'own_key' required

Who paid for this call: rating, the account's daily token rating on the platform's key; own_key, the account's own AI key, once today's rating was spent (the rating's fields above are then as they were).

Changes

    • info

      added the new optional header request parameter X-OW-Client

    • info

      added the optional property error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    5 more changes in this revision