---
title: "Create traces"
method: POST
path: "/v1/private/traces/batch"
tags: ["Traces"]
---

# Create traces

`POST /v1/private/traces/batch`

Create traces

## Request body

- TraceBatchWrite
  - `traces` TraceWrite[], required
    - `id` string, uuid
    - `project_name` string — If null, the default project is used
    - `name` string
    - `start_time` string, date-time, required
    - `end_time` string, date-time
    - `input` JsonListStringWrite
    - `output` JsonListStringWrite
    - `metadata` JsonListStringWrite
    - `tags` string[]
    - `error_info` ErrorInfoWrite
      - `exception_type` string, required
      - `message` string
      - `traceback` string, required
    - `last_updated_at` string, date-time
    - `ttft` number, double — Time to first token in milliseconds
    - `thread_id` string
    - `source` 'sdk' | 'experiment' | 'playground' | 'optimization' | 'evaluator'
    - `environment` string

## Response `204`

No Content

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
