Skip to main content
Monitor every deployment and call.

Deployment

Each deployment generates a unique ID. View logs in the console.
Sample Deployment Logs

Call Logs

You can click into a call and view any logging statements generated by your reasoning code.

Transcripts

Each call has a transcript with independently separated transcribed audio and text to be generated. When you export these transcripts with the API or CLI, these include more granular turn level timestamps.
Sample Call Transcripts

Loggable Events

Record events without tying them to tool calls.

SDK

In the SDK, yield LogMessage events from your agent or tools to record custom events:
from line.events import LogMessage

@loopback_tool
async def process_order(ctx, order_id: Annotated[str, "Order ID"]):
    """Process a customer order."""
    result = await api.process_order(order_id)

    # Log a custom event
    yield LogMessage(
        name="order_processed",
        level="info",
        message=f"Processed order {order_id}",
        metadata={"status": result.status, "order_id": order_id}
    )

    return f"Order {order_id} processed: {result.status}"
Events are automatically sent to the platform when yielded.

Websocket

If you’re not using the SDK and instead just relying on the bare websocket, logging events will look like this:
{
  "type": "log_event",
  "event": "event_name",
  "metadata": {
    "key": "value"
  }
}

Playground

You can view these events in the Playground under the Transcript tab of the call.

Loggable Metrics

Record metrics at any point in your workflow.

SDK

In the context of the SDK, we can log a metric by broadcasting the LogMetric event. Here’s a snippet from the form filling template that exhibits this:
# Record the answer in form manager
success = self.form_manager.record_answer(answer)

if success:
  # Log metric for the answered question
  if current_question:
    metric_name = current_question["id"]
    yield LogMetric(name=metric_name, value=answer)
    logger.info(f"📊 Logged metric: {metric_name}={answer}")
The user bridge is subscribed to the LogMetric event by default, and it will log it over the websocket by default when it sees that LogMetric has been broadcast.

Websocket

If you’re not using the SDK and instead just relying on the bare websocket, logging metrics will look like this:
{
  "type": "log_metric",
  "name": "metric_name",
  "value": "metric_value"
}

Playground

You can view these events in the Playground under the Transcript tab of the call.
Loggable Metrics in the Playground

Call Recordings

Call recordings can be downloaded from the playground.
Sample Call Recordings

Webhooks

On call start, completion, or failure, Cartesia **POST**s JSON (full transcript) to your HTTPS URL. Expose POST + application/json, read the fields in Webhook payload. The webhook secret x-webhook-secret on each request must match that secret or return 401.
Sample Call Webhooks

Verify the webhook secret

Cartesia sends the webhook secret on x-webhook-secret. Compare it to the value you stored when you created the webhook so you know the POST is from Cartesia.
if request.headers.get("x-webhook-secret") != os.environ["LINE_WEBHOOK_SECRET"]:
    return jsonify({"error": "unauthorized"}), 401

Test your endpoint with curl

Test your endpoint authentication using x-webhook-secret.
curl -sS -X POST "https://your-server.example/webhooks/cartesia" \
  -H "Content-Type: application/json" \
  -H "x-webhook-secret: YOUR_WEBHOOK_SECRET" \
  -d '{
    "type": "call_completed",
    "request_id": "test-request-id",
    "agent_id": "agent_demo",
    "webhook_id": "agent_webhook_test",
    "body": [],
    "timestamp": "2025-01-01T00:00:00.000000000Z"
  }'
Expect 200 when the handler accepts the request.

Webhook payload

FieldDescription
typeOne of call_started, call_completed, or call_failed.
request_idUnique id for the call session.
agent_idAgent that handled the call.
webhook_idWebhook config id.
bodyTranscript turns (see below).
timestampRFC 3339 event time.

body

FieldDescription
roleassistant or user.
textTurn text.
start_timestamp / end_timestampSeconds on the audio timeline.
tts_ttfbAssistant TTS time-to-first-byte (seconds), when present.
Example:
{
  "type": "call_completed",
  "request_id": "MZ4958bfe4940bf0ef6cc92f8c6cfa1a1f",
  "agent_id": "agent_demo",
  "webhook_id": "agent_webhook_P3MgdLf1cpaucZJ7xWehCC",
  "body": [
    {
      "end_timestamp": 10.387875000000001,
      "role": "assistant",
      "start_timestamp": 1.175,
      "text": "Hi there! I'm Savannah, a voice agent built on Cartesia's new Voice Agents platform. Who do I have the pleasure of speaking with today?",
      "tts_ttfb": 0.20372509956359863
    }
  ],
  "timestamp": "2025-06-24T23:36:40.360473878Z"
}