Account

One decision by Jev for a Subs seat (the subs-jev use)

Changed on

Run the AI door's subs-jev use for the signed-in account: the body and the answer are the use's own, the meter is the account's daily token rating (then its own saved AI key, else 429 quota_exceeded), as every AI call's. An Idempotency-Key makes a retry safe: the same key and body answer the first answer again and bill nothing. An account credential (Bearer ow_a_, a signed-in session, or a phone's X-Session-Token), or an AI door token that names this use.

post/api/v2/account/ai/subs-jev

Request

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

Headers

Idempotency-Key, string

Replays of the same key with the same body return the first successful response (with Idempotent-Replay: true) for 24h; the same key with a different body is a 409 idempotency_error. While the first request with a key is still running, the same key is a 409 idempotency_in_flight: retry after Retry-After.

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
state, string required

What the decider sees now, as text (Subs: the character's block, then SITUATION and the captain's view).

menu, object[] required

The options valid now, 2 to 20, each value once: cut a longer menu before the call (more is a 422).

question, object required

Response

The pick (one of the menu's values), Jev's confidence, a probability per option, fallback (another model answered), model and usage, the meter whole (paid_by is always rating), and use_remaining (null: no daily ceiling). The rating spends the gateway's own cost of the call in Haiku input tokens, rounded up.

object required
pick, string required

The chosen option's value: always one of the menu's.

confidence, number nullable required

Jev's confidence in the pick, 0 to 1; null when the gateway gave none.

probabilities, object required

A probability per option, by its value, in the menu's order; null for an option Jev scored none.

fallback, boolean required

True when the gateway says another model answered (its fallback header, or no probabilities at all): the pick is then not Jev's.

model, string required

The model that answered, as the gateway names it. When another model answered (fallback true): the model the gateway's final-model header names, else unknown.

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).

use_remaining, integer nullable required

Calls to this use this account has left today; null when the use has no daily ceiling (the token rating is then the only limit).

Changes

    • 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

    • info

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

    4 more changes in this revision