POST
/
monitor
/
{monitor_id}
/
events
curl --request POST \
  --url https://api.deeprails.com/monitor/{monitor_id}/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model_input": {
    "prompt": "What is the capital of France?",
    "context": "Geography question"
  },
  "model_output": {
    "response": "The capital of France is Paris."
  },
  "temperature": 0.7,
  "top_p": 0.9,
  "top_k": 50,
  "model": "gpt-4",
  "tokens": {
    "input_tokens": 10,
    "output_tokens": 15
  }
}'
{
  "success": true,
  "data": {
    "event_id": "evt-123e4567-e89b-12d3-a456-426614174000-1640995200",
    "monitor_id": "mon-123e4567-e89b-12d3-a456-426614174000-1640995200",
    "user_id": "user-123",
    "model_input": {},
    "model_output": {},
    "temperature": 123,
    "top_p": 123,
    "top_k": 123,
    "model": "<string>",
    "tokens": {
      "input_tokens": 123,
      "output_tokens": 123
    },
    "created_at": "2024-01-01T00:00:00Z",
    "evaluation_status": "pending",
    "evaluation_results": {
      "correctness": 0.95,
      "completeness": 0.88
    }
  },
  "message": "Monitor event created successfully"
}

Authorizations

Authorization
string
header
required

JWT token for authentication

Path Parameters

monitor_id
string
required

Unique identifier for the monitor

Body

application/json

Response

201
application/json

Monitor event created successfully

The response is of type object.