Call a function
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The id of the function to call
Input to the function
{ "x": 4, "y": 5 }[
{
"comment": "Adds two numbers",
"input": { "x": 1, "y": 3 },
"output": { "sum": 4 }
}
]Tags to add to the call event
{ "tag": "value" }Successful Response
The ID of the span of the call
Result of the task if the call does not use an output schema
"The sum of 1 and 3 is 4"
Result of the task if the call uses an output schema
{ "sum": 4 }True if the result was returned from a cached results
The images generated by the call. Only available for image models. Depending on the configuration, the response can either be a list of image urls or a base64 encoded images.
["image_url"]The usage of the call split into input and output tokens as well as the total tokens and an optional breakdown of the input and output tokens.The input tokens are the tokens sent to the model and the output tokens are the tokens received from the model. The total tokens is the sum of input and output tokens.
{
"input_tokens": 25,
"output_tokens": 972,
"output_tokens_details": { "reasoning_tokens": 704 },
"total_tokens": 997
}The cost in USD of the call split into total, generation and platform costs where total is the sum of generation and platform costs
{
"generation": 0.0001,
"platform": 0.00001,
"total": 0.00011
}