/v1/tracesSend OpenTelemetry spans
OTLP over HTTP trace export, protobuf (application/x-protobuf) or JSON (application/json), optionally gzip or deflate. Point any OTLP exporter at https://api.experientiallabs.ai and it appends /v1/traces. gRPC is not supported. Spans always go to the key's own organization; a customer-plan key cannot send spans.
Span names, ids, parents, times, status, model and token counts are always stored. Inputs, outputs and tool arguments are stored only while your organization stores prompt content and zero data retention is off; otherwise they are removed on arrival. A cost you report on your own span is kept but never added to session or trace totals.
Limits per organization: 4 MiB a request as sent (16 MiB inflated), 2,000 spans a request (the rest are rejected through OTLP partial success), 50 requests and 2,000 spans a second, 4 requests in progress. A span starting more than 400 days ago or more than 5 minutes ahead is rejected on its own. 429 means your organization is over its own limit; 503 ingest_unavailable means the server is busy or could not store the spans. Both carry Retry-After, and OTLP exporters retry them.
The same endpoint also answers at /api/otlp/v1/traces and at Langfuse's /api/public/otel/v1/traces, and accepts the key as x-api-key or as Langfuse Basic auth (public:secret, the secret is your key).
Authentication: Bearer API key in the Authorization header
Responses
200Accepted.
partialSuccesscounts rejected spans and says why.Response
partialSuccessobjectpartialSuccess
rejectedSpansstringHow many spans were rejected.
errorMessagestringWhy they were rejected.
400Span ingest refused the request.
erroris the code:invalid_payload(400),unauthorized(401),payload_too_large(413),unsupported_media_typeorunsupported_encoding(415),rate_limited(429),ingest_unavailable(503). 429 and 503 carryRetry-After.Response
codeintegerThe HTTP status.
messagestringWhat went wrong.
errorstringThe stable error code.
401Span ingest refused the request.
erroris the code:invalid_payload(400),unauthorized(401),payload_too_large(413),unsupported_media_typeorunsupported_encoding(415),rate_limited(429),ingest_unavailable(503). 429 and 503 carryRetry-After.Response
codeintegerThe HTTP status.
messagestringWhat went wrong.
errorstringThe stable error code.
413Span ingest refused the request.
erroris the code:invalid_payload(400),unauthorized(401),payload_too_large(413),unsupported_media_typeorunsupported_encoding(415),rate_limited(429),ingest_unavailable(503). 429 and 503 carryRetry-After.Response
codeintegerThe HTTP status.
messagestringWhat went wrong.
errorstringThe stable error code.
415Span ingest refused the request.
erroris the code:invalid_payload(400),unauthorized(401),payload_too_large(413),unsupported_media_typeorunsupported_encoding(415),rate_limited(429),ingest_unavailable(503). 429 and 503 carryRetry-After.Response
codeintegerThe HTTP status.
messagestringWhat went wrong.
errorstringThe stable error code.
429Span ingest refused the request.
erroris the code:invalid_payload(400),unauthorized(401),payload_too_large(413),unsupported_media_typeorunsupported_encoding(415),rate_limited(429),ingest_unavailable(503). 429 and 503 carryRetry-After.Response
codeintegerThe HTTP status.
messagestringWhat went wrong.
errorstringThe stable error code.
503Span ingest refused the request.
erroris the code:invalid_payload(400),unauthorized(401),payload_too_large(413),unsupported_media_typeorunsupported_encoding(415),rate_limited(429),ingest_unavailable(503). 429 and 503 carryRetry-After.Response
codeintegerThe HTTP status.
messagestringWhat went wrong.
errorstringThe stable error code.
Request
curl -X POST 'https://api.experientiallabs.ai/v1/traces' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "my-agent"
}
}
]
},
"scopeSpans": [
{
"spans": [
{
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"spanId": "00f067aa0ba902b7",
"name": "lookup_order",
"kind": 1,
"startTimeUnixNano": "1763476327000000000",
"endTimeUnixNano": "1763476327310000000",
"attributes": [
{
"key": "session.id",
"value": {
"stringValue": "run-42"
}
}
]
}
]
}
]
}
]
}'Response
{
"partialSuccess": {}
}https://api.experientiallabs.ai/v1/traces