v47

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2024-10-01163166522.3 KB
Functions

Invoke function

Invoke a function.

post/v1/function/{function_id}/invoke

Path parameters

function_idstring uuid required

Function id

Function id

Request body

{"stackTrail":"components:schemas:InvokeApi:properties:input","oasType":"schema","type":"unknown","description":"Argument to the function, which can be any JSON serializable value","extensionFields":{"x-stainless-any":true},"nullable":true}
streamboolean nullable

Whether to stream the response. If true, results will be returned in the Braintrust SSE format.

mode'auto' | 'parallel' | 'null' nullable

The mode format of the returned value (defaults to 'auto')

versionstring

The version of the function

Response

Function invocation response

{"stackTrail":"paths:/v1/function/{function_id}/invoke:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown","extensionFields":{"x-stainless-any":true},"nullable":false}