API console
POST/v1/traces/ingest
Bash
curl https://spro.hridaai.com/v1/traces/ingest \ -H "Content-Type: application/json" \ -H "Authorization: Bearer spro-xxxxxxxxxxxxxxxx" \ -d '{ "data": [ { "id": "span_0196a1b2c3d4", "trace_id": "trace_0196a1b2", "parent_id": null, "object": "trace.span", "started_at": "2026-10-15T10:00:00Z", "ended_at": "2026-10-15T10:00:02Z", "span_data": { "type": "generation", "name": "chat", "model": "gpt-oss-20b", "input": [{"role": "user", "content": "Hello"}], "output": "Hi there!" } } ] }'JSON
{ "ingested": 1}Beta
Agent trace ingestion is in beta — the ingest contract and dashboard views are still evolving.
POST https://spro.hridaai.com/v1/traces/ingest
Ingests agent trace spans so they appear in your project's observability views, stitched to the usage logs of the gateway calls they made. Built for the OpenAI Agents SDK exporter, but any client that emits the same span shape works.
Auth is a Spro API key via Authorization: Bearer. The key must be bound to a project — traces land in that project.
Request body
| Field | Type | Description |
|---|---|---|
data | array | A batch of span objects (OpenAI Agents SDK trace.span export format). |
Each span:
| Field | Type | Description |
|---|---|---|
id | string | Required — unique span ID. Spans without an id (and malformed entries, e.g. trace-level objects) are skipped. |
trace_id | string | The trace this span belongs to. |
parent_id | string or null | Parent span ID, forming the span tree. |
object | string | Defaults to trace.span. |
started_at | string | ISO timestamp when the span started. |
ended_at | string | ISO timestamp when the span ended. |
error | object or null | Error attached to the span, if any. |
span_data | object | Type-specific payload — type (e.g. generation, agent, tool) and name are surfaced as the span kind and name; the rest is stored as-is. |
Behavior
- Idempotent:
idis unique — re-exporting an already-ingested span is a no-op, so exporters can retry or replay batches safely. - Stitched to usage: generation spans that made a gateway call are matched with the corresponding usage log, so cost and token usage roll up under the trace in the dashboard.
- Batch-friendly: send many spans in one request; the response reports how many were ingested.
