The user input in the interaction.An interaction must contain at least one of input or output. If both are present and empty, the request is rejected with a 422 error (see Validation errors).
The LLM output in the interaction (the text shown to the user as assistant response).An interaction must contain at least one of input or output. If both are present and empty, the request is rejected with a 422 error (see Validation errors).
The start time of the call to the LLM. You can approximate this to the time when the user sends the interaction. The accepted format is the ISO 8601.Example: 2023-12-07T15:00:00.000Z
The end time of the call to the LLM. This is when the user receives the full answer from the model. The accepted format is the ISO 8601.Example: 2023-12-07T15:00:00.000Z
An id or username uniquely identifying the end-user. We recommend hashing their username or email address, in order to avoid sending us any identifying information.
Boolean flag to hide the content of the interaction (input and output) in the Nebuly platform. If set to true, only metadata and traces will be visible.
Tag user interactions by adding key-value pairs using this parameter. Each key represents the tag name, and the corresponding value is the tag value.For example, if you want to tag an interaction with the model version used to reply to user input, provide it as an argument for nebuly_tags, e.g. {"version" => "v1.0.0"}. You have the flexibility to define custom tags, making them available as potential filters on the Nebuly platform.
A list of messages from the conversation so far, following the same format used by OpenAI Chat Completion endpoints.Each message has two required fields:
role: the role of who is sending the message. Possible values are: system, user, assistant, tool.
content: the content of the message.
The messages in the list should be ordered according to the conversation’s sequence, from the oldest message to the most recent.Example:
"messages": [ { "role": "system", "content": "This is a system prompt" }, { "role": "user", "content": "What's the weather like in Turin?" }, { "role": "assistant", "content": "The weather is currently rainy in Turin." }, { "role": "user", "content": "What's the weather like in Rome?" }]
The cost of the LLM call, expressed in micro-dollars
(1 USD = 1,000,000 micro-dollars, so a cost of $0.002 is sent
as 2000). Must be a non-negative integer. When provided, this
value overrides the cost that would otherwise be computed
automatically from the model, input_tokens and
output_tokens. Use it to report the exact cost of the call
(e.g. for models or providers whose pricing Nebuly does not
compute automatically, or to account for custom or negotiated
pricing).
Every interaction must contain at least one of input or output. If both are present and empty, the interaction is rejected with HTTP status 422 Unprocessable Entity and nothing is stored. If a field is missing entirely, the standard Field required error is returned for that field instead. The same validation applies to the v1, v2 and v3 interaction and conversation ingestion endpoints.Validation errors on these endpoints return a trimmed body: each entry in detail contains only type, loc and msg.
{ "detail": [ { "type": "value_error", "loc": [ "body", "interaction" ], "msg": "Value error, Interaction must have at least input or output" } ]}
For trace_conversation, loc points to the offending interaction by index:
{ "detail": [ { "type": "value_error", "loc": ["body", "conversation", "interactions", 1], "msg": "Value error, Interaction must have at least input or output" } ]}
If a required field is missing entirely, the error is the standard one for that field:
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Documentation","colors":{"primary":"#0a4fff"},"logo":{"light":"https://mintcdn.com/nebulyai/Z4cH-Z3_KpwmkdSB/images/black_logo.svg?fit=max\u0026auto=format\u0026n=Z4cH-Z3_KpwmkdSB\u0026q=85\u0026s=88e0930f5ecc7197a8159a23f17ceb3d","dark":"https://mintcdn.com/nebulyai/Z4cH-Z3_KpwmkdSB/images/white_logo.svg?fit=max\u0026auto=format\u0026n=Z4cH-Z3_KpwmkdSB\u0026q=85\u0026s=3b177bfe210caba95927e81f14efd379"},"favicon":"https://mintcdn.com/nebulyai/h9aKiGKVR2DLe52O/images/fav.png?fit=max\u0026auto=format\u0026n=h9aKiGKVR2DLe52O\u0026q=85\u0026s=1886884b14952466a25e5faa964daefd","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://backend.nebuly.com/event-ingestion"}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FEF8F4","dark":"#1b1b1d"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nebulyai","hasAudioNarration":false,"actualSubdomain":"nebulyai","customDomains":["docs.nebuly.com"],"gitSource":{"type":"github","owner":"nebuly-ai","repo":"platform-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af349d5b864377438bb8dba","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Documentation","count":46},{"language":"default","tag":"API Reference","count":27},{"language":"default","tag":"PRODUCTS","count":10},{"language":"default","tag":"Insights API","count":10},{"language":"default","tag":"DATA","count":9},{"language":"default","tag":"UI components","count":9},{"language":"default","tag":"EMPLOYEE AGENTS","count":7},{"language":"default","tag":"REPORTS","count":7},{"language":"default","tag":"PLATFORM","count":7},{"language":"default","tag":"SETUP","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#sidebar-content li[data-title]:has(>ul a[class*=\"bg-primary\"])>button{background-color:transparent!important;color:rgb(55 65 81)!important;text-shadow:none!important}.dark #sidebar-content li[data-title]:has(>ul a[class*=\"bg-primary\"])>button{color:rgb(156 163 175)!important}"}],"page":{"pagePath":"tracking/api-reference/events/post-events-interaction-with-trace-v2","slug":"/tracking/api-reference/events/post-events-interaction-with-trace-v2","pageMetadata":{"title":"Interaction API","api":"POST https://backend.nebuly.com/event-ingestion/api/v3/events/trace_interaction","description":null,"href":"/tracking/api-reference/events/post-events-interaction-with-trace-v2"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Interaction API lets you send user interactions directly to the Nebuly platform.`}),`\n`,_jsx(ParamField,{body:`interaction`,type:`object`,required:true,id:`param-interaction`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsx(ParamField,{path:`conversation_id`,type:`string`,initialValue:`conversation_id`,required:true,id:`param-conversation-id`,children:_jsx(_components.p,{children:`The conversation id of the interaction. This parameter can be used to enforce interactions to be grouped by a specific conversation.`})}),_jsxs(ParamField,{path:`input`,type:`string`,initialValue:`input`,required:true,id:`param-input`,children:[_jsx(_components.p,{children:`The user input in the interaction.`}),_jsxs(_components.p,{children:[`An interaction must contain at least one of `,_jsx(_components.code,{children:`input`}),` or `,_jsx(_components.code,{children:`output`}),`. If both are present and empty, the request is rejected with a `,_jsx(_components.code,{children:`422`}),` error (see `,_jsx(_components.a,{href:`#validation-errors`,children:`Validation errors`}),`).`]})]}),_jsxs(ParamField,{path:`output`,type:`string`,initialValue:`output`,required:true,id:`param-output`,children:[_jsx(_components.p,{children:`The LLM output in the interaction (the text shown to the user as assistant response).`}),_jsxs(_components.p,{children:[`An interaction must contain at least one of `,_jsx(_components.code,{children:`input`}),` or `,_jsx(_components.code,{children:`output`}),`. If both are present and empty, the request is rejected with a `,_jsx(_components.code,{children:`422`}),` error (see `,_jsx(_components.a,{href:`#validation-errors`,children:`Validation errors`}),`).`]})]}),_jsxs(ParamField,{path:`time_start`,type:`string`,initialValue:`2024-01-01`,required:true,id:`param-time-start`,children:[_jsxs(_components.p,{children:[`The start time of the call to the LLM. You can approximate this to the time when the user sends the interaction. The accepted format is the `,_jsx(_components.code,{children:`ISO 8601`}),`.`]}),_jsxs(_components.p,{children:[`Example: `,_jsx(_components.code,{children:`2023-12-07T15:00:00.000Z`})]})]}),_jsxs(ParamField,{path:`time_end`,type:`string`,initialValue:`2024-01-01`,required:true,id:`param-time-end`,children:[_jsxs(_components.p,{children:[`The end time of the call to the LLM. This is when the user receives the full answer from the model. The accepted format is the `,_jsx(_components.code,{children:`ISO 8601`}),`.`]}),_jsxs(_components.p,{children:[`Example: `,_jsx(_components.code,{children:`2023-12-07T15:00:00.000Z`})]})]}),_jsx(ParamField,{path:`end_user`,type:`string`,required:true,id:`param-end-user`,children:_jsx(_components.p,{children:`An id or username uniquely identifying the end-user. We recommend hashing their username or email address, in order to avoid sending us any identifying information.`})}),_jsxs(ParamField,{path:`team`,type:`string`,id:`param-team`,children:[_jsx(_components.p,{children:`Customer-defined team segment. Any non-empty string is accepted.`}),_jsxs(_components.p,{children:[`Example: `,_jsx(_components.code,{children:`Engineering`})]})]}),_jsxs(ParamField,{path:`market`,type:`string`,id:`param-market`,children:[_jsx(_components.p,{children:`Customer-defined market segment. Any non-empty string is accepted.`}),_jsxs(_components.p,{children:[`Example: `,_jsx(_components.code,{children:`EU-West`})]})]}),_jsxs(ParamField,{path:`tenure`,type:`string`,id:`param-tenure`,children:[_jsx(_components.p,{children:`Tenure band or ISO hire date converted to a band at ingest.`}),_jsx(_components.p,{children:`Accepted band values (case-insensitive):`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`under_1_year`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`1_to_3_years`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`3_to_5_years`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`5_to_10_years`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`10_plus_years`})}),`\n`]}),_jsxs(_components.p,{children:[`Alternatively, provide an ISO hire date (`,_jsx(_components.code,{children:`YYYY-MM-DD`}),`).`]}),_jsxs(_components.p,{children:[`Example: `,_jsx(_components.code,{children:`1_to_3_years`}),` or `,_jsx(_components.code,{children:`2019-04-12`})]})]}),_jsx(ParamField,{path:`hide_content`,type:`boolean`,default:`false`,id:`param-hide-content`,children:_jsx(_components.p,{children:`Boolean flag to hide the content of the interaction (input and output) in the Nebuly platform. If set to true, only metadata and traces will be visible.`})}),_jsxs(ParamField,{body:`tags`,type:`object`,id:`param-tags`,children:[_jsx(_components.p,{children:`Tag user interactions by adding key-value pairs using this parameter. Each key represents the tag name, and the corresponding value is the tag value.`}),_jsxs(_components.p,{children:[`For example, if you want to tag an interaction with the model version used to reply to user input, provide it as an argument for nebuly_tags, e.g. `,_jsx(_components.code,{children:`{\"version\" => \"v1.0.0\"}`}),`. You have the flexibility to define custom tags, making them available as potential filters on the Nebuly platform.`]}),_jsxs(Expandable,{title:`Tags examples`,children:[_jsx(ParamField,{path:`country`,type:`string`,default:`US`,id:`param-country`,children:_jsx(_components.p,{children:`The end user’s country.`})}),_jsx(ParamField,{path:`department`,type:`string`,default:`Finance`,id:`param-department`,children:_jsx(_components.p,{children:`The end user’s department.`})}),_jsx(ParamField,{path:`age`,type:`string`,default:`20-30`,id:`param-age`,children:_jsx(_components.p,{children:`The end user’s age group.`})})]})]})]})}),`\n`,_jsxs(ParamField,{body:`user_feedback`,type:`object[]`,id:`param-user-feedback`,children:[_jsx(_components.p,{children:`A list of feedback actions provided by the end-user during or after the interaction.`}),_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsxs(ParamField,{path:`slug`,type:`string`,initialValue:`thumbs_down`,required:true,id:`param-slug`,children:[_jsx(_components.p,{children:`The type of action. Accepted values include:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`thumbs_up`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`thumbs_down`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`copy_input`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`copy_output`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`paste`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`comment`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`regenerate`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`edit`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`rating`})}),`\n`]})]}),_jsx(_components.p,{children:`As optional extra parameters is possible to include:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`text (string, optional): textual feedback associated with the action (if applicable).`}),`\n`,_jsxs(_components.li,{children:[`value (integer, optional): only used for the `,_jsx(_components.code,{children:`rating`}),` action to capture a numerical score.`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_feedback\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"thumbs_up\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Very helpful response!\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"comment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Can you explain more about this?\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rating\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Pretty good!\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"regenerate\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})})]})]}),`\n`,_jsxs(ParamField,{body:`traces`,type:`object[]`,required:true,id:`param-traces`,children:[_jsx(_components.p,{children:`The full trace of your LLM agent or chain.`}),_jsxs(Tabs,{children:[_jsx(Tab,{title:`LLMTrace`,id:`llmtrace`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{path:`model`,type:`string`,required:true,id:`param-model`,children:_jsx(_components.p,{children:`The LLM used.`})}),_jsxs(ParamField,{path:`messages`,type:`array`,required:true,id:`param-messages`,children:[_jsx(_components.p,{children:`A list of messages from the conversation so far, following the same format used by OpenAI Chat Completion endpoints.`}),_jsx(_components.p,{children:`Each message has two required fields:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`role`}),`: the role of who is sending the message. Possible values are: `,_jsx(_components.strong,{children:`system`}),`, `,_jsx(_components.strong,{children:`user`}),`, `,_jsx(_components.strong,{children:`assistant`}),`, `,_jsx(_components.strong,{children:`tool`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`content`}),`: the content of the message.`]}),`\n`]}),_jsx(_components.p,{children:`The messages in the list should be ordered according to the conversation’s sequence, from the oldest message to the most recent.`}),_jsx(_components.p,{children:`Example:`}),_jsx(CodeBlock,{numberOfLines:`19`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"role\": \"system\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"content\": \"This is a system prompt\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"content\": \"What's the weather like in Turin?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"role\": \"assistant\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"content\": \"The weather is currently rainy in Turin.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"content\": \"What's the weather like in Rome?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),_jsx(ParamField,{path:`output`,type:`string`,initialValue:`output`,required:true,id:`param-output-1`,children:_jsx(_components.p,{children:`The LLM output message.`})}),_jsx(ParamField,{path:`input_tokens`,type:`integer`,id:`param-input-tokens`,children:_jsx(_components.p,{children:`The number of input tokens.`})}),_jsx(ParamField,{path:`output_tokens`,type:`integer`,id:`param-output-tokens`,children:_jsx(_components.p,{children:`The number of output tokens.`})}),_jsx(ParamField,{path:`cost`,type:`integer`,id:`param-cost`,children:_jsxs(_components.p,{children:[`The cost of the LLM call, expressed in `,_jsx(_components.strong,{children:`micro-dollars`}),`\n(1 USD = 1,000,000 micro-dollars, so a cost of $0.002 is sent\nas `,_jsx(_components.code,{children:`2000`}),`). Must be a non-negative integer. When provided, this\nvalue overrides the cost that would otherwise be computed\nautomatically from the model, `,_jsx(_components.code,{children:`input_tokens`}),` and\n`,_jsx(_components.code,{children:`output_tokens`}),`. Use it to report the exact cost of the call\n(e.g. for models or providers whose pricing Nebuly does not\ncompute automatically, or to account for custom or negotiated\npricing).`]})})]})}),_jsx(Tab,{title:`RetrievalTrace`,id:`retrievaltrace`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{path:`source`,type:`string`,initialValue:`rag source name`,required:true,id:`param-source`,children:_jsx(_components.p,{children:`The type of data source used, e.g. db_reader_tool or vector_db.`})}),_jsx(ParamField,{path:`input`,type:`string`,initialValue:`input`,required:true,id:`param-input-1`,children:_jsx(_components.p,{children:`The query to the RAG source.`})}),_jsx(ParamField,{path:`outputs`,type:`string[]`,required:true,id:`param-outputs`,children:_jsx(_components.p,{children:`The RAG source output. It is presented in list format to accommodate multiple outputs for a single query.`})})]})}),_jsxs(Tab,{title:`EmbeddingTrace`,id:`embeddingtrace`,children:[_jsx(_components.p,{children:`Embedding trace details for an LLM.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{path:`model`,type:`string`,required:true,id:`param-model-1`,children:_jsx(_components.p,{children:`The model used for embedding.`})}),_jsxs(ParamField,{path:`input`,type:`string`,required:true,id:`param-input-2`,children:[_jsx(_components.p,{children:`The input text to be embedded.\nExample:`}),_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"input\": \"Text to be embedded\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),_jsxs(ParamField,{path:`input_tokens`,type:`integer`,id:`param-input-tokens-1`,children:[_jsx(_components.p,{children:`The number of input tokens.\nExample:`}),_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"input_tokens\": 10`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]})]})]})]})]}),`\n`,_jsx(ParamField,{body:`anonymize`,type:`boolean`,default:`true`,id:`param-anonymize`,children:_jsx(_components.p,{children:`Boolean flag to anonymize your data`})}),`\n`,_jsx(Heading,{level:`2`,id:`validation-errors`,children:`Validation errors`}),`\n`,_jsxs(_components.p,{children:[`Every interaction must contain at least one of `,_jsx(_components.code,{children:`input`}),` or `,_jsx(_components.code,{children:`output`}),`. If both are present and empty, the interaction is `,_jsx(_components.strong,{children:`rejected`}),` with HTTP status `,_jsx(_components.code,{children:`422 Unprocessable Entity`}),` and nothing is stored. If a field is missing entirely, the standard `,_jsx(_components.code,{children:`Field required`}),` error is returned for that field instead. The same validation applies to the v1, v2 and v3 interaction and conversation ingestion endpoints.`]}),`\n`,_jsxs(_components.p,{children:[`Validation errors on these endpoints return a trimmed body: each entry in `,_jsx(_components.code,{children:`detail`}),` contains only `,_jsx(_components.code,{children:`type`}),`, `,_jsx(_components.code,{children:`loc`}),` and `,_jsx(_components.code,{children:`msg`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"value_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"interaction\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Value error, Interaction must have at least input or output\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`trace_conversation`}),`, `,_jsx(_components.code,{children:`loc`}),` points to the offending interaction by index:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"value_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"conversation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"interactions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Value error, Interaction must have at least input or output\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If a required field is missing entirely, the error is the standard one for that field:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"missing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"interaction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Field required\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Interaction API","api":"POST https://backend.nebuly.com/event-ingestion/api/v3/events/trace_interaction","description":null,"href":"/tracking/api-reference/events/post-events-interaction-with-trace-v2"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Validation errors","slug":"validation-errors","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Interaction API","path":"/event-ingestion/api/v3/events/trace_interaction","servers":[{"url":"https://backend.nebuly.com"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"interaction":[{"type":"object","properties":{"conversation_id":[{"type":"string","description":"The conversation id of the interaction. This parameter can be used to enforce interactions to be grouped by a specific conversation.","required":true}],"input":[{"type":"string","description":"The user input in the interaction. An interaction must contain at least one of `input` or `output` . If both are present and empty, the request is rejected with a `422` error (see Validation errors ).","required":true}],"output":[{"type":"string","description":"The LLM output in the interaction (the text shown to the user as assistant response). An interaction must contain at least one of `input` or `output` . If both are present and empty, the request is rejected with a `422` error (see Validation errors ).","required":true}],"time_start":[{"type":"string","description":"The start time of the call to the LLM. You can approximate this to the time when the user sends the interaction. The accepted format is the `ISO 8601` . Example: `2023-12-07T15:00:00.000Z`","required":true}],"time_end":[{"type":"string","description":"The end time of the call to the LLM. This is when the user receives the full answer from the model. The accepted format is the `ISO 8601` . Example: `2023-12-07T15:00:00.000Z`","required":true}],"end_user":[{"type":"string","description":"An id or username uniquely identifying the end-user. We recommend hashing their username or email address, in order to avoid sending us any identifying information.","required":true}],"team":[{"type":"string","description":"Customer-defined team segment. Any non-empty string is accepted. Example: `Engineering`"}],"market":[{"type":"string","description":"Customer-defined market segment. Any non-empty string is accepted. Example: `EU-West`"}],"tenure":[{"type":"string","description":"Tenure band or ISO hire date converted to a band at ingest. Accepted band values (case-insensitive): `under_1_year` `1_to_3_years` `3_to_5_years` `5_to_10_years` `10_plus_years` Alternatively, provide an ISO hire date ( `YYYY-MM-DD` ). Example: `1_to_3_years` or `2019-04-12`"}],"hide_content":[{"type":"boolean","description":"Boolean flag to hide the content of the interaction (input and output) in the Nebuly platform. If set to true, only metadata and traces will be visible."}],"tags":[{"type":"object","properties":{"country":[{"type":"string","description":"The end user’s country."}],"department":[{"type":"string","description":"The end user’s department."}],"age":[{"type":"string","description":"The end user’s age group."}]},"description":"Tag user interactions by adding key-value pairs using this parameter. Each key represents the tag name, and the corresponding value is the tag value. For example, if you want to tag an interaction with the model version used to reply to user input, provide it as an argument for nebuly_tags, e.g. `{\"version\" => \"v1.0.0\"}` . You have the flexibility to define custom tags, making them available as potential filters on the Nebuly platform."}]},"required":true}],"user_feedback":[{"type":"array","items":[{"type":"object","properties":{"slug":[{"type":"string","description":"The type of action. Accepted values include: `thumbs_up` `thumbs_down` `copy_input` `copy_output` `paste` `comment` `regenerate` `edit` `rating`","required":true}]}}],"description":"A list of feedback actions provided by the end-user during or after the interaction."}],"traces":[{"type":"array","items":[{"type":"object","properties":{"model":[{"type":"string","description":"The model used for embedding.","required":true}],"messages":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"A list of messages from the conversation so far, following the same format used by OpenAI Chat Completion endpoints. Each message has two required fields: `role` : the role of who is sending the message. Possible values are: system , user , assistant , tool . `content` : the content of the message. The messages in the list should be ordered according to the conversation’s sequence, from the oldest message to the most recent. Example:","required":true}],"output":[{"type":"string","description":"The LLM output message.","required":true}],"input_tokens":[{"type":"integer","description":"The number of input tokens. Example:"}],"output_tokens":[{"type":"integer","description":"The number of output tokens."}],"cost":[{"type":"integer","description":"The cost of the LLM call, expressed in micro-dollars (1 USD = 1,000,000 micro-dollars, so a cost of $0.002 is sent as `2000` ). Must be a non-negative integer. When provided, this value overrides the cost that would otherwise be computed automatically from the model, `input_tokens` and `output_tokens` . Use it to report the exact cost of the call (e.g. for models or providers whose pricing Nebuly does not compute automatically, or to account for custom or negotiated pricing)."}],"source":[{"type":"string","description":"The type of data source used, e.g. db_reader_tool or vector_db.","required":true}],"input":[{"type":"string","description":"The input text to be embedded. Example:","required":true}],"outputs":[{"type":"array","items":[{"type":"string"}],"description":"The RAG source output. It is presented in list format to accommodate multiple outputs for a single query.","required":true}]}}],"description":"The full trace of your LLM agent or chain.","required":true}],"anonymize":[{"type":"boolean","description":"Boolean flag to anonymize your data"}]}}],"examples":{"example":{"value":{"interaction":{"conversation_id":"\u003cstring>","input":"\u003cstring>","output":"\u003cstring>","time_start":"\u003cstring>","time_end":"\u003cstring>","end_user":"\u003cstring>","team":"\u003cstring>","market":"\u003cstring>","tenure":"\u003cstring>","hide_content":true,"tags":{"country":"\u003cstring>","department":"\u003cstring>","age":"\u003cstring>"}},"user_feedback":[{"slug":"\u003cstring>"}],"traces":[{"model":"\u003cstring>","messages":[{}],"output":"\u003cstring>","input_tokens":123,"output_tokens":123,"cost":123,"source":"\u003cstring>","input":"\u003cstring>","outputs":["\u003cstring>"]}],"anonymize":true}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"nebulyai","siteName":"Documentation","title":"Interaction API - Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T17:08:18.299Z","originalFileLocation":"tracking/api-reference/events/post-events-interaction-with-trace-v2.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Interaction API - Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nebulyai.mintlify.site/_mintlify/api/og/v2?division=Instrument+%28Core%29\u0026amp;title=Interaction+API\u0026amp;theme=39fd014a340346dc9babac9f\u0026amp;signature=bc4e0109ef9bc1271fc402035da71d59348126f859e85387e6950b09ab6bbd9c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Interaction API - Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nebulyai.mintlify.site/_mintlify/api/og/v2?division=Instrument+%28Core%29\u0026amp;title=Interaction+API\u0026amp;theme=39fd014a340346dc9babac9f\u0026amp;signature=bc4e0109ef9bc1271fc402035da71d59348126f859e85387e6950b09ab6bbd9c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nebulyai/Sm5JTUNJT-7CUVsm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0a4fff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/tracking/api-reference/events/post-events-interaction-with-trace-v2.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nebuly.com/#organization\",\"name\":\"Documentation\",\"url\":\"https://docs.nebuly.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nebulyai/Z4cH-Z3_KpwmkdSB/images/black_logo.svg?fit=max\u0026auto=format\u0026n=Z4cH-Z3_KpwmkdSB\u0026q=85\u0026s=88e0930f5ecc7197a8159a23f17ceb3d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nebuly.com#website\",\"name\":\"Documentation\",\"url\":\"https://docs.nebuly.com\",\"publisher\":{\"@id\":\"https://docs.nebuly.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2#webpage\",\"url\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2\",\"name\":\"Interaction API\",\"dateModified\":\"2026-11-04T17:08:18.299Z\",\"isPartOf\":{\"@id\":\"https://docs.nebuly.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Documentation\",\"item\":\"https://docs.nebuly.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interaction API\",\"item\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2#apireference\",\"headline\":\"Interaction API\",\"name\":\"Interaction API\",\"url\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nebuly.com/tracking/api-reference/events/post-events-interaction-with-trace-v2#webpage\"},\"dateModified\":\"2026-11-04T17:08:18.299Z\",\"publisher\":{\"@id\":\"https://docs.nebuly.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nebuly.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/tracking/api-reference/events/post-events-interaction-with-trace-v2.md","siteName":"Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":{"name":"lightbulb"},"pages":[{"title":"Documentation","href":"/documentation/what-is-nebuly"}]},{"tab":"API Reference","icon":"code","pages":[{"group":"Getting started","pages":[{"title":"Introduction","description":null,"href":"/introduction"}]},{"group":"Instrument (Core)","pages":[{"title":"Interaction API","api":"POST https://backend.nebuly.com/event-ingestion/api/v3/events/trace_interaction","href":"/tracking/api-reference/events/post-events-interaction-with-trace-v2"}]},{"group":"Instrument (Optional)","pages":[{"title":"Delete Interactions","api":"POST https://backend.nebuly.com/api/external/projects/delete-interactions","description":null,"href":"/tracking/api-reference/delete-interactions"},{"title":"Send User Feedback","api":"POST https://backend.nebuly.com/event-ingestion/api/v3/events/feedback","href":"/tracking/api-reference/events/send-user-feedbacks"},{"title":"Send Tags","api":"POST https://backend.nebuly.com/event-ingestion/api/v2/events/tags","href":"/tracking/api-reference/events/send-tags"}]},{"group":"Eligible Users","pages":[{"title":"Overview","href":"/eligible-users/overview"},{"title":"Get Eligible Users","api":"GET https://backend.nebuly.com/api/external/eligible-users","href":"/eligible-users/api-reference/get-eligible-users"},{"title":"Send Eligible Users","api":"POST https://backend.nebuly.com/api/external/eligible-users","href":"/eligible-users/api-reference/send-eligible-users"},{"title":"Update Eligible Users","api":"PUT https://backend.nebuly.com/api/external/eligible-users","href":"/eligible-users/api-reference/update-eligible-users"},{"title":"Delete Eligible Users","api":"DELETE https://backend.nebuly.com/api/external/eligible-users","href":"/eligible-users/api-reference/delete-eligible-users"}]},{"group":"Insights API","pages":[{"title":null,"href":"/embedded-pages/quickstart"},{"title":"Get Interaction Aggregates","api":"POST https://backend.nebuly.com/api/external/get-interaction-aggregates","href":"/embedded-pages/interactions/get-interaction-aggregates"},{"title":"Get Interaction Aggregates V2","api":"POST https://backend.nebuly.com/api/external/get-interaction-aggregates-v2","href":"/embedded-pages/interactions/get-interaction-aggregates-v2"},{"title":"Get Interaction Multi Aggregates","api":"POST https://backend.nebuly.com/api/external/get-interaction-multi-aggregates","href":"/embedded-pages/interactions/get-interaction-multi-aggregates"},{"title":"Get Interactions","api":"POST https://backend.nebuly.com/api/external/get-interactions","href":"/embedded-pages/interactions/get-interactions"},{"title":"Get Interactions Time-Series","api":"POST https://backend.nebuly.com/api/external/get-interaction-time-series","href":"/embedded-pages/interactions/get-interaction-time-series"},{"title":"Get interaction details V2","api":"GET https://backend.nebuly.com/api/external/export/interactions/detail-v2/{interaction_id}","href":"/embedded-pages/get-interaction-details-v2"},{"title":"Get conversation details","api":"POST https://backend.nebuly.com/api/external/get-conversation-detail","href":"/embedded-pages/get-conversation-details"},{"title":"Create Project","api":"POST https://backend.nebuly.com/api/external/projects/create","href":"/embedded-pages/projects/create-project"},{"title":"Delete Project API Key","api":"POST https://backend.nebuly.com/api/external/projects/delete-api-key","href":"/embedded-pages/projects/delete-api-key"}]},{"group":"Reports API","pages":[{"title":"List Reports","api":"GET https://backend.nebuly.com/api/external/reports/list-reports","href":"/embedded-pages/reports/list-reports"},{"title":"Get Report Data","api":"GET https://backend.nebuly.com/api/external/reports/report-data/{report_id}","href":"/embedded-pages/reports/get-report-data"},{"title":"Get Chart","api":"GET https://backend.nebuly.com/api/external/charts/{chart_id}","href":"/embedded-pages/charts/get-chart"}]},{"group":"Utilities","pages":[{"title":"Get Interaction Deep Link","api":"GET https://backend.nebuly.com/api/external/deeplinks/interaction/{interaction_id}","href":"/embedded-pages/deeplinks/get-interaction-deeplink"},{"title":"Get Conversation Deep Link","api":"GET https://backend.nebuly.com/api/external/deeplinks/conversation/{conversation_id}","href":"/embedded-pages/deeplinks/get-conversation-deeplink"}]}]},{"tab":"Connectors","icon":"puzzle-piece","pages":[{"title":"Connectors","href":"/connectors/langfuse/langfuse"}]},{"tab":"Self-hosting","icon":"server","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"tab":"Changelog","icon":{"name":"history"},"pages":[{"title":"Changelog","href":"/changelog/product-changelog"}]},{"tab":"UI components","icon":{"name":"grid"},"pages":[{"title":"UI components","href":"/nebuly-reports/overview"}]}]},"basePath":"","title":"Interaction API - Documentation","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js"]}