Skip to main content
POST
/
v2
/
deployments
/
{id}
/
metrics
Add metrics
curl --request POST \
  --url https://api.orq.ai/v2/deployments/{id}/metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metadata": {},
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  },
  "performance": {
    "latency": 123,
    "time_to_first_token": 123
  },
  "messages": [
    {
      "role": "developer",
      "content": "<string>",
      "name": "<string>"
    }
  ],
  "choices": [
    {
      "role": "developer",
      "content": "<string>",
      "name": "<string>"
    }
  ],
  "feedback": {
    "score": 50
  }
}'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Deployment ID

Body

application/json

The deployment request payload

metadata
object

Your own custom key-value pairs can be attached to the logs. This is useful for storing additional information related to your interactions with the LLM providers or specifics within your application.

usage
object

Usage statistics to add to the deployment

performance
object
messages
(Developer message · object | System message · object | User message · object | Assistant message · object | Tool message · object)[]

A list of messages sent to the model.

  • Developer message
  • System message
  • User message
  • Assistant message
  • Tool message
choices
(Developer message · object | System message · object | User message · object | Assistant message · object | Tool message · object)[]

A list of completion choices. If you are using a completion model then you must provide the completion content with the chat completion format

  • Developer message
  • System message
  • User message
  • Assistant message
  • Tool message
feedback
object

Feedback from the user on the completion

Response

Successful operation

success
boolean
required

Whether the request was successful