Skip to main content
POST
Upload traces

Authorizations

Authorization
string
header
required

A Prime Intellect API key with the Prime Traces permission.

Headers

x-prime-line-format
string | null

trace (the default) or episode.

x-prime-team-id
string | null

Act on this team's traces instead of your personal ones. You must be a member of the team.

Idempotency-Key
string
required

sha256:<64 lowercase hex> of the uncompressed traces part; it is also the upload ID.

Pattern: ^sha256:[0-9a-f]{64}$

Body

multipart/form-data
metadata
UploadMetadata · object
required

The metadata part: { schema_version, context? }.

The digest is not restated here — it is the Idempotency-Key, and it is also the upload ID.

traces
file
required

JSONL: one trace per line, or one episode per line under X-Prime-Line-Format: episode. May be gzip-encoded.

Response

Successful Response

201 body. status is always committed: there is no partial success.

upload_id
string
required
status
enum<string>
default:committed

States an upload can hold in upload_events.

Content addressing bounds an upload at two events: received, then one terminal state. A refused upload appends nothing — the rejection is raised at the first bad line, before the digest that would prove the upload was this upload — so the upload simply stays received and the next attempt is read again.

Available options:
received,
committed,
indexed,
invalidated,
index_requeued,
index_skipped