decimalai traces import traces.jsonl --format jsonl{
"status": "ok",
"imported_count": 100,
"error_count": 2,
"errors": [
"line 45: missing agent_name",
"line 78: invalid span_type"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}import
Import traces from a JSONL upload (deprecated path — use /traces/import)
deprecated
Upload and parse a JSONL file.
Supports two formats:
1. Chat messages: {"messages": [{"role": "...", "content": "..."}]}
2. Instruction pairs: {"input": "...", "output": "..."}
Each line becomes a trace with source_type="manual".
**Optional per-row fields.** Any row of either format may also carry the
components that turn actually used:
- `model` — the model name, e.g. `"gpt-4o"`. Omitted, the trace records
the placeholder `"imported"`.
- `tools` (or `tool_calls`) — the tools that turn called, either as plain
names (`["search_docs"]`) or as the provider's own tool-call objects
(`[{"function": {"name": "search_docs", "arguments": "{}"}}]`).
- `system` — the system prompt that turn ran under. The chat-messages
format can also carry it as a `{"role": "system"}` message, which wins.
- `agent_name` — per-row override of the `agent_name` form field, so one
file can hold traces for several agents.
Supply them and the imported trace is scored against manifest changes like
a live one: removing a tool it called moves it out of `keep` in the impact
report. Omit them and only `model` is recorded, as the placeholder — the
trace imports, but a manifest diff cannot tell whether it was affected.
```jsonl
{"agent_name": "support-bot", "model": "gpt-4o", "tools": ["search_docs"],
"system": "You are a support agent.",
"messages": [{"role": "user", "content": "where is my order?"},
{"role": "assistant", "content": "Let me check."}]}
{"agent_name": "support-bot", "input": "refund policy?", "output": "30 days."}
```
POST
/
api
/
v1
/
import
/
jsonl
decimalai traces import traces.jsonl --format jsonl{
"status": "ok",
"imported_count": 100,
"error_count": 2,
"errors": [
"line 45: missing agent_name",
"line 78: invalid span_type"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Enter your API key (e.g. dai_sk_test_key_001)
Headers
Cookies
Response
Successful Response
The response is of type Response Import Jsonl Api V1 Import Jsonl Post · object.