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

# Export OTLP traces

> OpenTelemetry OTLP/HTTP trace receiver. Point an exporter's base endpoint at `https://pillarforge.corepillar.ai/api` (exporters append `/v1/traces`) and send the tracing key as `Authorization: Bearer ...`.

Accepts protobuf or JSON. gRPC isn't supported. Spans are converted to AgentHub spans (kind, model, tokens, cost from the model catalog, input and output), merged with earlier exports of the same trace, and stitched across fragments of one session. Responds with an OTLP `ExportTraceServiceResponse`, not the `{ data }` envelope.

See [OpenTelemetry (OTLP)](/agenthub/developers/opentelemetry).



## OpenAPI

````yaml /api-reference/openapi.json post /traces
openapi: 3.1.0
info:
  title: CorePillar API
  version: 1.0.0
  description: >-
    REST API for AgentHub and ModelHub. Ingestion endpoints authenticate with a
    project tracing key; all other endpoints use the signed-in user's browser
    session.
servers:
  - url: https://pillarforge.corepillar.ai/api/v1
    description: AgentHub
security: []
tags:
  - name: Ingestion
    description: 'Send traces with a tracing key: JSON ingest and OpenTelemetry (OTLP).'
  - name: Traces
    description: Read traces and spans.
  - name: Evaluations
    description: Evaluate traces with evaluator collections.
  - name: Evaluators
    description: Built-in and custom evaluators.
  - name: Evaluator collections
    description: Ordered groups of evaluators.
  - name: Organizations
    description: Organizations you belong to.
  - name: Members
    description: Organization members, invites and roles.
  - name: Projects
    description: Projects inside an organization.
  - name: SSO
    description: Okta SSO configuration.
  - name: Tracing keys
    description: Create, list and revoke project tracing keys.
  - name: Cost calculator
    description: Estimate, generate and execute scenario runs.
  - name: Synthetic
    description: Synthetic agent and data setup from source material.
  - name: Chat
    description: ModelHub chat. Served at https://modelhub.corepillar.ai/api/v1.
  - name: Auth
    description: Sign-in helpers.
  - name: E2E
    description: Internal end-to-end encryption key directory.
paths:
  /traces:
    post:
      tags:
        - Ingestion
      summary: Export OTLP traces
      description: >-
        OpenTelemetry OTLP/HTTP trace receiver. Point an exporter's base
        endpoint at `https://pillarforge.corepillar.ai/api` (exporters append
        `/v1/traces`) and send the tracing key as `Authorization: Bearer ...`.


        Accepts protobuf or JSON. gRPC isn't supported. Spans are converted to
        AgentHub spans (kind, model, tokens, cost from the model catalog, input
        and output), merged with earlier exports of the same trace, and stitched
        across fragments of one session. Responds with an OTLP
        `ExportTraceServiceResponse`, not the `{ data }` envelope.


        See [OpenTelemetry (OTLP)](/agenthub/developers/opentelemetry).
      operationId: exportOtlpTraces
      parameters:
        - name: Content-Encoding
          in: header
          required: false
          schema:
            type: string
            enum:
              - identity
              - gzip
              - deflate
      requestBody:
        required: true
        description: >-
          An OTLP `ExportTraceServiceRequest` (or the metrics/logs equivalent).
          Optionally `gzip` or `deflate` compressed; up to 32 MiB decompressed.
        content:
          application/x-protobuf:
            schema:
              type: string
              format: binary
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                resourceSpans:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
      responses:
        '200':
          description: >-
            OTLP ExportTraceServiceResponse, in the request's encoding. Empty on
            full success; `partialSuccess` when some spans were dropped.
          content:
            application/json:
              schema:
                type: object
                properties:
                  partialSuccess:
                    type: object
                    properties:
                      rejectedSpans:
                        type: string
                      errorMessage:
                        type: string
              example: {}
            application/x-protobuf:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            Unsupported `Content-Encoding`, payload over 32 MiB, or undecodable
            payload (`VALIDATION_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Tracing key missing, malformed, unknown or revoked (`UNAUTHORIZED`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '415':
          description: >-
            `Content-Type` isn't `application/x-protobuf`,
            `application/protobuf` or `application/json` (`VALIDATION_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Unexpected server error (`INTERNAL_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - tracingKey: []
        - tracingKeyHeader: []
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code. Branch on this, not on `message`.
              examples:
                - VALIDATION_ERROR
            message:
              type: string
              description: Human-readable description. May change.
            details:
              type: object
              additionalProperties: true
              description: Extra context; often empty.
  securitySchemes:
    tracingKey:
      type: http
      scheme: bearer
      bearerFormat: tk_live_ / tk_test_ + 48 hex
      description: >-
        Project tracing key, from Settings → Tracing keys. `Authorization:
        Bearer tk_live_...`. The word `Bearer` is case-sensitive.
    tracingKeyHeader:
      type: apiKey
      in: header
      name: x-tracing-key
      description: >-
        Alternative to the Authorization header. Used only when no
        `Authorization: Bearer` header is present.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.