Skip to content
Sign in Create account

POST demo/relay

POST /api/v1/demo/relay

POST /api/v1/demo/relay. Accepts a JSON messages list with user, assistant or system roles and string content; requires X-Cloak-Pretokenized and enforces the route body limit.

This operation needs no authentication.

Parameters

  • X-Cloak-Pretokenised string header required

Request body

application/json object

  • messages array of object required
    Items: 1 to 60 items

    Each item:

    • content string required
      Length: at least 1 characters
    • role string required
      One of: "user", "assistant", "system"

Generated sample

{
  "messages": [
    {
      "content": "string",
      "role": "user"
    }
  ]
}

Responses

200 Successful response.

application/json object

Any keys are accepted.

413 Request body exceeds the route byte limit.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

415 The request Content-Type must be JSON.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

422 The request failed validation.

application/json object

Any keys are accepted.

428 The required pretokenized header is missing.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 The route throttle limit was exceeded.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string

503 The demo relay is unavailable or its configured limits are not ready.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.