API referenceConsole
Cloud provider
Polylane maps your Baseten dedicated models, Model APIs, chains and sandboxes, links them to the services that call them, and watches errors, latency, cold starts and autoscaling to find the cause when inference breaks down.

Connect

Connect Baseten from the terminal. Pass --help for the flags Baseten accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider baseten

How it works

Access

Polylane only reads from Baseten. Baseten has no read-only key for its Management API, so the key must have Full access to all team models. Sandbox reads need a short-lived sandbox token. Polylane gets this token from the API key when a read needs it, keeps it in memory for at most two hours, and does not store it. Polylane never reads the values of sandbox environment variables.

Infrastructure graph

Polylane syncs the organization every 15 minutes. It maps:

  • The serverless inference API (inference.baseten.co) and each Model API that your organization added, such as a DeepSeek or GLM model.
  • Each dedicated model, with its environments and the deployments that they serve, and the development deployment.
  • Each chain, with its environments and the chainlets of its production deployment.
  • Each sandbox, sandbox image and sandbox volume.

A service elsewhere in your stack that calls Baseten links to the resource that it calls. A model-<id>.api.baseten.co URL links to that model, and a chain-<id>.api.baseten.co URL links to that chain. A service that sets only BASETEN_API_KEY links to the serverless inference API.

A model shows the traffic of its production environment. Other environments and the development deployment are not production. Polylane maps them, and checks them only when you turn on non-production monitoring in the account settings.

Metrics and logs

Each model, environment and deployment charts requests, server and client errors, p50, p95 and p99 latency, time to first byte, active and starting replicas, concurrent requests, CPU, memory, GPU utilization, GPU memory, container restarts and the async queue. Each Model API charts requests, server errors, rate-limited requests, client errors and tokens. The serverless inference API charts requests and tokens across every Model API. Each sandbox charts requests, CPU and memory.

Models, environments, deployments, chainlets and sandboxes show their logs. Sandbox images show their build logs. Baseten has no log API for Model APIs or the serverless inference API, so those resources show metrics only.

Checks

By default, Polylane runs these checks:

  • The share of 5xx responses on each production model, compared with its history.
  • The p95 latency of each production model, compared with its history.
  • Replica startups that are slower than usual for the model, or that fail.
  • A deployment that an environment serves and that is in a failed or unhealthy state.
  • The share of error responses on each Model API.
  • A spike or a drop in requests on each Model API.
  • The share of error responses on each sandbox.

Investigations

During an investigation, agents use read-only tools for Baseten. The section "What agents read" lists each tool.

What agents read

ToolWhat it reads
basetenApiGET requests to the Baseten Management API, such as models, deployments, environments, chains, Model APIs and sandboxes. Polylane refuses requests for secret values, preview tokens and model source downloads.
basetenLogsLogs of a model, environment, deployment, chainlet or sandbox, and the build logs of a sandbox image, with level, text, replica and request ID filters.
basetenMetricsMetrics of a model, environment, deployment, Model API or sandbox, as a series or as one summary for a time window.
basetenStartupsReplica startups of a model, environment or deployment, with the time of each startup phase, and a summary of startup durations.
basetenModelApiUsageModel API requests and tokens in time buckets, by model, team, user or API key prefix.
cloudGetAuditLogsThe Baseten audit log. The key must have permission to read the audit log.

Troubleshooting

"Baseten does not recognize this API key" error

  • Make sure that you copied the full key and that it is not revoked or expired under Organization settings → API keys.

"This Baseten API key cannot read the organization" error

  • Use a key with Full access to all team models, or the personal API key of an organization admin.

"This API key reaches fewer Baseten teams than the connected key" error

  • The new key would stop Polylane from reading some teams. Use a key that reaches every team that the connection reads, such as the personal API key of an organization admin.

"This Baseten organization is already connected" error

  • One connection covers the whole organization. Open the connection, choose Reconnect, and paste a key that reaches every team that you want Polylane to watch.

Missing resources

  • A team API key reads only its team. To watch more teams, choose Reconnect and paste a key that reaches every team, such as the personal API key of an organization admin.
  • The first sync can take a few minutes.
  • Click Sync in the account header to start a sync immediately.

Disconnecting

Disconnecting stops every sync and check, and deletes the key that Polylane stored. The API key stays valid in Baseten. Revoke it under Organization settings → API keys in Baseten.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what Baseten's API lets it remove. The following stays until you remove it yourself:

  • Baseten API key
Terminal
polylane cloud disconnect <id>

Tools

5

Operations agents can perform in threads.

basetenLogs
Read the logs of a Baseten model, environment, deployment, chainlet, sandbox or sandbox image build
basetenMetrics
Read Baseten metrics of a model, environment, deployment, Model API or sandbox
basetenStartups
Read Baseten replica startups (cold starts) and their duration by phase
basetenModelApiUsage
Read Baseten Model API token usage and request counts in time buckets
basetenApi
Read any Baseten Management API endpoint that lacks a dedicated tool

Supported resources

11

Resource types that show up in your infrastructure graph.

Inference API
Model API
Model
Environment
Deployment
Chain
Chain Environment
Chainlet
Sandbox
Sandbox Image
Sandbox Volume