POST
/
v2
/
projects
/
{project_id}
/
traces
curl --request POST \
  --url https://api.acme.rungalileo.io/v2/projects/{project_id}/traces \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '{
  "log_stream_id": "00000000-0000-0000-0000-000000000000",
  "traces": [
    {
      "created_at": "2025-04-16T18:15:38.893846Z",
      "input": "who is a smart LLM?",
      "metrics": {},
      "name": "",
      "output": "I am!",
      "spans": [
        {
          "created_at": "2025-04-16T18:15:38.893795Z",
          "input": [
            {
              "content": "Question: who is a smart LLM?",
              "role": "user"
            }
          ],
          "metrics": {},
          "name": "",
          "output": {
            "content": "I am!",
            "role": "user"
          },
          "tags": [],
          "type": "llm",
          "user_metadata": {}
        }
      ],
      "tags": [],
      "type": "trace",
      "user_metadata": {}
    }
  ]
}'
{
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "project_id": "<string>",
  "project_name": "<string>",
  "traces_count": 123,
  "records_count": 123
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string
required

Body

application/json
traces
object[]
required

List of traces to log.

log_stream_id
string | null

Log stream id associated with the traces.

experiment_id
string | null

Experiment id associated with the traces.

logging_method
enum<string>
Available options:
playground,
python_client,
typescript_client,
api_direct
client_version
string | null
reliable
boolean
default:false

Whether or not to use reliable logging. If set to False, the method will respond immediately before verifying that the traces have been successfully ingested, and no error message will be returned if ingestion fails. If set to True, the method will wait for the traces to be successfully ingested or return an error message if there is an ingestion failure.

Response

200
application/json
Successful Response
project_id
string
required

Project id associated with the traces.

project_name
string
required

Project name associated with the traces.

traces_count
integer
required

total number of traces ingested

records_count
integer
required

total number of records (traces & spans) ingested

log_stream_id
string | null

Log stream id associated with the traces.

experiment_id
string | null

Experiment id associated with the traces.