4e064cf81dae

latestOpenAPI 3.1.02026-08-131831,331960.0 KB
traces

Create a trace (OTLP)

Send traces using the standard OTLP/HTTP protocol. This endpoint expects OTLP JSON or protobuf, not the simpler span fields used by POST /api/request-logs/. To create a visible sample trace from the API reference, use the Sample two-span trace request example below; it creates a workflow root span and one chat child span. If you run the same example more than once, change traceId and spanId values to new 32-hex and 16-hex IDs so each run creates a separate trace.

For SDK setup, use the Respan tracing SDK or the OpenTelemetry integration, which auto-configures the exporter.

post/api/v2/traces

Headers

Authorizationstring required

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

Request body

Response

Spans accepted.