v1

latestOpenAPI 3.1.02026-08-06213193627.0 KB
logs

Rate Log By Id

Rate a specific request by its ID. When accessing it via an App's API Key, this endpoint will only allow rating a log of that specific app.

post/v1/logs/{log_id}/rating

Path parameters

log_idstring uuid required

Request body

good_answerboolean nullable

The rating given to this request. It can be good (True), bad (False) or none (None == null)

feedbackstring nullable

An optional text with accompanies the feedback's rating

Response

Successful Response

conversation_idstring uuid nullable required
parent_request_idstring uuid nullable required
good_answerboolean nullable

The rating given to this request. It can be good (True), bad (False) or none (None == null)

feedbackstring nullable

An optional text with accompanies the feedback's rating

prompt_tokensinteger

Number of tokens the request used

completion_tokensinteger

Number of tokens the response used

total_tokensinteger

Number of tokens of (request + response)

prompt_tokens_costnumber

Cost (in $) of the prompt

completion_tokens_costnumber

Cost (in $) of the response

total_tokens_costnumber

Cost (in $) of the (request + response)

prompt_tokens_cost_savingsnumber

Cost (in $) saved in the prompt costs comparison to the benchmark model

completion_tokens_cost_savingsnumber

Cost (in $) saved in the completion costs comparison to the benchmark model

total_tokens_cost_savingsnumber

Cost (in $) saved in total, in comparison to the benchmark model

app_idstring uuid nullable required

The ID of the app that performed the request

auth0_idstring nullable required

The Auth0 ID of the user that performed the request

costs_incurredboolean

When a request requires multiple intermediate calls, they are stored as 'no costs incurred' -- that way we can store the costs, but don't charge the user

namespacestring nullable

The name of the provider's model which was used to answer the request

privacy_level1 | 2 | 3

How much is logged? 1: everything, 2: mask request+response (but show log), 3: Not visible, not retrievable, no information stored.

promptstring nullable

The prompt in text format

request_type'completions' | 'chat_completions' nullable

The type of request (text completion or chat) the user sends and expects back

response_textstring

The response in text format

status_codeinteger

The status code of the request to the AI model

is_testboolean

True if the request was performed from a sandbox app

added_onstring date-time nullable

When the request was performed

latencynumber

Time it took for the LLM to respond

timestampinteger required

The timestamp of the request, in milliseconds

parent_idstring uuid nullable

Reference to the ID of the parent of this log. A log has a parent when it's a subrequest used to retrieve the final answer.

idstring uuid required

ID of the request

is_saved_for_laterboolean
comment_countinteger