# Ingest traces via OTLP

Source: https://agenta.ai/docs/reference/api/otlp-ingest

`POST /otlp/v1/traces`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Ingest traces via the OTLP/HTTP protobuf protocol.

This endpoint accepts a serialized
`ExportTraceServiceRequest` protobuf. Point any OTLP/HTTP
collector or SDK at `POST /otlp/v1/traces` and spans will flow
into the same ingest stream as the Agenta-native endpoints.

Use this when you already have OTel instrumentation emitting
OTLP. For new integrations that don't need raw OTLP, prefer
`POST /tracing/spans/ingest` — it takes JSON, accepts Agenta's
nested shape directly, and surfaces parse failures immediately.

## Content-Type and size limit

Binary protobuf only (`Content-Type: application/x-protobuf`).
JSON OTLP is not accepted. Requests larger than the configured
batch limit (default 10 MB, see `AGENTA_OTLP_MAX_BATCH_BYTES`) return
`413 Request Entity Too Large`.

## Response

Successful ingest returns `200 OK` with a serialized
`ExportTraceServiceResponse` protobuf. Parse failures on the
request body return `400`; malformed spans return `500`; quota
exhaustion returns `403`. Like the native ingest paths, spans
are queued on a Redis stream and persisted asynchronously — see
[Tracing — Async write
contract](https://agenta.ai/docs/reference/api-guide/tracing.md#async-write-contract-202).

## Response schemas

### 200: Successful Response

- `status` (string, required): Readiness string. `ready` means the router is mounted and accepts OTLP ingest.
