Skip to main content
GET
/
v1
/
models
/
{model_id}
/
deployments
/
{deployment_id}
/
logs
cURL
curl --request GET \
--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/logs \
--header "Authorization: Bearer $BASETEN_API_KEY"
{
  "logs": [
    {
      "timestamp": "<string>",
      "message": "<string>",
      "replica": "<string>",
      "request_id": "<string>"
    }
  ]
}
This endpoint is in beta. The request and response structure may change before it’s generally available.

Authorizations

Authorization
string
header
required

Pass your Baseten API key. Clients automatically send Authorization: Bearer <key>. Direct callers can also use Authorization: Api-Key <key>; both schemes are accepted.

Path Parameters

model_id
string
required
deployment_id
string
required

Query Parameters

start_epoch_millis
integer | null

Epoch milliseconds at which to start fetching logs. Defaults to 30 minutes before the end. The window from start to end must not exceed 7 days.

end_epoch_millis
integer | null

Epoch milliseconds at which to stop fetching logs. Defaults to the current time.

direction
enum<string> | null

Sort order for logs

Available options:
asc,
desc
limit
integer | null
default:500

Limit of logs to fetch in a single request

Required range: 1 <= x <= 1000
min_level
enum<string> | null

Minimum log severity to include. Omit to return all log lines, including lines that have no level. Any explicit value returns lines at or above that severity and drops lines without a level. A log severity level.

Available options:
DEBUG,
INFO,
WARNING,
ERROR
replica
string | null

Only return logs emitted by this replica (5-char short ID).

Maximum string length: 256
request_id
string | null

Only return logs tagged with this inference request ID.

Maximum string length: 256
component
string | null

Only return logs from this component.

Maximum string length: 256
search_pattern
string | null

RE2 regular expression matched against the log message. Prefer includes and excludes for plain substring matches.

Maximum string length: 256
includes
string[]

Case-sensitive substrings that must all appear in the log message.

Maximum array length: 8
excludes
string[]

Case-sensitive substrings; lines containing any of these are dropped.

Maximum array length: 8

Response

200 - application/json

A response to querying logs.

logs
LogV1 · object[]
required

Logs for a specific entity.