API reference

API reference · Playground

One turn of the front page's black hole

POST/api/oracle/turnSigned in sessionNo key

Off unless ANTIMATTER_ORACLE=1, and then a 404. The answer is a stream of JSON lines: one per tool it runs, then the reply. A signed in person's turn is billed to their account through the chat page's door (same origin, a rate per account, the freeze and the monthly cap); a visitor's turn is the house's, like the anonymous console, under its price ceiling and output cap.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
messagesrequiredarray of object
messages[].rolerequiredanyOne of "user", "assistant".
messages[].contentrequiredstring
localestring

Example

{
  "messages": [
    {
      "role": "user",
      "content": "Say hello in five words."
    }
  ],
  "locale": "string"
}

Answer 200

A stream of JSON lines, the tools it ran and then the reply.

The answer's fields are not named in the document.

Errors

  • 400OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI shaped error.
  • 413OpenAI shaped error.
  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter