POST
/
v0
/
logs
curl --request POST \
  --url 'https://api.unify.ai/v0/logs' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "project": "eval-project",
    "context": "experiment1/trial1"
}'
{
    "info": "Logs created successfully!",
    "log_event_ids": [
        1,
        2,
        3
    ]
}

Creates one or more logs associated to a project. Logs are LLM-call-level data that might depend on other variables. A “explicit_types” dictionary can be passed as part of the entries. If present, any matching key inside this dictionary will override the inferred type of that particular entry.

This method returns the ids of the new stored logs.

Authorizations

Authorization
string
required

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

Body

project
string
required

Name of the project the stored entries will be associated to.

context
any | null

Optional context path to update for the logs. Can use ’/’ for nested contexts (e.g. ‘training/batch1’).

params
object | array
default:
{}

Dictionary containing one or more key:value pairs that will be logged into the platform. Can be either a single dictionary or a list of dictionaries for batch processing. When using lists for both params and entries, their lengths must match. Parameters will be automatically versioned based on their values. Values must be JSON serializable. If a explicit_types dictionary is present, its values will override the inferred types of the entries.

entries
object | array
default:
{}

Dictionary containing one or more key:value pairs that will be logged into the platform. Can be either a single dictionary or a list of dictionaries for batch processing. When using lists for both params and entries, their lengths must match. Values must be JSON serializable. If a explicit_types dictionary is present, its values will override the inferred types of the entries.

curl --request POST \
  --url 'https://api.unify.ai/v0/logs' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "project": "eval-project",
    "context": "experiment1/trial1"
}'
{
    "info": "Logs created successfully!",
    "log_event_ids": [
        1,
        2,
        3
    ]
}