Skip to main content
POST
Import sessions from a Langfuse trace export
You are reading the docs of Galtea 5.14. Read this page in the latest version.

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Body

text
string
required

The trace export (Langfuse JSON/JSONL/CSV or LangSmith dataset JSONL) as a string.

Minimum string length: 1
versionId
string

Id of the Version the imported sessions belong to. Optional: when omitted, provide productId and the API reuses the product's latest version (creating a default first version if the product has none).

Example:

"ver_123"

productId
string

Id of the Product to anchor the import when versionId is omitted. Ignored when versionId is provided.

Example:

"prod_123"

originalFilename
string

Optional filename to associate with the upload. Defaults to "pasted_trace.json".

isProduction
boolean

Whether the imported sessions are production traffic. Defaults to true.

format
enum<string>

The format of the export: langfuse (JSON, JSONL or CSV) or langsmith (dataset JSONL). Only that format is read, so a file in another format fails the job. When omitted, the format is detected from the content.

Available options:
langfuse,
langsmith
Example:

"langsmith"

Response

Import accepted; poll the returned jobId for completion.

jobId
string
required

Id of the BullMQ job processing the import. Poll GET /jobs/{jobId}/status for state.

Example:

"job_abc123"

versionId
string
required

Id of the Version the imported sessions will belong to: the versionId sent in the request, or the version resolved from productId (issue #3011).

Example:

"ver_123"