LLM Log
Logs of all the LLM API calls for AI features in this project.
The LLM Log Model
Properties
- Name
_id- Type
- Object ID
- Description
ID of this object
- Name
createdAt- Type
- Date
- Description
Date and Time when the object was created.
- Name
updatedAt- Type
- Date
- Description
Date and Time when the object was updated.
- Name
project- Type
- Project
- Description
Relation to Project Resource in which this object belongs
- Name
projectId- Type
- Object IDRequired
- Description
ID of your Project in which this object belongs
- Name
llmProvider- Type
- LLM Provider
- Description
LLM Provider used for this API call
- Name
llmProviderId- Type
- Object ID
- Description
ID of LLM Provider used for this API call
- Name
llmProviderName- Type
- Text
- Description
Name of the LLM Provider at time of call
- Name
llmType- Type
- Text
- Description
Type of LLM (OpenAI, Anthropic, Ollama)
- Name
modelName- Type
- Text
- Description
Name of the model used (e.g., gpt-4, claude-3-opus)
- Name
isGlobalProvider- Type
- BooleanRequired
- Description
Was a global LLM provider used for this call?
- Name
totalTokens- Type
- NumberRequired
- Description
Total tokens used (input + output)
- Name
costInUSDCents- Type
- NumberRequired
- Description
Total cost in USD cents
- Name
wasBilled- Type
- BooleanRequired
- Description
Was the project charged for this API call?
- Name
status- Type
- TextRequired
- Description
Status of the LLM API call
- Name
statusMessage- Type
- Long Text
- Description
Status Message (error details if failed)
- Name
feature- Type
- Text
- Description
The feature that triggered this API call (e.g., IncidentPostmortem)
- Name
requestPrompt- Type
- Very Long Text
- Description
The prompt sent to the LLM (truncated)
- Name
responsePreview- Type
- Very Long Text
- Description
Preview of the LLM response (truncated)
- Name
incident- Type
- Incident
- Description
Incident associated with this LLM call (if any)
- Name
incidentId- Type
- Object ID
- Description
ID of Incident associated with this LLM call (if any)
- Name
alert- Type
- Alert
- Description
Alert associated with this LLM call (if any)
- Name
alertId- Type
- Object ID
- Description
ID of Alert associated with this LLM call (if any)
- Name
scheduledMaintenance- Type
- Scheduled Maintenance Event
- Description
Scheduled Maintenance associated with this LLM call (if any)
- Name
scheduledMaintenanceId- Type
- Object ID
- Description
ID of Scheduled Maintenance associated with this LLM call (if any)
- Name
user- Type
- User
- Description
User who triggered this LLM call (if any)
- Name
userId- Type
- Object ID
- Description
ID of User who triggered this LLM call (if any)
- Name
requestStartedAt- Type
- Date
- Description
When the LLM request started
- Name
requestCompletedAt- Type
- Date
- Description
When the LLM request completed
- Name
durationMs- Type
- Number
- Description
Request duration in milliseconds
/api/llm-log/get-listList
This endpoint allows you to retrieve a paginated list of all your LLM Log. By default, a maximum of ten LLM Log are shown per page.
Optional Query Params
limit- number
- Number of objects to fetch. By default 10, you can increase this count up to 100
skip- number
- Number of objects to skip. This can be useful in pagination
Optional Request Body
query- If you would like to filter on LLM Log. You can specify include a query here. For more information, please check out writing queries here.
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
sort- Objects will be sorted based on created date by default. You can change the sort order — see Data Types: Sort.
List Request
POST/api/llm-log/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"costInUSDCents": true,
"isGlobalProvider": true,
"projectId": true,
"status": true,
"totalTokens": true
},
"query": {
"status": "Example status"
},
"sort": {
"createdAt": -1
}
}Response
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "3773dba0-28fe-11f1-b591-3fdcef396aba",
"costInUSDCents": 100,
"isGlobalProvider": true,
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status",
"totalTokens": 100
},
{
"_id": "3773dba1-28fe-11f1-b591-3fdcef396aba",
"costInUSDCents": 100,
"isGlobalProvider": true,
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status",
"totalTokens": 100
},
{
"_id": "3773dba2-28fe-11f1-b591-3fdcef396aba",
"costInUSDCents": 100,
"isGlobalProvider": true,
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status",
"totalTokens": 100
}
]
}/api/llm-log/:id/get-itemGet item by ID
This endpoint allows you to retrieve LLM Log by ID.
id- text
- ID of the Object
Optional Request Body
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
Get Item Request
POST/api/llm-log/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"costInUSDCents": true,
"isGlobalProvider": true,
"projectId": true,
"status": true,
"totalTokens": true
}
}Response
{
"_id": "3773dba0-28fe-11f1-b591-3fdcef396aba",
"costInUSDCents": 100,
"isGlobalProvider": true,
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status",
"totalTokens": 100
}/api/llm-log/countCount
This endpoint allows you to retrieve the count of all your LLM Log.
Optional Request Body
query- If you would like to filter on LLM Log. You can specify include a query here. For more information, please check out writing queries here.
Count Request
POST/api/llm-log/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"status": "Example status"
}
}Response
{
"count": 107
}Permissions
Your API Token needs permissions to create, update, read or delete this resource. If you do not have permissions to make a request a 4xx status will be sent as response.
Read Permissions
Required to read LLM Log
Project OwnerProject AdminProject MemberRead LLM LogRead All Project Resources
Create Permissions
Required to create LLM Log
Update Permissions
Required to update LLM Log
Delete Permissions
Required to delete LLM Log