Create Traces
POST/observability/trace/
Create Traces
Request
- application/json
Body
required
Array [
]
trace Trace (string)required
spans
object[]
required
id Id (string)required
app_id App Id (string)
variant_id Variant Id (string)
variant_name Variant Name (string)
inputs object
internals object
outputs string[]
config object
environment Environment (string)
tags string[]
token_consumption Token Consumption (integer)
name Name (string)required
parent_span_id Parent Span Id (string)
attributes object
spankind Spankind (string)required
status Status (string)required
user User (string)
start_time date-timerequired
end_time date-timerequired
tokens
object
prompt_tokens Prompt Tokens (integer)
Default value: 0
completion_tokens Completion Tokens (integer)
Default value: 0
total_tokens Total Tokens (integer)
Default value: 0
cost Cost (number)
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
message Message (string)required
data objectrequired
{
"message": "string",
"data": {}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
msg Message (string)required
type Error Type (string)required
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Loading...