Ingest Observability
curl --request POST \
--url https://api.tracelm.ai/api/v2/observability/ingestimport requests
url = "https://api.tracelm.ai/api/v2/observability/ingest"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.tracelm.ai/api/v2/observability/ingest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tracelm.ai/api/v2/observability/ingest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tracelm.ai/api/v2/observability/ingest"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tracelm.ai/api/v2/observability/ingest")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tracelm.ai/api/v2/observability/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyObservability v2
Ingest Observability
Ingest canonical observability traces, observations, events, and links
POST
/
api
/
v2
/
observability
/
ingest
Ingest Observability
curl --request POST \
--url https://api.tracelm.ai/api/v2/observability/ingestimport requests
url = "https://api.tracelm.ai/api/v2/observability/ingest"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.tracelm.ai/api/v2/observability/ingest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tracelm.ai/api/v2/observability/ingest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tracelm.ai/api/v2/observability/ingest"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tracelm.ai/api/v2/observability/ingest")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tracelm.ai/api/v2/observability/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyIngests observability v2 payloads into canonical
obs_* tables.
Auth
Authorization: Bearer <jwt>or project-scopedX-API-Key.
Headers
Content-Type: application/jsonX-TraceLM-Schema-Version: 2026-02-23(recommended)X-Idempotency-Key: <uuid-or-stable-key>(recommended, full replay semantics in Phase 2)
Request Body
{
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"schema_version": "2026-02-23",
"traces": [
{
"trace_id": "11111111-1111-1111-1111-111111111111",
"source_trace_id": null,
"root_name": "agent.run",
"status": "success",
"environment": "prod",
"session_id": "sess_123",
"started_at": "2026-02-23T10:00:00Z",
"ended_at": "2026-02-23T10:00:02Z",
"metadata": {"tenant": "acme"},
"observations": [
{
"observation_id": "22222222-2222-2222-2222-222222222222",
"kind": "generation",
"name": "planner",
"status": "success",
"start_ts": "2026-02-23T10:00:00Z",
"end_ts": "2026-02-23T10:00:01Z",
"provider": "openai",
"model": "gpt-4o-mini"
}
],
"events": [
{
"event_type": "trace.created",
"event_ts": "2026-02-23T10:00:00Z",
"payload": {"source": "sdk"}
}
],
"links": []
}
]
}
Response
{
"ingest_request_id": "33333333-3333-3333-3333-333333333333",
"schema_version": "2026-02-23",
"status": "succeeded",
"replayed": false,
"created_traces": 1,
"created_observations": 1,
"created_events": 1,
"created_links": 0
}
Notes
project_idis required for JWTs with access to multiple projects.X-Idempotency-Keyis required for batched requests (traces.length > 1).- If
X-Idempotency-Keyis omitted for single-trace payloads, TraceLM usestrace:<trace_id>fallback.
⌘I

