> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runagain.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OTLP endpoint reference

> Send OpenTelemetry traces and Claude Code log-events to RunAgain from any stack.

RunAgain ingests over **OTLP/HTTP**. Any OpenTelemetry-capable runtime can export
to it — the SDK integrations are just convenience wrappers over these endpoints.

## Base URL

```
https://ingest.runagain.ai
```

## Authentication

Every request must carry a project API key, via either header:

```http theme={null}
x-runagain-key: sk_…
```

```http theme={null}
Authorization: Bearer sk_…
```

Missing or unknown keys return `401`.

## Endpoints

<ResponseField name="POST /v1/traces" type="OTLP traces">
  Standard OTLP spans. Accepts `application/json` or `application/x-protobuf`.
  Spans are normalized into RunAgain's model (gen\_ai provider, model, tokens,
  cost, tool name, session/conversation ids).
</ResponseField>

<ResponseField name="POST /v1/logs" type="OTLP logs (Claude Code)">
  OTLP log-events, used for [Claude Code](/integrations/claude-code). Accepts
  `application/json` only. Each event is mapped to a span and grouped into a
  trace by `session.id`.
</ResponseField>

## Example

```bash theme={null}
curl -X POST https://ingest.runagain.ai/v1/traces \
  -H "x-runagain-key: $RUNAGAIN_API_KEY" \
  -H "Content-Type: application/json" \
  --data @trace.json
```

## Responses

| Status | Meaning                             |
| ------ | ----------------------------------- |
| `200`  | Accepted (empty body per OTLP/HTTP) |
| `400`  | Invalid OTLP payload                |
| `401`  | Missing / unknown API key           |
| `415`  | Unsupported content-type            |

<Tip>
  Large span inputs/outputs are automatically offloaded to blob storage above a
  size threshold, so you can trace big prompts and responses without bloating
  queries.
</Tip>
