Skip to main content
POST
/
completion-messages
{
  "event": "message",
  "message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
  "mode": "completion",
  "answer": "Hello World!...",
  "metadata": {
    "usage": {
      "prompt_tokens": 1033,
      "prompt_unit_price": "0.001",
      "prompt_price_unit": "0.001",
      "prompt_price": "0.0010330",
      "completion_tokens": 128,
      "completion_unit_price": "0.002",
      "completion_price_unit": "0.001",
      "completion_price": "0.0002560",
      "total_tokens": 1161,
      "total_price": "0.0012890",
      "currency": "USD",
      "latency": 0.7682376249867957
    }
  },
  "created_at": 1705407629
}

Authorizations

Authorization
string
header
required

Body

application/json
inputs
object
required
Example:
response_mode
enum<string>
Available options:
streaming,
blocking
Example:
user
string
Example:
files
object[]
  • Option 1
  • Option 2

Response

event
string
Example:
message_id
string<uuid>
mode
string
Example:
answer
string
metadata
object
created_at
integer
Example: