Metering Events

Ingest metering events

Changed on

Ingests an event or batch of events following the CloudEvents specification.

post/v3/openmeter/events

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/openmeter/events
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Request body

OR

Example request

{
  "specversion": "1.0",
  "id": "5c10fade-1c9e-4d6c-8275-c52c36731d3c",
  "source": "service-name",
  "type": "prompt",
  "subject": "customer-id",
  "time": "2023-01-01T01:01:01.001Z",
  "data": {
    "prompt": "Hello, world!",
    "tokens": 100,
    "model": "gpt-4o",
    "type": "input"
  }
}

Response

The events have been ingested and are being processed asynchronously.

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • warning

      added the new 400.00 enum value to the response property for the response status

    • warning

      added the new 403.00 enum value to the response property for the response status