For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • SDKs
    • Errors
  • Humanloop API
      • GETList
      • POSTLog
      • DELDelete
      • PATCHUpdate By Reference
      • GETGet
      • PATCHUpdate
LogoLogo
Sign inBook a demo
Humanloop APILogs

List

GET
https://api.humanloop.com/v4/logs
GET
/v4/logs
$curl -G https://api.humanloop.com/v4/logs \
> -H "X-API-KEY: <apiKey>" \
> -d project_id=project_id
1{
2 "records": [
3 {
4 "id": "id",
5 "config": {
6 "type": "model",
7 "id": "id",
8 "model": "model"
9 },
10 "evaluation_results": [
11 {
12 "id": "id",
13 "evaluator_id": "evaluator_id",
14 "evaluator_version_id": "evaluator_version_id",
15 "log_id": "log_id",
16 "updated_at": "2024-01-15T09:30:00Z",
17 "created_at": "2024-01-15T09:30:00Z"
18 }
19 ],
20 "observability_status": "pending",
21 "updated_at": "2024-01-15T09:30:00Z",
22 "project": "project",
23 "project_id": "project_id",
24 "session_id": "session_id",
25 "session_reference_id": "session_reference_id",
26 "parent_id": "parent_id",
27 "parent_reference_id": "parent_reference_id",
28 "inputs": {
29 "key": "value"
30 },
31 "source": "source",
32 "metadata": {
33 "key": "value"
34 },
35 "save": true,
36 "source_datapoint_id": "source_datapoint_id",
37 "reference_id": "reference_id",
38 "messages": [
39 {
40 "role": "user"
41 }
42 ],
43 "output": "output",
44 "judgment": true,
45 "config_id": "config_id",
46 "environment": "environment",
47 "feedback": [
48 {
49 "type": "rating",
50 "id": "id"
51 }
52 ],
53 "created_at": "2024-01-15T09:30:00Z",
54 "error": "error",
55 "stdout": "stdout",
56 "duration": 1.1,
57 "output_message": {
58 "role": "user"
59 },
60 "prompt_tokens": 1,
61 "output_tokens": 1,
62 "prompt_cost": 1.1,
63 "output_cost": 1.1,
64 "provider_request": {
65 "key": "value"
66 },
67 "provider_response": {
68 "key": "value"
69 },
70 "user": "user",
71 "provider_latency": 1.1,
72 "tokens": 1,
73 "raw_output": "raw_output",
74 "finish_reason": "finish_reason",
75 "tools": [
76 {
77 "id": "id",
78 "name": "name",
79 "signature": "signature",
80 "result": "result"
81 }
82 ],
83 "tool_choice": "none",
84 "batch_ids": [
85 "batch_ids"
86 ]
87 }
88 ],
89 "page": 1,
90 "size": 1,
91 "total": 1
92}
Retrieve paginated logs from the server. Sorting and filtering are supported through query params. Sorting is supported for the `source`, `model`, `timestamp`, and `feedback-{output_name}` columns. Specify sorting with the `sort` query param, with values `{column}.{ordering}`. E.g. ?sort=source.asc&sort=model.desc will yield a multi-column sort. First by source then by model. Filtering is supported for the `source`, `model`, `feedback-{output_name}`, `evaluator-{evaluator_external_id}` columns. Specify filtering with the `source_filter`, `model_filter`, `feedback-{output.name}_filter` and `evaluator-{evaluator_external_id}_filter` query params. E.g. `?source_filter=AI&source_filter=user_1234&feedback-explicit_filter=good` will only show rows where the source is "AI" or "user_1234", and where the latest feedback for the "explicit" output group is "good". An additional date range filter is supported for the `Timestamp` column (i.e. `Log.created_at`). These are supported through the `start_date` and `end_date` query parameters. The date format could be either date: `YYYY-MM-DD`, e.g. 2024-01-01 or datetime: YYYY-MM-DD[T]HH:MM[:SS[.ffffff]][Z or [±]HH[:]MM], e.g. 2024-01-01T00:00:00Z. Searching is supported for the model inputs and output. Specify a search term with the `search` query param. E.g. `?search=hello%20there` will cause a case-insensitive search across model inputs and output.
Was this page helpful?
Previous

Log

Next
Built with

Retrieve paginated logs from the server.

Sorting and filtering are supported through query params.

Sorting is supported for the source, model, timestamp, and feedback-{output_name} columns. Specify sorting with the sort query param, with values {column}.{ordering}. E.g. ?sort=source.asc&sort=model.desc will yield a multi-column sort. First by source then by model.

Filtering is supported for the source, model, feedback-{output_name}, evaluator-{evaluator_external_id} columns.

Specify filtering with the source_filter, model_filter, feedback-{output.name}_filter and evaluator-{evaluator_external_id}_filter query params.

E.g. ?source_filter=AI&source_filter=user_1234&feedback-explicit_filter=good will only show rows where the source is “AI” or “user_1234”, and where the latest feedback for the “explicit” output group is “good”.

An additional date range filter is supported for the Timestamp column (i.e. Log.created_at). These are supported through the start_date and end_date query parameters. The date format could be either date: YYYY-MM-DD, e.g. 2024-01-01 or datetime: YYYY-MM-DD[T]HH:MM[:SS[.ffffff]][Z or [±]HH[:]MM], e.g. 2024-01-01T00:00:00Z.

Searching is supported for the model inputs and output. Specify a search term with the search query param. E.g. ?search=hello%20there will cause a case-insensitive search across model inputs and output.

Authentication

X-API-KEYstring
API Key authentication via header

Query parameters

project_idstringRequired
searchstringOptional
metadata_searchstringOptional
start_datestringOptionalformat: "date"
end_datestringOptionalformat: "date"
sizeintegerOptionalDefaults to 50
pageintegerOptionalDefaults to 0

Response

Successful Response
recordslist of objects
pageinteger
sizeinteger
totalinteger

Errors

422
Logs List Request Unprocessable Entity Error